Notice: EIA will discontinue support for its legacy API (APIv1) in November, 2022. Excel add-in v1 sheets will continue to function as they are. Please refer to our documentation for the APIv2 interaction methods and our APIv2 query browser to view the data.
EIA Map and Related Details Widget Preview and Instructions
HTML for the embedded visualizationCopy and paste the following HTML into your web page:
<iframe id="eia_widget" style="width: 100%; height: 500px;" src="//www.eia.gov/opendata/v1/embed/iframe.php?api_key=YOUR_KEY_HERE&geoset_id=ELEC.SALES.all.A&map=us_merc_en&relation_id=ELEC.SALES.ALL.A|ENDSEC®ions=USA-MO&relation_mode=line"></iframe>
Note modify the width and height style to size the visualization on your web page.
Modify visualization settings:
Licenses and Source Code
The EIA visualization libary's source code is available on github.com/eiagov. Users are invited to fork the code and submit improvements and new features.