Skip to content

Using StEWI

Wesley Ingwersen edited this page Sep 22, 2021 · 7 revisions

The current version is designed to be run via an IDE (integrated development environment) or accessed from the command line. Python for Windows comes with IDLE and can be used, or another IDE supporting Python can be used.

Generate an inventory in StEWI

StEWI will attempt to access a locally generated inventory. If none exists, the appropriate data will be downloaded and all inventory files for that datasource and year will be created (i.e., facility, flow, flowbyfacility, and flowbyprocess (if applicable))

import stewi

year = 2017
tri = stewi.getInventory('TRI', 2017)

See the examples directory for .py files examples that can be run in an IDE after StEWI is installed.

See the Docstrings for the reference documentation for the primary functions.