introd u ction working with web data in r
play

Introd u ction : Working With Web Data in R W OR K IN G W ITH W - PowerPoint PPT Presentation

Introd u ction : Working With Web Data in R W OR K IN G W ITH W E B DATA IN R Oli v er Ke y es & Charlo e Wickham Instr u ctors Working w ith Web Data in R Do w nloading les and u sing speciali z ed packages to get data from w eb


  1. Introd u ction : Working With Web Data in R W OR K IN G W ITH W E B DATA IN R Oli v er Ke y es & Charlo � e Wickham Instr u ctors

  2. Working w ith Web Data in R Do w nloading � les and u sing speciali z ed packages to get data from w eb httr package to q u er y APIs u sing GET() and POST() JSON and XML : data formats commonl y ret u rned CSS to na v igate and e x tract data from w ebpages WORKING WITH WEB DATA IN R

  3. Importing data from a URL read.csv("http://website.url/remote-file.csv") WORKING WITH WEB DATA IN R

  4. Do w nloading data from a URL download.file( url = "http://website.url/remote-file.csv", destfile = "local-file.csv" ) WORKING WITH WEB DATA IN R

  5. Let ' s practice ! W OR K IN G W ITH W E B DATA IN R

  6. Understanding Application Programming Interfaces W OR K IN G W ITH W E B DATA IN R Oli v er Ke y es Instr u ctor

  7. Application Programming Interfaces " Websites , b u t for machines " Can be u sed to e x pose data a u tomaticall y Lets y o u make q u eries for speci � c bits of that data WORKING WITH WEB DATA IN R

  8. API Clients Nati v e ( in R !) interfaces to APIs Hides API comple x it y Lets y o u read data in as R objects WORKING WITH WEB DATA IN R

  9. Using API Clients Al w a y s u se a client if y o u can Find them b y googling " CRAN [ name of w ebsite ]" Onl y w rite code y o u ha v e to w rite WORKING WITH WEB DATA IN R

  10. page v ie w s library(pageviews) article_pageviews(article = "R_(programming_language)") WORKING WITH WEB DATA IN R

  11. Let ' s practice ! W OR K IN G W ITH W E B DATA IN R

  12. Access Tokens and APIs W OR K IN G W ITH W E B DATA IN R Charlo � e Wickham Instr u ctor

  13. API etiq u ette O v er w helming the API means y o u can ' t u se it O v er w helming the API means nobod y else can u se it APIs iss u e " access tokens " to control and identif y u se WORKING WITH WEB DATA IN R

  14. Getting access tokens Us u all y req u ires registering y o u r email address Sometimes pro v iding an e x planation E x ample : h � ps ://www.w ordnik . com / w hich req u ires both ! WORKING WITH WEB DATA IN R

  15. birdnik birdnik a package that w raps the Wordnik API Pro v ide API ke y in key arg u ment in birdnik f u nctions WORKING WITH WEB DATA IN R

  16. Let ' s practice ! W OR K IN G W ITH W E B DATA IN R

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend