MulaiMulai sekarang secara gratis

Exploring temperature data

Now that you've learned a bit about your flights data - and reviewed the basics of time series data manipulation - your next assignment is to explore weather patterns in the Boston area to understand what might be affecting flight delays and cancellations. To do this, you'll need to compile and manipulate some additional time series data.

In this exercise, you'll explore some temperature data in the Boston area, including measures of min, mean, and max daily temperature over time. These data were collected using the weatherData package in R, which scrapes publicly available data from Weather Underground.

Before moving forward with your time series data manipulation, the first step in any data analysis is to examine the basic qualities of your data. Specifically, you'll take a closer look at two temperature data objects (temps_1 and temps_2) to understand what information these objects contain and how you should proceed.

Latihan ini adalah bagian dari kursus

Case Study: Analyzing City Time Series Data in R

Lihat Kursus

Petunjuk latihan

  • Use two calls of str() to view the structure of each temperature object: temps_1 and temps_2. Pay close attention to the output!
  • View the first and last few rows of temps_1 using head() and tail().
  • View the first and last few rows of temps_2 using head() and tail(). Do these two objects contain similar data?

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# View the structure of each object
str(___)
str(___)

# View the first and last rows of temps_1
head(___)
tail(___)

# View the first and last rows of temps_2

Edit dan Jalankan Kode