R Web Scraping Quick Start Guide: Techniques and tools to crawl and scrape data from websites
Authors: Olgun Aydin
ISBN-10: 1789138736
ISBN-13: 9781789138733
Released: 2018-10-31
Print Length 页数: 114 pages
Book Description
Web Scraping techniques are getting more popular,since data is as valuable as oil in 21st century. Through this book get some key knowledge about using XPath,regEX; web scraping libraries for R like rvest and RSelenium technologies.
Web scraping is a technique to extract data from websites. It simulates the behavior of a website user to turn the website itself into a web service to retrieve or introduce new data. This book gives you all you need to get started with scraping web pages using R programming.
You will learn about the rules of RegEx and Xpath,key components for scraping website data. We will show you web scraping techniques,methodologies,and frameworks. With this book’s guidance,you will become comfortable with the tools to write and test RegEx and XPath rules.
We will focus on examples of dynamic websites for scraping data and how to implement the techniques learned. You will learn how to collect URLs and then create XPath rules for your first web scraping script using rvest library. From the data you collect,you will be able to calculate the statistics and create R plots to visualize them.
Finally,you will discover how to use Selenium drivers with R for more sophisticated scraping. You will create AWS instances and use R to connect a PostgreSQL database hosted on AWS. By the end of the book,you will be sufficiently confident to create end-to-end web scraping systems using R.
What you will learn
Write and create regEX rules
Write XPath rules to query your data
Learn how web scraping methods work
Use rvest to crawl web pages
Store data retrieved from the web
Learn the key uses of Rselenium to scrape data
contents
1 Introduction to Web Scraping
2 XML Path Language and Regular Expression Language
3 Web Scraping with rvest
4 Web Scraping with Rselenium
5 Storing Data and Creating Cronjob