Skip to content
electric activity by US state
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


electric activity by US state

MIT-Lic Build Status

This repository contains all the code and data that went into my analysis of the electric usage in the United States by state.

###Directory Descriptions

  • code All of the python code used in the analysis
  • data All of the data sources used in the analysis
  • tableau the tableau workbooks used in the analysis. The workbooks and resulting dashboards can also be viewed on my Tableau Public page:

###File Descriptions

  • ####code
  • The main routine for combining and cleaning the data sets used in this analysis. There are no input arguments, and it contains just a few simple commands using the pandas and re libraries. Some examples are shown below.
    • To extract the data from the US Energy Information Administration used in the creation of the electricRatesByState201411.twb Tableau workbook:
import electricPrice as ep
dfr = ep.getEiaRates()

where dfe is a pandas DataFrame containing the entirety of the Table 5.06 B excel spreadsheet from the US EIA monthly reports.

- To read in the population data from the US Census Bureau that is in csv format as a pandas DataFrame:
import electricPrice as ep
dfp = ep.getUscbData()

- To calculate the average fraction of income spent on electric and save the results as a csv file to be imported into Tableau:
import electricPrice as ep
  • ####data

  • see data/ for file descriptions.

  • ####tableau

  • see tableau/ for file descriptions.

###License All code in this repository is licensed under an MIT license. See LICENSE for more information.

You can’t perform that action at this time.