This repository contains the code for the DataViz Battle for the month of March 2019
The interactive visualization is available here, and it was built using R and the packages Shiny, ggplot2 and leaflet.
Every month, the subreddit r/dataisbeautiful/ challenges people across the globe to work with a new dataset. These challenges range in difficulty, filesize, and analysis required. What I love about this competition is the freedom it gives the participants to visualize the dataset. As a matter of fact, this is the only rule you need to follow:
Use the dataset. Work with the data, perform the analysis, and generate a visual. It is entirely up to each participant to decide how to present the visual.
At first, I did an initial exploration of the dataset, looking for any interesting patterns over different years.
Unfortunately, my desire to find relevant correlations over time vanished when I noticed that the "...TMY data set was composed of 12 typical meteorological months that are concatenated without modification to form a single year...", which meant that the year feature was not important at all, and as a result, it had to be ignored and it was not possible to extract patterns over time.
So, once I discarted the "evolution-over-time" plot, I just focused on tyring to give a good understanding of the data through a clear visualization.
TMY3 stations over all United States were included as circle-markers in an interactive map built with the library Leaflet for R. When an station is hovered, information such as name, location, state and class is pop-up. Moreover, when an station is clicked, the server loads the corresponding .csv data file about that station.
The solar radiation data is visualized on three different polar graphs, which are described below. The user can select the variable of interest from the input selector.
Plot | Polar Axis | Radial Axis | Color Axis | |
---|---|---|---|---|
1 | Value along the year | Hour | Value | Day |
2 | Maximum value at each day | Day | Max Value | - |
3 | Value on an specific day | Hour | Value | - |
- R - Programming Language / 3.5.2
- RStudio - IDE for R / 1.1.463
- shiny - Interactive web apps with R / 1.2.0
- ggplot2 - Library for graphics / 3.1.0
- leaflet - Library for interactive maps / 2.0.2
- dplyr - A grammar of data manipulation / 0.7.8
- lubridate - Library for date-times / 1.7.4
- hrbrthemes - Typography-centric themes for ggplot2 / 0.6.0