Skip to content

Instantly share code, notes, and snippets.

View WesIngwersen's full-sized avatar

Wesley Ingwersen WesIngwersen

  • Tucker, GA USA
  • 15:02 (UTC -04:00)
View GitHub Profile
@WesIngwersen
WesIngwersen / write_IPCC_from_lciafmt.py
Last active November 23, 2024 01:00
Write IPCC GWPs to csv and openLCA schema JSON-LD
# -*- coding: utf-8 -*-
"""
Retrieve IPCC global warming potential factors in kg CO23 per kg GHG using LCIA Formatter
Map to FEDEFL
Write out with all relevant FEDEFL flows to openLCA schema JSON-LD
Simplify and condense table and write to csv
Output available at http://doi.org/10.23719/1529821
"""
# See https://github.com/USEPA/LCIAformatter/ to install LCIA formatter (lciafmt)
@WesIngwersen
WesIngwersen / StateImportExportfromStateIO.Rmd
Last active October 30, 2023 18:19
State Import Export Data for a Given Year from StateIO Models
---
title: "State Import Export Data for a Given Year from StateIO Models"
author: "Wesley Ingwersen"
date: "2023-10-30"
output:
md_document:
variant: gfm
params:
year: 2020
---
@WesIngwersen
WesIngwersen / gist:3026cf55a30e8f247d8bd7f02f62cbaa
Last active August 14, 2023 16:58
Demonstrating the useeior adjustment procedure for satellite totals to create coefficients in the form of physical value per IO table dollar year

For this example I am running the model "USEEIOv2.1.19-GHG". I'd like to see what happens to the coefficient for Carbon dioxide from the Electric power industry. For convenience I worked right in the pulled useeior code (master branch) and I put the model spec file for that model into the useeior/inst/extdata/modelspecs folder.
Instead of loading the built useeior library, I use devtools to load_all() the functions and data in the package

For building the model, I just first want to run the initial steps to get what is needed for this example.

modelname <- "USEEIOv2.1.19-GHG"