Project 1

Project 1 can be seen here


Project 1 demo video is here

  • Home

  • Projects


Introduction

This project was made with the purpose of viewing and comparing different energy sources across the US with different visualizations.


Using the web application is actually super simple. Navigation to the page, you are brought to the main dashboard of the page.

On the left, you can see the filters you can apply to the visualization on this page. Selecting "All" will show all the energy sources on the visualizations and will override any energy source selections you have made. To select the energy sources to show, first uncheck the "All" box and make your selections. The visualizations will immediately update upon selection.


Moving to the Compare page, there is not much to see because it is not fully implemented yet. This will be updated in the future to show two regions on the page. Both regions will have filters to select between a year, a state, and an energy source to show on the visualizations. Both regions will also have a box with tabs that will contain all 6 visualizations on each side of the screen since 12 might be a little too much for 15" 1920*1080 screen.


Clicking on Map, you will be brought to a page with 4 maps, each being a heat map.

This page has two regions (left and right) and each region has a filter on the side. Each filter allows you to select between year and energy source with both showing up in its respective region. The two maps in each region has a US heatmap that shows the total number of the chosen energy source in each state on that year, and the percentage of each energy source in each state on a given year.

Data


Data Origin

The data used all comes from this website. The name of the data on the site is "Net Generation by State by Type of Producer by Energy Source"

Data Info

The data has columns containing year, state, type of producer, energy source, and generation (in MWh).

Data Cleaning

In order to get the data ready for use in the program, I had to do some data cleaning.

In the data, there were some empty state identifiers, so there was no choice but to remove those rows from the data. The generation column was in string format with commas, so I had to remove the commas from the data and convert the strings to numeric values. In the state column, some of the identifiers were in lower case and most of them were in upper case, so I converted the whole column to upper case. There were negative generation values in generation column, so I decided to only include the values that were non-negative. For this project, we were only working with certain energy sources, so I removed the rows with the following energy sources: other, other gases, other biomass, and pumped storage. In order to make the data easier to process, I renamed several factors in the energy sources map to something shorter. Finally, I removed all the rows with the "total" energy source and rows that didn't have "total electric power industry" since the visualizations were not concerned with anything outside of that.

One important thing to note is that all percentages were calculated since there was no column that had percentages in certain contexts.

Running the Program

  1. Download the source code from Github here

  2. Download and install RStudio here

  3. Once RStudio is installed, we need to install some packages. In the console, type and press enter on the following

    1. install.packages("shiny")

    2. install.packages("shinydashboard")

    3. install.packages("ggplot2")

    4. install.packages("usmap")

  4. Once the libraries are installed, we can run the application by pressing "Run App" on the upper right corner of the text window. This button appears because rstudio detects that your code is a shiny app. A window will open and your application will be running on your local ip address!

Interesting Finds

With the recent talks about green energy, I wanted to see how far green energy has done compared to coal, and the results were surprising. Coal has had a declining presence since 2008, with nuclear, solar, and wind on the rise. Nuclear energy has had a strong presence in the clean energy field, but it has plateaued in the last decade.

Another thing I noticed is that gas energy has had a very strong uptick in generation, resulting in gas overtaking coal as the top producer in 2015-2016.

I wanted to see if region had anything to do with type of energy source, and I noticed that several states are powerhouses in certain energy sources. Texas is huge in coal and wind, Illinois is huge in nuclear production, and California is huge with solar and geothermal energy. The southeast region is a huge producer of wood energy.