Code Monkey home page Code Monkey logo

ei-mcoe-map's Introduction

ei-mcoe-map

Compile data to generate an interactive map of fossil generators and their marginal cost of electricity

You will need to obtain API keys from FRED and EIA in order to access the inflation data and monthly historical fuel costs by state, which are used in the analysis.

Store these API keys in environment variables named API_KEY_EIA and API_KEY_FRED so that the software has access to them. You can also set the environment variables within the "Setup" section of the Jupyter notebook.

Note: the MCOE output uses EIA NEMS data to estimate the split between fixed and variable O&M costs. This data is stored in the inputs directory. We've only extracted the 2019 NEMS data, so 2019 is currently being used to estimate the 2020 O&M costs. Which year the 2019 data is associated with is determined by NEMS_YEAR in ei_mcoe.py.

Installation

To install the software in this repository, clone it to your computer using git. If you're authenticating using SSH:

git clone [email protected]:catalyst-cooperative/ei-mcoe-map.git

Or if you're authenticating via HTTPS:

git clone https://github.com/catalyst-cooperative/ei-mcoe-map.git

Then in the top level directory of the repository, create a conda environment based on the environment.yml file that is stored in the repo:

conda env create --file environment.yml

Note that the software in this repository depends on the dev branch of the main PUDL repository, and the setup.py in this repository indicates that it should be installed directly from GitHub. This can be a bit slow, as pip (which in this case is running inside of a conda environment) clones the entire history of the repository containing the package being installed. How long it takes will depend on the speed of your network connection. It might take ~5 minutes.

The environment.yml file also specifies that the Python package defined within this repository should be installed such that it is editable. This will allow you to change the modules that are part of the repository and have the installed software reflect your changes.

If you want to make changes to the PUDL software as well, you can clone the PUDL repository into another directory (outside of this repository), and direct conda to install the package from there. A commented out example of how to do this is included in environment.yml. NOTE: if you want to install PUDL in editable mode from a locally cloned repo, you'll need to comment out the dependency in setup.py as it may otherwise conflict with the local installation (pip can't resolve the precedence of different git based versions).

After any changes to the environment specification, you'll need to recreate the conda environment. The most reliable way to do that is to remove the old environment and create it from scratch. If you're in the top level ei-mcoe-map directory and have the ei-mcoe environment activated, that process would look like this:

conda deactivate
conda env remove --name ei-mcoe
conda env create --file environment.yml
conda activate ei-mcoe

In order to use this repository, you will need a recent copy of the PUDL database. You You can either create one for yourself by running the ETL pipeline, or you can follow the instructions in the PUDL examples repository to download the pre-processed data alongside a Docker container.

To work with the pre-processed data outside of the Docker container, you will need to tell the PUDL software where to find that data on your computer. When you extract the pre-processed data archive, it will include a directory named pudl_data -- you need to put the path to that directory in a file called .pudl.yml in your home directory. The contents will need to look like the following (but with real paths...):

pudl_in: /path/to/your/downloaded/pudl_data
pudl_out: /the/same/path/to/pudl_data

ei-mcoe-map's People

Contributors

cmgosnell avatar zaneselvans avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

ei-mcoe-map's Issues

incorporate net gen from generation_fuel_eia923 table

either... wait until we incorporate a standard methodology into MCOE or just use the generation_fuel_eia923 table directly.

This output is already at the plant-fuel level, so the later would probably work. Nonetheless, I'm concerned that the secondary fuel sources will be somewhat lost if we just try to merge over the generation_fuel_eia923 table.

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.