Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set up database and load eGRID database data #2

Closed
sichen1234 opened this issue Aug 17, 2020 · 5 comments
Closed

set up database and load eGRID database data #2

sichen1234 opened this issue Aug 17, 2020 · 5 comments

Comments

@sichen1234
Copy link
Contributor

sichen1234 commented Aug 17, 2020

Set up a local database (couchdb) with a table for UTILITY_EMISSION_FACTORS with the following fields:

  • Year
  • Country (USA for now, can add others)
  • Division_type (can be BALANCING_AUTHORITY, STATE_PROVINCE, SUBREGION, COUNTRY)
    _ Division_id
  • Division_name
  • Net_Generation
  • Net_Generation_UOM (unit of measure, can be MWH)
  • CO2_Equivalent_Emissions
  • CO2_Equivalent_Emissions_UOM (unit of measure, can be tons)
  • Source

Load data from the EPA eGRID database

Specifically, we can start from the attached spreadsheet from https://www.epa.gov/sites/production/files/2020-01/egrid2018_all_files.zip

It has the following tabs which are useful:

  • ST18: emissions by state (Division_type = STATE_PROVINCE)
  • SRL18: emissions by subregion (Division_type = SUBREGION)
  • NRL18: emissions by NERC region (Divsion_type = NERC_REGION)
  • BA18: emissions by balancing authority (Division_type = BALANCING_AUTHORITY)
  • US18: emissions by country (Division_type = COUNTRY)

We can start with NRL18 for now:

@sichen1234
Copy link
Contributor Author

egrid2018_data_v2.xlsx

@sichen1234
Copy link
Contributor Author

@lamnd09 Can you change your import to use the data format described in this task? See the original description and the spreadsheet that I've attached.

@sichen1234
Copy link
Contributor Author

@lamnd09 After some more thinking I still believe it is better to separate the logic of looking up emissions factors from storing this seed data on the chain. So can you just load one of these records based on what's here and then calculate the emissions by making the conversion? Then we can work on loading and getting data from a DB, either Orbit or Dynamo DB or something else.

@lamnd09
Copy link
Contributor

lamnd09 commented Aug 28, 2020

@opentaps , it sounds reasonable! I will update the data format as #2 #3 with NRL18 to compute emissions. So I will create 2 structure, one for Utility to get NERC_REGION, then with NERC_REGION, a strucuture for emissions we compute the emission as #4. In second part, first step, I just take away some colums contain values of CO2 emission? How do you think?

@sichen1234
Copy link
Contributor Author

sichen1234 commented Aug 28, 2020 via email

@sichen1234 sichen1234 changed the title set up OrbitDB database and load eGRID database data set up database and load eGRID database data Sep 16, 2020
udosson pushed a commit that referenced this issue Oct 19, 2020
ryjones pushed a commit that referenced this issue Jan 15, 2021
sichen1234 pushed a commit that referenced this issue Jun 29, 2021
Revert "Integrating automated test to Github pipeline"
udosson pushed a commit that referenced this issue Oct 14, 2021
* Fixed lint warning in chaincode

* Fixed linting warnings in typescript_app

* Fixed lint warning due to prettier auto save

Signed-off-by: Amarbir Singh <amarbir1800@gmail.com>

Lint warning fixes (#2)

* Fixed lint warning in chaincode

* Fixed linting warnings in typescript_app

* Fixed lint warning due to prettier auto save

* Fixed no-return-type lint warnings

Signed-off-by: Amarbir Singh <amarbir1800@gmail.com>

Update emissionsRecordContract.ts

Bug fix while merge request

Signed-off-by: Amarbir Singh <amarbir1800@gmail.com>

Typo fix

Signed-off-by: Amarbir Singh <amarbir1800@gmail.com>

Fixed two more typos

Signed-off-by: Amarbir Singh <amarbir1800@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants