SlideShare a Scribd company logo
1 of 10
Download to read offline
Working with API in Refine - @magdmartin 1
Working with API
Working with API in Refine - @magdmartin 2
Next Meet Up
● Next Meet Up
– April 21- 6PM – 7.45PM
– May 21 - 6PM – 7.45PM
– June 18 - 6PM – 7.45PM
● Pool
– Use Case Presentation and learn how other use
Refine
– Learn a specific set of functionality
– Hack session where everybody come with a laptop
data to clean.
Working with API in Refine - @magdmartin 3
Working with API in Refine
● What is Refine?
● What is an API?
● How to make API call?
● Hands On!
Working with API in Refine - @magdmartin 4
Bridge
The Technology Gap
Domain Expert – Spreadsheet Warriors
(split and join, format, transpose,
complex formulas, )
Basic Knowledge
of Scripting
(normalization, parsing,
schema alignment, API,
fuzzy matching, scheduling)
DBA
Data Science
ETL Engineer
Data Clerk – Data Entry
Spreadsheet user
(filter, sort, manual edition, basic formula)
Understand The Data
(Business Skills)
Know How To
Transform Data
(Technical Skills)
Working with API in Refine - @magdmartin 5
Discovery Wrangling
In application feedback
(personal usage)
Profiling Preparation
ad hoc usage
reporting - migration
Quality Transformation
Industralization
Integration
Measure
Check
Build - Do
Learn Think
Plan - Act
A Lean Data Model
Working with API in Refine - @magdmartin 6
What is an API?
● Each API provider is like a restaurant:
– Menu = API
– Placing an Order = Executing an API Call
– Different food on the menu = Parameters
– Food = the System's Response
● Each API have their own rules
– Need to register (or not)
– How frequently you can make a call
– GET or POST request (Refine support only GET)
– Price and Service Level Agreement
● See Mashape or ProgrammableWeb to discover API
Working with API in Refine - @magdmartin 7
Example of API Provider
everythinglocation
Verify and Geocode
Address Data
● Give an address string
● Returns a validated,
parsed and geocoded
address
Timezonedb
free time zone database
for cities of the world
● Give a lat/long
● Return timezone and time
Working with API in Refine - @magdmartin 8
Making API call
Everythinglocation
API address key Verify &
Geocode
Country
https://saas.loqate.com/rest/?lqtkey=[APIKEY]&p=v%2Bg&ctry=USA&addr=1111%20bayhill%20drive%20san%20bruno
Address
Documentation
I'd like the following address
cleaned, parsed and its long / lat
1111 Bayhill Drive San Bruno
Working with API in Refine - @magdmartin 9
Longitude
API address Latitude key
http://api.timezonedb.com/?lat=53.7833&lng=­1.75&key=<Your_API_Key>
Making API call
Timezonedb
Documentation
http://api.timezonedb.com/?lat=53.7833&lng=­1.75&format=json&key=<Your_API_Key>
http://api.timezonedb.com/?lat=53.7833&lng=­1.75&key=<Your_API_Key>
format
In JSON format
I'd like the timezone for this
coordinate 53.7833 , 1.75
Working with API in Refine - @magdmartin 10
Working with API
Cheat Sheet
● Create a project with Fortune 1000 data: http://cs.brown.edu/~pavlo/fortune1000/
● Concatenate the Address:
cells['address'].value + ' ' +cells['city'].value + ' ' +cells['state'].value + ' '
+cells['zipcode'].value
● Call Everythinglocation:
'http://saas.loqate.com/rest/?lqtkey=[YOURKEY]&p=v
%2Bg&ctry=USA&addr='+value.replace(" ","%20")
● Retrieve only the JSON results
value.replace('{"status":"OK","results":[','').replace(']}','')
● Extract Longitude and Latitude
value.parseJson()['Longitude']
value.parseJson()['Latitude']
● Call Timezonedb
'http://api.timezonedb.com/?
lat='+cells['Latitude'].value+'&lng='+cells['Longitude'].value+'&key=[YOURKEY]'
● Extract ZoneName
value.split('<zoneName>')[1].split('</zoneName>')[0]

More Related Content

Recently uploaded

一比一原版加利福尼亚大学尔湾分校毕业证成绩单如何办理
一比一原版加利福尼亚大学尔湾分校毕业证成绩单如何办理一比一原版加利福尼亚大学尔湾分校毕业证成绩单如何办理
一比一原版加利福尼亚大学尔湾分校毕业证成绩单如何办理
pyhepag
 
一比一原版西悉尼大学毕业证成绩单如何办理
一比一原版西悉尼大学毕业证成绩单如何办理一比一原版西悉尼大学毕业证成绩单如何办理
一比一原版西悉尼大学毕业证成绩单如何办理
pyhepag
 
一比一原版(Monash毕业证书)莫纳什大学毕业证成绩单如何办理
一比一原版(Monash毕业证书)莫纳什大学毕业证成绩单如何办理一比一原版(Monash毕业证书)莫纳什大学毕业证成绩单如何办理
一比一原版(Monash毕业证书)莫纳什大学毕业证成绩单如何办理
pyhepag
 
