Loved by learners at thousands of companies
In this course, you will strengthen your knowledge of time series topics through interactive exercises and interesting datasets. You’ll explore a variety of datasets about Boston, including data on flights, weather, economic trends, and local sports teams.
You've been hired to understand the travel needs of tourists visiting the Boston area. As your first assignment on the job, you'll practice the skills you've learned for time series data manipulation in R by exploring data on flights arriving at Boston's Logan International Airport (BOS) using xts & zoo.Review xts fundamentals50 xpIdentify the time series50 xpFlight data100 xpPick out the xts object50 xpEncoding your flight data100 xpManipulating and visualizing your data50 xpExploring your flight data100 xpVisualize flight data100 xpCalculate time series trends100 xpSaving and exporting xts objects50 xpAssessing flight trends50 xpSaving time - I100 xpSaving time - II100 xp
In this chapter, you'll expand your time series data library to include weather data in the Boston area. Before you can conduct any analysis, you'll need to do some data manipulation, including merging multiple xts objects and isolating certain periods of the data. It's a great opportunity for more practice!Merging time series data by row50 xpExploring temperature data100 xpNext steps - I50 xpMerging using rbind()100 xpVisualizing Boston winters100 xpMerging time series data by column50 xpSubsetting and adjusting periodicity100 xpGenerating a monthly average100 xpUsing merge() and plotting over time100 xpAre flight delays related to temperature?50 xpTime series data workflow50 xpNext steps - II50 xpExpanding your data100 xpAre flight delays related to visibility or wind?50 xp
Now it's time to go further afield. In addition to flight delays, your client is interested in how Boston's tourism industry is affected by economic trends. You'll need to manipulate some time series data on economic indicators, including GDP per capita and unemployment in the United States in general and Massachusetts (MA) in particular.Handling missingness50 xpExploring economic data100 xpReplace missing data - I100 xpReplace missing data - II100 xpEstimating missing GDP50 xpLagging and differencing50 xpExploring unemployment data100 xpLagging unemployment100 xpDifferencing unemployment100 xpRolling functions50 xpAdd a discrete rolling sum to GDP data100 xpAdd a continuous rolling average to unemployment data100 xpManipulating MA unemployment data100 xp
Having exhausted other options, your client now believes Boston's tourism industry must be related to the success of local sports teams. In your final task on this project, your supervisor has asked you to assemble some time series data on Boston's sports teams over the past few years.Advanced features of xts50 xpEncoding and plotting Red Sox data100 xpCalculate a closing average100 xpCalculate and plot a seasonal average100 xpCalculate and plot a rolling average100 xpIndexing commands in xts50 xpExtract weekend games100 xpCalculate a rolling average across all sports100 xpViewing sports trends50 xpCongratulations50 xp
DatasetsFlights arriving at Boston Logan airportBoston monthly average visibilityWind speeds in BostonBoston monthly temperature dataUS and Massachusetts unemploymentUS GDP dataBoston-area sports teams data
PrerequisitesManipulating Time Series Data with xts and zoo in R
Lore DirickSee More
Director of Data Science Education at Flatiron School
Lore is a data scientist with expertise in applied finance. She obtained her PhD in Business Economics and Statistics at KU Leuven, Belgium. During her PhD, she collaborated with several banks working on advanced methods for the analysis of credit risk data. Lore formerly worked as a Data Science Curriculum Lead at DataCamp, and is and is now Director of Data Science Education at Flatiron School, a coding school with branches in 8 cities and online programs.
Matt IsaacsSee More
Political Science PhD interested in data science in defense, security, and international relations
Matt Isaacs is a former Course Development Intern at DataCamp . Matt holds a PhD in Political Science from Brandeis University and has extensive experience in applied data science across the public sector with a focus on analytics in defense, security, and international relations.