CommencerCommencer gratuitement

Flight data

Now that you're back in the time series mindset, it's time to get to work! Your task is to understand the travel patterns of tourists visiting Boston. As a first step, you've been assigned to explore patterns in flights arriving at Boston's Logan International Airport (BOS). In this exercise, you'll view the structure and qualities of some data in preparation for time series manipulation.

Lucky for you, the U.S. Bureau of Transportation Statistics provides open source data on flight arrival times. The flights data file has been preloaded in your workspace.

This course touches on a lot of concepts you may have forgotten, so if you ever need a quick refresher, download the xts in R Cheat Sheet and keep it handy!

Cet exercice fait partie du cours

Case Study: Analyzing City Time Series Data in R

Afficher le cours

Instructions

  • Explore the structure of flights using str() to understand the information contained in the data file.
  • View the first 5 rows of flights using head() to get a feel for what the data look like.
  • The first step in preparing an object for conversion to xts is to ensure that the time/date column is in a proper time-based format. Check the class of the relevant column in flights using class().

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

#View the structure of the flights data


#Examine the first five rows of the flights data
head(___, n = ___)

#Identify class of the column containing date information
class(___)
Modifier et exécuter le code