Fuzzy Sets decision making under information of uncertainty
Fuzzy Sets decision making under information of uncertaintyFuzzy Sets decision making under information of uncertainty
Fuzzy Sets decision making under information of uncertainty
RafigAliyev2
 
一比一原版麦考瑞大学毕业证成绩单如何办理
一比一原版麦考瑞大学毕业证成绩单如何办理一比一原版麦考瑞大学毕业证成绩单如何办理
一比一原版麦考瑞大学毕业证成绩单如何办理
cyebo
 
一比一原版阿德莱德大学毕业证成绩单如何办理
一比一原版阿德莱德大学毕业证成绩单如何办理一比一原版阿德莱德大学毕业证成绩单如何办理
一比一原版阿德莱德大学毕业证成绩单如何办理
pyhepag
 
Abortion pills in Dammam Saudi Arabia// +966572737505 // buy cytotec
Abortion pills in Dammam Saudi Arabia// +966572737505 // buy cytotecAbortion pills in Dammam Saudi Arabia// +966572737505 // buy cytotec
Abortion pills in Dammam Saudi Arabia// +966572737505 // buy cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 

Recently uploaded (20)

Easy and simple project file on mp online
Easy and simple project file on mp onlineEasy and simple project file on mp online
Easy and simple project file on mp online
 
2024 Q2 Orange County (CA) Tableau User Group Meeting
2024 Q2 Orange County (CA) Tableau User Group Meeting2024 Q2 Orange County (CA) Tableau User Group Meeting
2024 Q2 Orange County (CA) Tableau User Group Meeting
 
一比一原版加利福尼亚大学尔湾分校毕业证成绩单如何办理
一比一原版加利福尼亚大学尔湾分校毕业证成绩单如何办理一比一原版加利福尼亚大学尔湾分校毕业证成绩单如何办理
一比一原版加利福尼亚大学尔湾分校毕业证成绩单如何办理
 
How I opened a fake bank account and didn't go to prison
How I opened a fake bank account and didn't go to prisonHow I opened a fake bank account and didn't go to prison
How I opened a fake bank account and didn't go to prison
 
Machine Learning for Accident Severity Prediction
Machine Learning for Accident Severity PredictionMachine Learning for Accident Severity Prediction
Machine Learning for Accident Severity Prediction
 
AI Imagen for data-storytelling Infographics.pdf
AI Imagen for data-storytelling Infographics.pdfAI Imagen for data-storytelling Infographics.pdf
AI Imagen for data-storytelling Infographics.pdf
 
Supply chain analytics to combat the effects of Ukraine-Russia-conflict
Supply chain analytics to combat the effects of Ukraine-Russia-conflictSupply chain analytics to combat the effects of Ukraine-Russia-conflict
Supply chain analytics to combat the effects of Ukraine-Russia-conflict
 
一比一原版西悉尼大学毕业证成绩单如何办理
一比一原版西悉尼大学毕业证成绩单如何办理一比一原版西悉尼大学毕业证成绩单如何办理
一比一原版西悉尼大学毕业证成绩单如何办理
 
一比一原版(Monash毕业证书)莫纳什大学毕业证成绩单如何办理
一比一原版(Monash毕业证书)莫纳什大学毕业证成绩单如何办理一比一原版(Monash毕业证书)莫纳什大学毕业证成绩单如何办理
一比一原版(Monash毕业证书)莫纳什大学毕业证成绩单如何办理
 
Fuzzy Sets decision making under information of uncertainty
Fuzzy Sets decision making under information of uncertaintyFuzzy Sets decision making under information of uncertainty
Fuzzy Sets decision making under information of uncertainty
 
Generative AI for Trailblazers_ Unlock the Future of AI.pdf
Generative AI for Trailblazers_ Unlock the Future of AI.pdfGenerative AI for Trailblazers_ Unlock the Future of AI.pdf
Generative AI for Trailblazers_ Unlock the Future of AI.pdf
 
Artificial_General_Intelligence__storm_gen_article.pdf
Artificial_General_Intelligence__storm_gen_article.pdfArtificial_General_Intelligence__storm_gen_article.pdf
Artificial_General_Intelligence__storm_gen_article.pdf
 
Atlantic Grupa Case Study (Mintec Data AI)
Atlantic Grupa Case Study (Mintec Data AI)Atlantic Grupa Case Study (Mintec Data AI)
Atlantic Grupa Case Study (Mintec Data AI)
 
Pre-ProductionImproveddsfjgndflghtgg.pptx
Pre-ProductionImproveddsfjgndflghtgg.pptxPre-ProductionImproveddsfjgndflghtgg.pptx
Pre-ProductionImproveddsfjgndflghtgg.pptx
 
一比一原版麦考瑞大学毕业证成绩单如何办理
一比一原版麦考瑞大学毕业证成绩单如何办理一比一原版麦考瑞大学毕业证成绩单如何办理
一比一原版麦考瑞大学毕业证成绩单如何办理
 
