Browsed by
Tag: R Basics

Using R, ggplot2, and ggthemes to analyze seasonality of National Park Visits

Using R, ggplot2, and ggthemes to analyze seasonality of National Park Visits

The last posts have analyzed visitation to sites within four southeastern National Parks using waffle charts.  Now, I want to dig deeper into the seasonality of those visits to help pinpoint the best time to take a vacation there based on my own preferences for smaller crowds. We’re going to continue using the visits data table created in the last post. Using dplyr we are going to transform the data to be grouped by park and month. #Seasonality of National…

Read More Read More

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.