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

Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get CytotecAbortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
HyderabadDolls
 
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
gajnagarg
 
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
gajnagarg
 
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
nirzagarg
 
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
nirzagarg
 
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
Health
 
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
gajnagarg
 
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
gajnagarg
 
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
nirzagarg
 

Recently uploaded (20)

Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get CytotecAbortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get Cytotec
 
Ranking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRanking and Scoring Exercises for Research
Ranking and Scoring Exercises for Research
 
Dubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls DubaiDubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls Dubai
 
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
 
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
 
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
 
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
 
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
 
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptxRESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
 
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
 
Statistics notes ,it includes mean to index numbers
Statistics notes ,it includes mean to index numbersStatistics notes ,it includes mean to index numbers
Statistics notes ,it includes mean to index numbers
 
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
 
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
 
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
 
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
 
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
 
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Vadodara [ 7014168258 ] Call Me For Genuine Models ...
 
7. Epi of Chronic respiratory diseases.ppt
7. Epi of Chronic respiratory diseases.ppt7. Epi of Chronic respiratory diseases.ppt
7. Epi of Chronic respiratory diseases.ppt
 
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
 
Digital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham WareDigital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham Ware
 

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]