Exploratory Data Analysis in R
Mt. Washington, home of some of the world's worst weather: Situated at the intersection of three storm fronts, the summit of Mt. Washington experiences hurricane-force winds and subzero temperatures. Wind gusts of 231 mph were recorded at the summit in 1934, and for many years, that measurement stood as the highest recorded wind speed on Earth (Ben Cosgrove, Time). Yet, Mt. Washington also remains a popular tourist destination and an iconic part of the trail system through the White Mountains of NH.
The Mt. Washington Observatory sits atop the summit of Mt. Washington, and each day, researchers record the weather patterns there (Mt. Washington Observatory). Conveniently, that data is accessible via the NOAA (National Oceanic and Atmospheric Administration), so I decided to take a look.
What follows is an exploration of Mt. Washington's weather patterns since 1948.
I downloaded data from the Mt. Washington Observatory for January 1, 1948 to January 31, 2018. For convenience, I uploaded the data, documentation, and my associated code to my GitHub.
I started by reading in the data and transforming DATE to a date variable. I noticed that in the raw data, 15 dates from January, 1948 were missing. To add those dates back into the dataset, I created a dataframe of all dates between 1/1/1948 and 1/31/2018, then joined it to the original data.
R Code - Get Data
There are several weather type indicators included in the original data, but many of these indicate similar things. For instance, WT01 indicates fog, but may also include heavy fog, which is indicated by WT02. For clarity, I renamed and combined similar indicators.
R Code - Clean Data
Time for some graphs! For these graphs, I decided to limit my observations to data collected after 2014. The dplyr::filter option ensures that R will use the filter function from the dplyr package rather than from stats. I tried out the plotly package, which allows users to create interactive graphs in R.
R Code - Daily Graphs
Daily Minimum Temperatures:
Daily Maximum Temperatures:
One thing that struck me about these temperatures was that there seemed to be considerable seasonal variation, with the summer months experiencing warmer temperatures. However, the daily maximum temperature from 2014 to 2018 never exceeded 70 degrees F. In the winter, minimum temperatures could get as low as -40 degrees F.
Incidentally, -40 degrees F is the same as -40 degrees C.
A look at daily precipitation from 2014-2018:
To take a look at the average temperatures and precipitation at the summit of Mt. Washington by year, I first aggregated the data with the data.table package. This package provides convenient and fast methods for grouping data. For more information, see the package documentation here and a brief tutorial here.
R Code - Yearly Averages
The average yearly maximum temperature has generally stayed in the low 30s, with the average yearly minimum temperature hovering in the low 20s.
In February of 1969, a 100-hour snowstorm swept through the state, dumping over 4 feet of snow on the summit in a single day. Total snowfall during that storm exceed 8 feet (Mike Squires, Climate.gov). This likely contributed to the Mt. Washington's record yearly precipitation of over 130 inches in 1969.
I wanted to take a closer look at peak wind gust and the weather type variables (e.g., fog, thunder, etc.). However, many of these values were missing. So, I took a look at the missing values by finding the proportion of data that was missing each year.
R Code - Proportion of Data Missing Per Year
Peak wind gusts appeared to be regularly recorded between 1980 and 2005, but not during other time periods.
Each weather type variable was an indicator. Hence, if a certain weather type was observed, the indicator was marked as '1,' and if not, the value was left as 'NA.' For instance, if the day was foggy, FOG would be marked 1. Otherwise, FOG would be NA.
This method meant that while we could tell when weather was observed, we could not distinguish between when a weather type variable was missing because
1. That weather type was not observed that day (e.g., there was no fog), or
2. Nothing was recorded for the day (a true NA value).
In particular, the HIGH WIND and THUNDER weather type indicators were missing close to 100% of the time.
We do have a good amount of FOG observations, though. Here's a closer look:
R Code - Fog
This graph suggests that the summit of Mt. Washington experiences fog or mist during at least part of the day during about 75-95% of each year.
The original data from the Mt. Washington Observatory listed 6 different ways to measure the speed of wind. I decided to focus on the peak gust wind speed, where a gust is a sudden increase in wind speed that lasts a short amount of time (see this article for more information). Since most of the data on peak gust wind speeds were collected from 1980-2005, I looked at this time period only.
R Code - Peak Gust Wind Speed
Wind gusts exceeding 80 mph appear to be a regular occurrence on Mt. Washington. No wonder the summit buildings need to be chained down!
All things considered, I consider myself lucky to have climbed Mt. Washington 3 times (twice by foot, once by car). One final image: Sunrise on Mt. Washington.