Skip to content
slacgismoPublic

About

Residential Energy Consumption Survey data access

Resources

Stars

0 stars

Watchers

3 watching

Forks

Latest commit

 

History

13 Commits

Folders and files

Repository files navigation

Residential Energy Consumption Survey data access

This package downloads and organizes access to the EIA RECS database.

Examples

Housing Characteristics

The following example illustrates accessing the HC tables. These are based on the following context:

>>> import eia_recs
>>> hc = HousingCharacteristics(table="1.1")

Example 1: Getting all the top-level keys

>>> hc.find('data')
[['total', 'fuel-used', 'electric-end-use', 'natural-gas-end-use', 'wood-end-use', 'fuel-oil-end-use'], ['total', 'unit-type']]

Example 2: Getting a single top-level value

>>> hc.find('data',['total'],['total'])
118.2e6

Example 3: Getting a single sub-level value

>>> hc.find('data',['total'],['unit-type','single-family-detached'])
>>> 73.9e6

Example 4: Getting the available keys

>>> hc.find('data',['electric-end-use','space-heating'],['total']),
>>> [['total', 'main', 'secondary'], 'B']

Microdata

The following example illustrates accessing the microdata. These are based on the following context:

>>> import eia_recs
>>> md = Microdata()

Example 4: Getting a single value

>>> md["LPXBTU"][0]
>>> 91.33

About

Residential Energy Consumption Survey data access

Resources

Stars

0 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages