U.S. Electricity Generation

Posted on May 11, 2020


The United States is the second largest electricity producer in the world, and has made great strides in improving its electricity generation profile over the last 30 years with natural gas accounting for around 40% of the generation sources and renewables at around 10%, and coal at 23%.  This compares favorably to the profile 30 years ago in which the main generation source was coal at more than 50%, natural gas at 12%, and less than 2% from renewable sources.  Nuclear has remained relatively constant over the period at roughly 20%.  This project looks at how the trend is reflected among the individual states. 



The datasets were obtained from the U.S. Energy Information Administration website (www.eia.gov), which maintains various energy related news and information.  The datasets were clean with no missing values and consist of annual generation figures from various sources in megawatt hours (MWh) with the year and state in respective columns.  As the final generation figures for a given year are reported in the follow year, the 2019 figures were preliminary.  Nevertheless, no material changes were expected.  The 2019 figures were combined into the 1990-2018 set for the project.     



The app allows the user to select two years between 1990 and 2019 and two states for comparing electricity generation profiles.  The user has the flexibility to compare a state, or two different states, at two different times; or compare two different state for a given year.  The output graphs show the generation source composition at absolute and relative levels.      


The change in the generation profile is most prominent in some of the largest energy producing states, such as California, Texas, Florida, New York, marked by shift to natural gas to at least 40% complemented by rise in renewable energy, at the expense of coal. 


An interesting development can be seen for the state of Hawaii.  In particular, though the state continued to rely heavily on petroleum as the main source of electricity (90% in 1990 vs. 70% in 2019), its usage of coal increased to about 13% in 2019 (compared to less than 1% in 1990).  The likely reason may be due to the fact that Hawaii has no natural resources and relies on importing its energy sources from the upper 48 states.  And as other states use less coal, Hawaii became a price taker as the cost of coal declined.        


Another notable point can be seen in some smaller states, such as Maine and Vermont, which experienced declining generation capacity over the past 30 years driven by shifting demographics as the younger population moved out of the states for better employment prospects elsewhere.  The changing demographics picture is significant as it is a factor in the state public commissions’ decision in approving utility rates and return allowance for public utilities.  Nevertheless, the generation profile for the two states improved with greater emphasis on renewable sources.           



The declining usage of coal over the years as a generation source at the national level is driven by the changes undertaken at the state level.  The decrease in coal is replaced by increased utilization of natural gas and renewables as the issue of climate change comes to the discussion foreground.  What is interesting about the U.S. renewables space is that it is driven mostly by the state mandates and initiatives as the federal tax credits are expiring.  Given the current form of the project, I would like to revisit it and add in summary statistics that would provide the user with further insight into the data.  Overall, it was an invaluable experience in learning about working with the R Shiny app.


About Author

Peter Liu

Peter Liu has more than 14 years of experience in corporate credit risk management and held various financial analytics positions. He has an MBA and a BA in mathematics.
View all posts by Peter Liu >

Leave a Comment

No comments found.

View Posts by Categories

Our Recent Popular Posts

View Posts by Tags

#python #trainwithnycdsa 2019 airbnb Alex Baransky alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus API Application artist aws beautiful soup Best Bootcamp Best Data Science 2019 Best Data Science Bootcamp Best Data Science Bootcamp 2020 Best Ranked Big Data Book Launch Book-Signing bootcamp Bootcamp Alumni Bootcamp Prep Bundles California Cancer Research capstone Career Career Day citibike clustering Coding Course Demo Course Report D3.js data Data Analyst data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization Deep Learning Demo Day Discount dplyr employer networking feature engineering Finance Financial Data Science Flask gbm Get Hired ggplot2 googleVis Hadoop higgs boson Hiring hiring partner events Hiring Partners Industry Experts Instructor Blog Instructor Interview Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter lasso regression Lead Data Scienctist Lead Data Scientist leaflet linear regression Logistic Regression machine learning Maps matplotlib Medical Research Meet the team meetup Networking neural network Neural networks New Courses nlp NYC NYC Data Science nyc data science academy NYC Open Data NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time Portfolio Development prediction Prework Programming PwC python Python Data Analysis python machine learning python scrapy python web scraping python webscraping Python Workshop R R language R Programming R Shiny r studio R Visualization R Workshop R-bloggers random forest Ranking recommendation recommendation system regression Remote remote data science bootcamp Scrapy scrapy visualization seaborn Selenium sentiment analysis Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau team TensorFlow Testimonial tf-idf Top Data Science Bootcamp twitter visualization web scraping Weekend Course What to expect word cloud word2vec XGBoost yelp