-
Notifications
You must be signed in to change notification settings - Fork 19
Using FLOWSA
Datasets from flowsa are saved as parquets in one of two formats, either as a Flow-By-Activity or a Flow-By-Sector. Follow the respective links for a list of available datasets.
flows: represent the physical movement of material, energy, entities or money as input or output to or between activities. The terms flows comes from life cycle assessment (ISO 14044).
sectors: generally these are economic sectors generating economic activity, but are extended here to include households and institutional end users. Using the BEA definitions in input-output tables, these can be either industries or commodities.
attribution: The sectors through which activity uses, produces or receives the flows (input or output).
Flow-By-Sector method YAMLs and activity sets can be stored and run outside the FLOWSA repository. The files require a specific directory structure, where method YAMLs are stored in a "flowbysectormethods" folder and activity sets are stored in "flowbysectoractivitysets" folder within the same parent folder. See the HIO GitHub repository for an example of how to structure externally saved FBS methods.
To create some Flow-By-Activity datasets, a user must register and create a personalized API key. The API key must be saved within a manually created '.env' file labeled 'API_Keys.env' and stored in FLOWSA'S modulepath(flowsa.settings.MODULEPATH
). See the examples folder for the setup of the ".env" file. All ".env" files are added to "gitignore" and should never be uploaded to GitHub.
Flow-By-Activity datasets that require an API key:
- Census_CBP
- Census_PEP_Population
- USDA_ACUP_Fertilizer
- USDA_ACUP_Pesticide
- USDA_CoA_Cropland
- USDA_CoA_Cropland_NAICS
- USDA_CoA_Livestock
- USDA_IWMS
To create an API key for:
- Flow-By-Activity parquets
- Flow-By-Sector parquets
- Metadata JSON
- General Log
- Validation Log
If you encounter the error "pkgresoures.DistributionNotFound: The 'flowsa' distribution was not found and is required by the application":
- In the command line, change directory to parent directory for github projects
- Run: pip install -e flowsa
If you are coding as a developer and get errors importing functions from fedelemflowlist, esupy, or StEWI, install editable packages
- In the command line, change directory to parent directory for github projects
- Run: pip install -e Federal-LCA-Commons-Elementary-Flow-List
- Run: pip install -e esupy
- Run: pip install -e standardizedinventories
flowsa is developed and maintained by Office of Research & Development (ORD), Center for Environmental Solutions & Emergency Response (CESER), Land Remediation & Technology Division (LRTD), Environmental Decision Analytics Branch (EDAB), U.S. Environmental Protection Agency, Cincinnati, OH 45268. See OMB Memorandum M-16-21 Section 4 & Releasing Open Source Code.
Objectives
Projects Using FLOWSA Output
Install & Run
Example Code
Reading Parquet Files
Using FLOWSA
Loading External FBS Method YAMLs
API Keys
Troubleshooting
Contributing
Creating a Flow-By-Activity Dataset
Creating a Flow-By-Activity Crosswalk
Creating a Flow-By-Sector Dataset
FBA and FBS Naming Convention
NAICS Crosswalk
Available Data
Flow Classes
Flow-By-Activity Datasets
Flow-By-Sector Datasets
Data Storage
EPA's Tools for Industrial Ecology
Suggested Citations for FLOWSA and FBS Data
Publications and Presentations
Acknowledgements