From the course: R Essential Training: Wrangling and Visualizing Data

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Importing XML data

Importing XML data

From the course: R Essential Training: Wrangling and Visualizing Data

Start my 1-month free trial

Importing XML data

- [Instructor] If you ever work with data from the web you will often work with hierarchically structured data. That is nested levels of data and one of the most common ways of storing this data is with XML files, which stands for Extensible Markup Language. And I want to show you how you can take that nested structure and turn it into the kind of rectangular data frame that works very well in R. To do this, I'm going to start by loading a few packages, including this one, XML2R. And that's going to give us some specialized functions for retrieving, wrangling, working with XML data. Now, the datasets that I'm going to use are from a data site called ergast.com. And I'm going to go to that website right here. And this contains information about Formula One series racing, motor racing. But it's actually designed as a way of developers to start working with things like XML data. And I specifically want to use this page.…

Contents