2024 Q1 Tableau User Group Leader Quarterly Call
2024 Q1 Tableau User Group Leader Quarterly Call2024 Q1 Tableau User Group Leader Quarterly Call
2024 Q1 Tableau User Group Leader Quarterly Call
 
basics of data science with application areas.pdf
basics of data science with application areas.pdfbasics of data science with application areas.pdf
basics of data science with application areas.pdf
 
一比一原版阿德莱德大学毕业证成绩单如何办理
一比一原版阿德莱德大学毕业证成绩单如何办理一比一原版阿德莱德大学毕业证成绩单如何办理
一比一原版阿德莱德大学毕业证成绩单如何办理
 
Abortion pills in Dammam Saudi Arabia// +966572737505 // buy cytotec
Abortion pills in Dammam Saudi Arabia// +966572737505 // buy cytotecAbortion pills in Dammam Saudi Arabia// +966572737505 // buy cytotec
Abortion pills in Dammam Saudi Arabia// +966572737505 // buy cytotec
 
Data analytics courses in Nepal Presentation
Data analytics courses in Nepal PresentationData analytics courses in Nepal Presentation
Data analytics courses in Nepal Presentation
 

Featured

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Working with api in OpenRefine

  • 1. Working with API in Refine - @magdmartin 1 Working with API
  • 2. Working with API in Refine - @magdmartin 2 Next Meet Up ● Next Meet Up – April 21- 6PM – 7.45PM – May 21 - 6PM – 7.45PM – June 18 - 6PM – 7.45PM ● Pool – Use Case Presentation and learn how other use Refine – Learn a specific set of functionality – Hack session where everybody come with a laptop data to clean.
  • 3. Working with API in Refine - @magdmartin 3 Working with API in Refine ● What is Refine? ● What is an API? ● How to make API call? ● Hands On!
  • 4. Working with API in Refine - @magdmartin 4 Bridge The Technology Gap Domain Expert – Spreadsheet Warriors (split and join, format, transpose, complex formulas, ) Basic Knowledge of Scripting (normalization, parsing, schema alignment, API, fuzzy matching, scheduling) DBA Data Science ETL Engineer Data Clerk – Data Entry Spreadsheet user (filter, sort, manual edition, basic formula) Understand The Data (Business Skills) Know How To Transform Data (Technical Skills)
  • 5. Working with API in Refine - @magdmartin 5 Discovery Wrangling In application feedback (personal usage) Profiling Preparation ad hoc usage reporting - migration Quality Transformation Industralization Integration Measure Check Build - Do Learn Think Plan - Act A Lean Data Model
  • 6. Working with API in Refine - @magdmartin 6 What is an API? ● Each API provider is like a restaurant: – Menu = API – Placing an Order = Executing an API Call – Different food on the menu = Parameters – Food = the System's Response ● Each API have their own rules – Need to register (or not) – How frequently you can make a call – GET or POST request (Refine support only GET) – Price and Service Level Agreement ● See Mashape or ProgrammableWeb to discover API
  • 7. Working with API in Refine - @magdmartin 7 Example of API Provider everythinglocation Verify and Geocode Address Data ● Give an address string ● Returns a validated, parsed and geocoded address Timezonedb free time zone database for cities of the world ● Give a lat/long ● Return timezone and time
  • 8. Working with API in Refine - @magdmartin 8 Making API call Everythinglocation API address key Verify & Geocode Country https://saas.loqate.com/rest/?lqtkey=[APIKEY]&p=v%2Bg&ctry=USA&addr=1111%20bayhill%20drive%20san%20bruno Address Documentation I'd like the following address cleaned, parsed and its long / lat 1111 Bayhill Drive San Bruno
  • 9. Working with API in Refine - @magdmartin 9 Longitude API address Latitude key http://api.timezonedb.com/?lat=53.7833&lng=­1.75&key=<Your_API_Key> Making API call Timezonedb Documentation http://api.timezonedb.com/?lat=53.7833&lng=­1.75&format=json&key=<Your_API_Key> http://api.timezonedb.com/?lat=53.7833&lng=­1.75&key=<Your_API_Key> format In JSON format I'd like the timezone for this coordinate 53.7833 , 1.75
  • 10. Working with API in Refine - @magdmartin 10 Working with API Cheat Sheet ● Create a project with Fortune 1000 data: http://cs.brown.edu/~pavlo/fortune1000/ ● Concatenate the Address: cells['address'].value + ' ' +cells['city'].value + ' ' +cells['state'].value + ' ' +cells['zipcode'].value ● Call Everythinglocation: 'http://saas.loqate.com/rest/?lqtkey=[YOURKEY]&p=v %2Bg&ctry=USA&addr='+value.replace(" ","%20") ● Retrieve only the JSON results value.replace('{"status":"OK","results":[','').replace(']}','') ● Extract Longitude and Latitude value.parseJson()['Longitude'] value.parseJson()['Latitude'] ● Call Timezonedb 'http://api.timezonedb.com/? lat='+cells['Latitude'].value+'&lng='+cells['Longitude'].value+'&key=[YOURKEY]' ● Extract ZoneName value.split('<zoneName>')[1].split('</zoneName>')[0]