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
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
06af89b
test push
AlexanderTyan Oct 2, 2024
1a9ec0d
delete test
AlexanderTyan Oct 2, 2024
2d2f702
add jupyter notebook cache to gitignore
AlexanderTyan Oct 2, 2024
3fe16cf
docker environment for building grade eda
AlexanderTyan Oct 2, 2024
83eddc7
update readme
AlexanderTyan Oct 4, 2024
6be4d87
basic ghgintensity grade
AlexanderTyan Oct 4, 2024
9794a92
clean up
AlexanderTyan Oct 7, 2024
4ee7ade
energy mix naive grading
AlexanderTyan Oct 8, 2024
e909c00
some cleanup
AlexanderTyan Oct 9, 2024
fe6db5c
commenting
AlexanderTyan Oct 9, 2024
2cadf33
more docstring
AlexanderTyan Oct 9, 2024
792e759
reorg notebook
AlexanderTyan Oct 9, 2024
5aed703
more documentation
AlexanderTyan Oct 10, 2024
c18710f
back up notebook
AlexanderTyan Oct 16, 2024
8e7a224
historical_ghg_factors
AlexanderTyan Oct 16, 2024
7b0d728
take notes 2024-10-15
AlexanderTyan Oct 16, 2024
36a0d36
back up notebook
AlexanderTyan Oct 23, 2024
4664d4d
readme
AlexanderTyan Oct 23, 2024
1166103
back up notebook
AlexanderTyan Oct 23, 2024
77ef829
start grades based on reporting years
AlexanderTyan Oct 29, 2024
542637d
finish building grades
AlexanderTyan Oct 30, 2024
7608ce9
Merge branch 'main' into 129_building_grades
AlexanderTyan Nov 19, 2024
11528f7
lint
AlexanderTyan Nov 19, 2024
a8d7665
rearrange building grading funcs for docker compose run all script
AlexanderTyan Nov 20, 2024
d013158
move research stuff around
AlexanderTyan Nov 20, 2024
005710b
Merge branch 'main' into 129_building_grades
AlexanderTyan Dec 4, 2024
6529f6e
fix research notebook dependency paths
AlexanderTyan Dec 4, 2024
4a2a923
do not assign lambda funcs
AlexanderTyan Dec 4, 2024
c3a3513
generate overall grades
AlexanderTyan Dec 4, 2024
ae61337
examples of grades in the notebook
AlexanderTyan Dec 4, 2024
1d88c7b
clean up;
AlexanderTyan Dec 4, 2024
1454652
all the a buildings
AlexanderTyan Dec 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ node_modules/*
.cache/*
src/.temp/*

**/.ipynb_checkpoints/*
# Ignore root dist directory from `gridsome build`, we need src/data/dist
dist/*

Expand Down
4 changes: 3 additions & 1 deletion run_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ python3 -m src.data.scripts.process_data

python3 -m src.data.scripts.add_context_by_property_type

python3 -m src.data.scripts.clean_and_pare_down_data_current_year
python3 -m src.data.scripts.clean_and_pare_down_data_current_year

python3 -m src.data.scripts.grade_buildings
Binary file added src/data/dist/Historical_GHG_Factors.xlsx
Binary file not shown.
3 changes: 3 additions & 0 deletions src/data/dist/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Files

`Historical_GHG_Factors.xlsx`: These data are from [`Energy Star's Historical Greenhouse Gas Factors, 2000 – present`](https://www.energystar.gov/buildings/tools-and-resources/historical-greenhouse-gas-factors-2000-present). When the `Subregion` is `NaN`, Energy Uses the national factor (i.e. no division by subregion for those energy sources).
3,393 changes: 3,393 additions & 0 deletions src/data/dist/building-benchmarks-graded.csv

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/data/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
python-slugify==4.0.1
pandas==2.1.2
scipy==1.11.3
numpy
pytest==7.4.4
27 changes: 27 additions & 0 deletions src/data/research/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# README

This is how you set up an environment for research development.

In bash, from this `README.md`'s directory, `cd` to the `docker` directory.
From there:

```bash
docker compose build && MY_UID="$(id -u)" MY_GID="$(id -g)" docker compose up
```

Note: `MY_UID="$(id -u)" MY_GID="$(id -g)"` is to pass permissions to the
Jupyter user inside the container to make changes that are persistent on the
host side with appropriate host user permissions; e.g. a Jupyter notebook file
that a host user can edit.

To add Python dependencies:

```bash
docker exec -it docker-bldg-grade-dev-1 bash
cd ~/work/docker
poetry add [name_of_package]
```

To do some research, you can go to the Jupyter Server link that is in the
compose logs and paste it into your browser. Within the Jupyter GUI, navigate
to `work/src/data/research/building_grade_eda.ipynb` for data exploration.
Loading
Loading