us-grid-emissions
is an IF plugin that calculate the carbon emissions per hour amongst all US balancing authorities.
The emissions
value in the output is measured by multiplying the hourly net generation for an energy sourcing, multiplying it by its emissions factor, and adding these values for each energy source together.
The EIA API fuel-type-data endpoint is what's used to retrieve the hourly generation by energy source.
export EIA_API_KEY=<secret>
- make install
- This performs the npm build steps.
- make test
- This will run the test suite.
- make test_example
- This will run the example file using the Impact Framework.
- Build and link the plugin from your local source (you need to do this each time you make a change)
npm install
npm run build
npm link
- Set up the manifest file
cp sample-input.yml test.yml
- Make changes to the inputs in test.yml based on the date range and BA for which you're seeking the carbon emissions.
- Configure connection to EIA API with an API key set up as an environment variable as mentioned in Required Environment Variables. Navigate here to register for an EIA API key if you do not already have one.
- Run the plugin with
if-run --manifest test.yml
- Run tests with
npm test.