-
Notifications
You must be signed in to change notification settings - Fork 21
Detailed Instructions
Flow-By-Activity (FBA) datasets are environmental and other data formatted into a standardized table. The data are standardized to enable use for Flow-By-Sector (FBS) table generation.
This example demonstrates creating the 2017 US Department of Agriculture (USDA) Census of Agriculture (CoA) Cropland FBA. The name for the FBA is “USDA_CoA_Cropland_2017.”
-
The first step is to write instructions for where the data can be found in a YAML file. These data are written in a human-readable form and are read in as a pandas dictionary in python. The yaml for USGS_NWIS_WU can be found here, with an explanation of all possible parameters found in the README.
-
The first lines of the YAML are used to generate bibliography information.
-
The next lines indicate if an API key is required and if so, the name of the API key.
-
If an API key is required, a user must generate their own API key (instructions in the wiki) and store the key in a .env file in a user’s MODULEPATH. An example .env file is found in FLOWSA’s example folder, here.
-
Most of the information in the YAML is used to build the URLs called to import data and indicate what form the data is loaded as (json, csv, pdf, etc.). An option within the URLS is to surround a variable name in double underscores to indicate that a string function will dynamically replace the variable when the URLs are built, such as "secLevel".
-
If there are any variables that need replacement in the URL build ("secLevel), the list of strings with which to replace the variable are also listed in the YAML.
-
Although the functions to load, build, and parse Flow-By-Activity datasets are generalized, each FBA requires functions specific to the dataset. These functions are listed in the method yaml.
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