<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/new-datacamp-course-working-with-web-data-in-r/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://r-posts.com/new-datacamp-course-working-with-web-data-in-r/"> R-posts.com</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>Hi there! We just launched <a rel="nofollow" href="https://www.datacamp.com/courses/working-with-web-data-in-r?tap_a=5644-dce66f&tap_s=10907-287229" target="_blank">Working with Web Data in R</a> by <a rel="nofollow" href="https://www.datacamp.com/instructors/ironholds?tap_a=5644-dce66f&tap_s=10907-287229" target="_blank">Oliver Keyes</a> and <a rel="nofollow" href="https://www.datacamp.com/instructors/cwickham?tap_a=5644-dce66f&tap_s=10907-287229" target="_blank">Charlotte Wickham</a>, our latest R course!</p>
<p>Most of the useful data in the world, from economic data to news content to geographic information, lives somewhere on the internet – and this course will teach you how to access it. You’ll explore how to work with APIs (computer-readable interfaces to websites), access data from Wikipedia and other sources, and build your own simple API client. For those occasions where APIs are not available, you’ll find out how to use R to scrape information out of web pages. In the process, you’ll learn how to get data out of even the most stubborn website, and how to turn it into a format ready for further analysis. The packages you’ll use and learn your way around are <code>rvest</code>, <code>httr</code>, <code>xml2</code> and <code>jsonlite</code>, along with particular API client packages like <code>WikipediR</code> and <code>pageviews</code>.</p>
<p><strong><a rel="nofollow" href="https://campus.datacamp.com/courses/working-with-web-data-in-r/downloading-files-and-using-api-clients?tap_a=5644-dce66f&tap_s=10907-287229" target="_blank">Take me to chapter 1!
<p></p></a>
<p>Working with Web Data in R features interactive exercises that combine high-quality video, in-browser coding, and gamification for an engaging learning experience that will make you an expert in getting information from the Internet!</p>
<p><a rel="nofollow" href="https://www.datacamp.com/courses/working-with-web-data-in-r?tap_a=5644-dce66f&tap_s=10907-287229" target="_blank"><img alt="" src="https://i1.wp.com/res.cloudinary.com/dyd911kmh/image/upload/f_auto,q_auto:best/v1507130930/1200x628_New_Course_ypkpwk.png?w=660" data-recalc-dims="1"></a></p>
<p><strong>What you’ll learn</strong></p>
<p><strong>1. Downloading Files and Using API Clients</strong></p>
<p>Sometimes getting data off the internet is very, very simple – it’s stored in a format that R can handle and just lives on a server somewhere, or it’s in a more complex format and perhaps part of an API but there’s an R package designed to make using it a piece of cake. This chapter will explore how to download and read in static files, and how to use APIs when pre-existing clients are available.</p>
<p><strong>2. Using <code>httr</code> to interact with APIs directly</strong></p>
<p>If an API client doesn’t exist, it’s up to you to communicate directly with the API. But don’t worry, the package <code>httr</code> makes this really straightforward. In this chapter, you’ll learn how to make web requests from R, how to examine the responses you get back and some best practices for doing this in a responsible way.</p>
<p><strong>3. Handling JSON and XML</strong></p>
<p>Sometimes data is a TSV or nice plaintext output. Sometimes it’s XML and/or JSON. This chapter walks you through what JSON and XML are, how to convert them into R-like objects, and how to extract data from them. You’ll practice by examining the revision history for a Wikipedia article retrieved from the Wikipedia API using <code>httr</code>, <code>xml2</code> and <code>jsonlite</code>.</p>
<p><strong>4. Web scraping with XPATHs</strong></p>
<p>Now that we’ve covered the low-hanging fruit (“it has an API, and a client”, “it has an API”) it’s time to talk about what to do when a website doesn’t have any access mechanisms at all – when you have to rely on web scraping. This chapter will introduce you to the <code>rvest</code> web-scraping package, and build on your previous knowledge of XML manipulation and XPATHs.</p>
<p><strong>5. ECSS Web Scraping and Final Case Study</strong></p>
<p>CSS path-based web scraping is a far-more-pleasant alternative to using XPATHs. You’ll start this chapter by learning about CSS, and how to leverage it for web scraping. Then, you’ll work through a final case study that combines everything you’ve learnt so far to write a function that queries an API, parses the response and returns data in a nice form.</p>
<p><strong><a rel="nofollow" href="https://www.datacamp.com/courses/case-studies-in-statistical-thinking?tap_a=5644-dce66f&tap_s=10907-287229" target="_blank">Master web data in R with our course Working with Web Data in R!</a></strong></p>
	<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="http://r-posts.com/new-datacamp-course-working-with-web-data-in-r/"> R-posts.com</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...
<img width="1" alt="" src="http://feeds.feedburner.com/~r/RBloggers/~4/A3n4ZIYNiLg" height="1"></a></div></strong>