Turning travel data into tidy data

Turning travel data into tidy data

In the previous posts we walked though the basics of reading in the data, quickly plotting some variables, and creating flags to help with future analysis.  Now we’re going to transform the data in to tidy format so that we have variables in columns, observations in rows, and only one type per dataset.  You can learn more about this format here. First, we’ll use the library called ‘reshape2’ to pivot the dataset called temps on the variable named “MST”, making it…

Read More Read More

Creating flag variables in R programming

Creating flag variables in R programming

Now that we’ve gone through the first steps of analyzing our weather data to find the optimal time to travel to Sedona it’s time to create some new variables to help identify the optimal days based on a variety of factors. First, we’re going to create some flags to identify which days have the desired characteristics for Temperature, Visibility, Humidity, and Precipitation.

Improving Weather Analysis Graphs with R programming

Improving Weather Analysis Graphs with R programming

Yesterday’s post got us through a basic box plot of the average temperatures in Sedona to help us continue to evaluate the best time of year to go based on my personal preferences for the weather.  Today I’m going to clean up that chart and make it a little nicer to look at and easier to analyze.  To do that, I’m using a very common package in R called ‘ggplot2‘. First, I’m going to define the graph item by telling…

Read More Read More