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

Add Building Grades Data #140

Open
wants to merge 32 commits into
base: main
Choose a base branch
from
Open

Add Building Grades Data #140

wants to merge 32 commits into from

Conversation

AlexanderTyan
Copy link
Collaborator

@AlexanderTyan AlexanderTyan commented Dec 4, 2024

Description

This generates numerical and letter grades for each building and each year based on GHG Intensity, Energy Mix, and Reporting Status. The results are under src/data/dist/building-benchmarks-graded.csv

Additionally, this PR contributes the research notebook with initial EDA and visualization around grading (which also has some further ideas to explore). All relevant research notebook files are under src/data/research

Realtes to #129 (but only the data processing part; still needs to be integrated into UI)

Example Grades

According to the grading so far in this PR, these are a few selected grades (overall across three grading categories):

  • "Crown Hall": 18.1784/100 or F
  • "Keating Hall": 5.1458/100 or F
  • "Merchandise Mart": 64.4056/100 or B
  • "Marina Towers Condominium Association": 64.5743/100 or B

Visual Results

Overall Numerical Grade Distribution

overall_numerical_grade_distribution

Overall Letter Grade Distribution

overall_letter_grade_distribution

Testing Instructions

Building grading is integrated into the docker compose-based script and is consistent with the instructions in the repository README.me. I.e. docker-compose run --rm electrify-chicago bash run_all.sh produces the graded file into the src/data/dist/building-benchmarks-graded.csv (via functions in src/data/scripts/grade_buildings.py). building-benchmarks-graded.csv is the same as building-benchmarks.csv but with grading columns attached. Specifically, these are the columns added:

  • GHGIntensityPercentileGrade: The building this year is better than this percent of other buildings within that same year in GHGIntensity.
  • GHGIntensityLetterGrade: Letter grade based on GHGIntensityPercentileGrade.
  • EnergyMixWeightedPctSum: The weighted sum of percent of energy consumed by this building from different energy sources reported.
  • EnergyMixWeightedPctSumPercentileGrade: This building is better than this percent of other buildings within that same year in EnergyMixWeightedPctSum.
  • EnergyMixWeightedPctSumLetterGrade: Letter grade based on EnergyMixWeightedPctSumPercentileGrade.
  • MissingRecordsCount: How many years this building is missing. This value is the same for the same building across all years.
  • MissingRecordsCountPercentileGrade: The building is better than this percent of other buildings in MissingRecordsCount.
  • SubmittedRecordsGrade: Letter grade based on EnergyMixWeightedPctSumPercentileGrade.
  • AvgPercentileGrade: Average of all percentile grades for this building for this year.
  • AvgPercentileLetterGrade: Letter grade based on AvgPercentileGrade.

The research notebook dev environment is reproducible via docker compose by following instructions in the README.md under src/data/research. The notebook is also included at src/data/research/building_grade_eda.ipynb.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Copy link

netlify bot commented Dec 4, 2024

Deploy Preview for radiant-cucurucho-d09bae ready!

Name Link
🔨 Latest commit 1454652
🔍 Latest deploy log https://app.netlify.com/sites/radiant-cucurucho-d09bae/deploys/674fd33353d6d00008acfe45
😎 Deploy Preview https://deploy-preview-140--radiant-cucurucho-d09bae.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@vkoves vkoves changed the title 129 building grades Add Building Grades Data Dec 4, 2024
@vkoves vkoves added enhancement New feature or request data Data updates & tweaks labels Dec 4, 2024
@AlexanderTyan
Copy link
Collaborator Author

AlexanderTyan commented Dec 4, 2024

These are the A-graded buildings:
a_grade_buildings.csv

IDs (from 2022):

117024
124236
160142
165717
172137
251770
254001

@AlexanderTyan
Copy link
Collaborator Author

TODO: building-benchmarks-graded.csv should just be incorporated into building-benchmarks.csv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data Data updates & tweaks enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants