Git Product home page Git Product logo

useeio's Introduction

United States Environmentally-Extended Input-Output (USEEIO) Modeling Framework

A modeling framework for creating versions of the USEEIO model for estimating potential impacts of goods and services in the US economy. This framework supports the Sustainable Materials Management program at US EPA (www.epa.gov/smm), but may also be useful for other purposes. It is built using methods from input-output analysis and life cycle assessment (LCA) that combine industry economic data with data on environmental releases and resources used. A background and description of USEEIO can be found in the original manuscript cited below.

Current platform

useeior. An R package that reads in economic data, houses model configuration files, generates model components, result matrices and price adjustment matrices, and performs model calculations. useeior is used to generate USEEIO models >= v2.0

Supporting software

stateior. An R package that builds Make and Use Input-Output economic model for US states. These support state-specific USEEIO models.

flowsa. A Python package that provides the environmental and employment data in the form of regional totals of flows by North American Industry Classification System (NAICS) industry codes. flowsa in turn gets USEPA facility-based reporting data from StEWI. useeior either uses flowsa directly or uses datasets output from flowsa for environmental data input.

LCIAformatter. A Python package that provides complete life cycle impact assessment methods or life cycle inventory grouping methods in a standard format. useeior either uses the package directly or uses datasets output from LCIAformatter for indicator data input.

Both flowsa and the LCIAformatter draw on the fedelemflowlist Python package to map elementary flows to use the Federal LCA Commons Elementary Flow List to use a standardized set of elementary flows.

Serving the model for web applications

USEEIO API. A Go lang web server for serving USEEIO models. useeior can write USEEIO models out in a format for use on the USEEIO API.

Former platforms

useeiopy and the IO Model Builder are Python packages for assembling model components and writing the model out for serving on the USEEIO API or for use in openLCA. These packages were used for created USEEIO v1 models and are not supported for current USEEIO models. The former framework used to generate USEEIO versions <= 1.2 is still accessible under Releases.

Model Versioning

See the Versioning Scheme for an explanation of USEEIO model version numbers and names.

Citation

If you use USEEIO models for your research, please cite the original paper

Yang Y, Ingwersen WW, Hawkins TR, Srocka M, Meyer DE (2017) USEEIO: A New and Transparent United States Environmentally-Extended Input-Output Model. Journal of Cleaner Production 158:308-318. DOI:10.1016/j.jclepro.2017.04.150 Open access version from PubMed

If you use a specific software for building or calculating a USEEIO model, please cite that software release.

If you use a published dataset for a USEEIO model, please cite that dataset.

Disclaimer

The United States Environmental Protection Agency (EPA) GitHub project code is provided on an "as is" basis and the user assumes responsibility for its use. EPA has relinquished control of the information and no longer has responsibility to protect the integrity , confidentiality, or availability of the information. Any reference to specific commercial products, processes, or services by service mark, trademark, manufacturer, or otherwise, does not constitute or imply their endorsement, recommendation or favoring by EPA. The EPA seal and logo shall not be used in any manner to imply endorsement of any commercial product or activity by EPA or the United States Government.

useeio's People

Contributors

bl-young avatar katrinleinweber avatar moli7 avatar rwashing523 avatar wesingwersen avatar zia-chowdhury avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

useeio's Issues

TiVA datasets are "after redefinitions"

The core models we use in USEEIO use the "before redefinitions" tables. TiVA data are only available "after redefinitions". Will this impact the values for some commodities?

Review ROW country classifications

WL,Saint Lucia,ROW,2487,OthWestHem
WE,West Bank,ROW,5083,MiddleEast
WF,Wallis and Futuna,ROW,6413,AsiaAndPac

These three minor countries are the only contributors to these BEA regions. I'm a bit confused as to why that is and what that does to our RoW emission factor. Note that AsiaAndPac shows up in a contributions by region here, but I doubt that Wallis and Futuna is a good proxy for that

Is is currency_converter correct? Can we find a better alternative for that package??

from currency_converter import CurrencyConverter

I tried to install this from PyPi using pip

pip install currency_converter

It installed the package currency.converter

Upon importing it for the first time i got an error because it depended on zope

I installed zope via pip but it is a whole application server and had a ton of dependencies.

I modified the import line to read

from currency.converter import CurrencyConverter
but the latter is not an object of the former so that didn't work.

Rather than fix this, can we find another package that doesn't have so many dependencies and has been update

FYI @bl-young

Index out of range errors on renaming sectors to USEEIO names

INFO Renaming sectors to USEEIO names in satellite tables...
Traceback (most recent call last):
File "useeiopyExample.py", line 9, in
useeio1pt1 = useeiopy.assemble("USEEIOv1.1")
File "c:\users\wingwers\useeio-public-test-jun7\useeiopy_init_.py", line 63, in assemble
Satellite.renameSatelliteSectors(satcsvfiles, sattablepath)
File "c:\users\wingwers\useeio-public-test-jun7\useeiopy\Satellite.py", line 61, in renameSatelliteSectors
names = read_names(Crosswalkrelpath + '/MasterCrosswalk.csv')
File "c:\users\wingwers\useeio-public-test-jun7\useeiopy\Satellite.py", line 78, in read_names
names[row[6].strip()] = row[8].strip()
IndexError: list index out of range

Non-environment flows lack a category

Under the OpenLCA schema, all objects should be categorized. Flows that are elementary have elementary categories; however, many flows are not categorized. See the following two examples, chosen at random from a recent build:

{
  "@type": "Flow",
  "@id": "0a69c698-a3b0-3945-884c-0a75e5f4a444",
  "name": "1,4-Dichloro-2-butene",
  "flowType": "ELEMENTARY_FLOW",
  "flowProperties": [
    {
      "referenceFlowProperty": true,
      "conversionFactor": 1.0,
      "flowProperty": {
        "@id": "93a60a56-a3c8-11da-a746-0800200b9a66"
      }
    }
  ],
  "category": {
    "@id": "42c9fee0-d374-30e8-b2c5-32fa901a691e"
  }
}
{
  "@type": "Flow",
  "@id": "946a7ad3-1042-3ded-8a7f-8368643372ac",
  "name": "Compensation of employees",
  "flowType": "ELEMENTARY_FLOW",
  "flowProperties": [
    {
      "referenceFlowProperty": true,
      "conversionFactor": 1.0,
      "flowProperty": {
        "@id": "3bf53920-157c-4c2f-bddd-7c92c9d35f10"
      }
    }
  ]
}

EUTR factor wrong for NOx to air

Reported by Zia Chowdury.
EUTR factor for air/unspecified/nitrogen oxides is 0.08.
The correct value from TRACI 2.1 is 0.04429.

Imports of Other and Used gets dropped

t_df = get_tiva_data(year)
corr = (pd.read_csv(conPath / 'bea_imports_corr.csv',
usecols=['BEA Imports', 'BEA Summary'])
.drop_duplicates())
# ^^ requires mapping of import codes to summary codes. These codes are
# between detail and summary.
t_c = (t_df
.reset_index()
.rename(columns={'IOCode': 'BEA Imports'})
.merge(corr, on='BEA Imports', how='left', validate='one_to_many')
.drop(columns='BEA Imports')
.groupby('BEA Summary').agg('sum'))

There are significant imports of Other goods and some of Used goods (see rows from t_df from 2012 these are in million current USD)

IOCode CA CN EU JP MX APAC ROW
Used 2907 325 1456 179 713 360 578
Other 7766 3381 55516 12738 5021 15549 20653

but they get dropped after this merge because they are not in the concordance.

These would account for substantial embodied emissions and need to be handled.

Use satellite.M in place of impacts.M from EXIO 3

Right now we get this characterized matrix ..this is equivalent to our N.

But there is also satellite.M
There are many flows for the major GHGs in satellite.M which is perhaps why we choose a characterized version, however, we are missing some important flows like. We should probably get the unit data as well.
We can use grep on all the flows and get those starting with the major GHGs.

If we use satellite.M we can also get SF6, HFCs (as a group) and PFCs (as a group). It's more complete than the three gases that we are getting now.

Key parameters should be at topic of file or require run with params passed separately

https://github.com/USEPA/USEEIO/blob/c4eb1700cdaf1345a584a81dbf94e74f2e3f8681/import_factors_exio/useeio_imports_script.py#L494C49-L494C49

This script is designed to generate import factors

  1. over a span of year(s)
  2. at a specified BEA level of detail

for 1, these parameter should either be clearly the the top of the file with the other params like the paths and not in this statement, or they should be required as params to be passed to this script upon execution

for 2, it's not that clear yet that this script only works at the Summary level which it appears to do. This needs to be very clear in the notes that it only works for that level.

Improve NAICS year specification for mappings

          > @Jnamovich where did the census NAICS -> BEA mapping come from? it's missing some NAICS that only exist in 2012 but no longer exist in 2017

Good catch. Looks like those data were using 2012 NAICS until 2019 when they switched to 2017 NAICS. If that switch is not described in the data its something we should report to the API maintainers and maintain a config file mapping the source by data year to the right NAICS year and make sure our crosswalk has both like we have here in flowsa under NAICS timeseries

Originally posted by @WesIngwersen in #25 (comment)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.