GitHub Page: https://github.com/wdavod3/wdavid3_424_Project1
App Description: This application is for looking at the different sources of energy used in the US from 1990 to 2019. When first signing on to the app the first graphic that appears is displaying the data in a stacked bar graph. Looking at the top of the display there are six tabs for the user to click on. When the user clicks on the first five of these tabs they are given two options: EnergyNumbers and Energy Percent. That is because these first five tabs are related to different types of visualisations to display the data. The visualizations either display the data based on the total numbers for each energy source or what percent of the total energy outputted the energy source was. The sixth tab is the about tab to provide the source for the data, a brief description of the data, the author, and the date it was written on.
The first set of visualizations for the data is a stacked bar graph. As mentioned earlier the bar graph displaying the total energy numbers is the default for opening the app. Clicking on the “Stacked Bar Chart” tab the user can switch to displaying the percent instead if they choose. The next tab is “Line Chart” which displays the same data but this time as a line chart. A unique feature of the line charts, though, is the user has the option to check certain boxes to decide on what energy sources they want shown. Initially all the boxes will be checked and all the energy sources will be shown, but the user can uncheck the boxes as they choose and that will then remove that energy source from the display. At the bottom of the check boxes there is a link called “Select All”, but it unfortunately does not do anything. The third tab, “Table Data”, displays the raw data numbers in a table. The only displays fifteen items at a time, but there are buttons at the bottom of the table to show the other data pages. There is also a search feature at the top of the table to let the user filter what they want to look at.
The fourth tab is “State Comparison” and is meant to let the user compare the data based on each state using each of the three previous visualizations. Unfortunately it doesn’t function properly and instead just shows each of the visualizations using one energy source at a time. For this reason the “Select Energy” is the only widget that actually alters the data being shown at all. The last data tab is “Map Comparison” which is supposed to compare to maps of the US filtering the data through a specific year and energy source. Unfortunately the first map can only filter by energy source and the second map can only filter by year.
Data Description: The data used for the app was originally taken from the U.S. Energy Information Association website (https://www.eia.gov/electricity/data/state/). The data included a column that was called “TYPE OF PRODUCER”, which had the categorization of all the different ways the energy sources were produced for the data. For the purpose of the app the only one of interest was “Total Electric Power Industry”, which was the total numbers from all the other types of producers combined into one. So when creating the dataset to use a subset was created to filter all the other types of producers out except for “Total Electric Power Industry”.
The next column where the data had to be filtered was the “ENERGY SOURCES” column which provided the different sources the energy was coming from. For this part of the data it was better to focus on nine core energy sources: Coal, Geothermal, Hydroelectric Conventional, Natural Gas, Nuclear, Petroleum, Solar Thermal and Photovoltaic, Wind, and Wood and Wood Derivative Fuels. These names were later changed to be smaller and therefore easier to read at a glance. All the other energy sources recorded were then filtered out of the dataset once again using a subset. At this point the Total for all the energy sources was still in the data even though it wasn’t one of the core data sources.
Total would later be used for creating a data set that was based on the percent of each energy source rather than the total which was based on megawatt hours (MWh). First the numbers had to be converted from being a character type to integers. To do this the gsub function was used to remove the commas from the numbers and convert them to integers. Next a dataset was created where only the total for each energy source was saved, and then removing the total from the main dataset to be used for the plots. The new dataset and the original dataset were then merged together into the dataset that would hold the percent numbers. The percent dataset had the transform function divide individual energy source numbers by the totals associated with them, and then the percent column was complete.
The last column to clean up was “STATE”. In this column there were sections with empty data. To filter this out a subset was used and all the data had a value. To make the data all similar the function toupper was used to make sure that all the variables were all capital letters.
Interesting Data Finds: Something interesting about the data is how dominant of an energy source coal was up until around 2009. Up until 2009 coal pretty much the source for about half of the energy being produced in the US. In a distant second to coal during this period is nuclear energy which accounted for a little more than twenty-five percent. For at least the 1990s the other twenty-five percent was split up between all of the other sources of energy. It’s around 2000 where the usage of natural gas begins to increase. From that point of natural gas slowly continues to increase. For the 2000s, though, this doesn’t have much of an effect on the percent of coal or nuclear energy as they stay around the same percent as each did respectively in the 1990s. The energy source that declines as a result of natural gas increasing then becomes hydroelectric conventional.
Once the 2010’s are reached the trend of coal’s decline and natural gas’s increase continues. This comes to a head around 2015 where the percentage of coal and natural gas meet at around thirty percent. From that point on natural gas becomes the top source for energy in the US while coal steadily declines. Coal eventually even falls behind nuclear energy around 2019. The 2010s are also interesting because it’s here where the rise of wind energy begins. Wind during the 1990s wasn’t even a source used and it doesn’t seem to become a source until around 2005. Wind was still a pretty minimal source, until the 2010s where it had a vast increase. Wind ends up passing petroleum as one of the top five energy sources for the US and in turn petroleum’s usage also plummets during the 2010s.
What was very interesting about looking at the percent of energy usage was how little solar power contributed. This seems odd especially when taking into consideration that when driving on the highway between states it’s not uncommon for a field full of solar panels. In addition the high schools in my area all have solar panels that are used to power a section of the school. The reason for this might be that installing solar panels can be very expensive.
Looking at the map it’s interesting to see that Illinois doesn’t benefit that much from wind energy when compared to other states. This is kind of funny when considering one of Chicago’s nicknames is “The Windy City” (which is very fitting). The state that seems to benefit the most from wind energy seems to be Texas.