How a country powers itself reveals its policy and economic priorities

Posted on May 7, 2018

Energy is a core sector

Businesses from agriculture to tech rely on energy. Governments often generate or own power plants as well as craft energy policy. Expanding the energy sector while reducing greenhouse gas emissions for a power-hungry planet has been a topic of discussion for the past several decades.

Understanding how a country generates its power in a case study can lead to trade insights for a given region. Emerging trends also highlight policy priorities.

To that end, I built an interactive web app that could be used by economists and policymakers alike to support their own efforts to explore global electricity trends.

The UN Energy Statistics Database

The United Nations Statistics Division has collected energy-related information and shared it through the Energy Statistics Database inย the UNdata portal. I came across this dataset on Kaggle, where I downloadedย energy statistics data for this app.

I focused on electric capacity from this rich dataset because a power plant represents a significant capital expenditure (as either a public or private sector investment) and profit margins are tight. In other words, power plants have to operate efficiently over many years to be profitable - implying consistent use. Building a certain type of power plant also represents a significant, long-term commitment to that energy strategy.

The Electricity Explorer app

Scatterplot of changes in electric capacity by country

Selecting countries in the Electric Explorer app

A country's absolute vs relative net changes in electricity power plant capacity is visualized on the first tab. Users can search for trends and countries they are curious about by brushing over points on the graph that identify countries below. Countries with high absolute capacity changes, like the USA, China and India, are on the far right of this graph. Countries that have significantly increased their relative capacity are on the top of this graph, like the Maldives.

Alternative energy development

Changes in alternative energy capacity over time is visualized on the second tab.ย I calculated an index that reflects the amount of alternative electricity capacity normalized by total electricity capacity. Clicking the play button animates this graph, showing changes in this distribution by year.

Many countries have relied heavily on energy production from combustible fuels, so these distributions are skewed. Over time, distributions shift for most regions - possibly due to international efforts toย expand alternative energy initiatives. The Oceania region appears to exhibit the most dramatic investment in alternative energy electricity capacity.

Breaking down capacity by country

Germany electric power capacity by type, 1999 - 2014

Germany has invested in wind, and more recently, solar power capacity

Previous tabs enable the user to quickly explore countries and regions for changes in electricity capacity - leading to questions about particular countries. On the third tab, the user can select or type in a country of interest. This generates a graph which breaks down electric capacity in detail: fossil fuels, solar, wind, nuclear, and so on.

Some interesting trends to check out include:

  • Japan increasing solar investment as nuclear power lagged after the Fukushima disaster in 2011
  • Italy replacing some of its combustible electric plant capacity with solar
  • Norway relying on hydrothermal for decades, but increasing combustible power plant capacity up to 2010


I built an app designed to help users interested in electricity to quickly learn about a country they are interested in. This app helps initiate more questions about energy policy and trade. These questions can be answered through targeted, follow-up investigation of the larger UN Energy Statistics Database. Check the app out here, and thanks for reading.

About Author

Michael Caballero

Michael Caballero is a Data Science Fellow at NYCDSA who loves tackling interdisciplinary challenges. He has deployed multiple interactive web apps incorporating data analysis, visualization, and recommender systems. Michael attributes his award winning communication skills to his time...
View all posts by Michael Caballero >

Related Articles

Leave a Comment

No comments found.

View Posts by Categories

Our Recent Popular Posts

View Posts by Tags

#python #trainwithnycdsa 2019 2020 Revenue 3-points agriculture air quality airbnb airline alcohol Alex Baransky algorithm alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus ames dataset ames housing dataset apartment rent API Application artist aws bank loans 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 boston safety Bundles cake recipe California Cancer Research capstone car price Career Career Day citibike classic cars classpass clustering Coding Course Demo Course Report covid 19 credit credit card crime frequency crops D3.js data data analysis Data Analyst data analytics data for tripadvisor reviews data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization database Deep Learning Demo Day Discount disney dplyr drug data e-commerce economy employee employee burnout employer networking environment feature engineering Finance Financial Data Science fitness studio Flask flight delay gbm Get Hired ggplot2 googleVis H20 Hadoop hallmark holiday movie happiness healthcare frauds higgs boson Hiring hiring partner events Hiring Partners hotels housing housing data housing predictions housing price hy-vee Income Industry Experts Injuries Instructor Blog Instructor Interview insurance italki Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter las vegas airport lasso regression Lead Data Scienctist Lead Data Scientist leaflet league linear regression Logistic Regression machine learning Maps market matplotlib Medical Research Meet the team meetup methal health miami beach movie music Napoli NBA netflix Networking neural network Neural networks New Courses NHL nlp NYC NYC Data Science nyc data science academy NYC Open Data nyc property NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time performance phoenix pollutants Portfolio Development precision measurement prediction Prework Programming public safety PwC python Python Data Analysis python machine learning python scrapy python web scraping python webscraping Python Workshop R R Data Analysis 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 seafood type Selenium sentiment analysis sentiment classification Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau teachers team team performance TensorFlow Testimonial tf-idf Top Data Science Bootcamp Top manufacturing companies Transfers tweets twitter videos visualization wallstreet wallstreetbets web scraping Weekend Course What to expect whiskey whiskeyadvocate wildfire word cloud word2vec XGBoost yelp youtube trending ZORI