vkoves / electrify-chicago

Learn about Chicago's most polluting buildings, and what they can do to clean up their act!
http://electrifychicago.net
9 stars 5 forks source link

Give context based on property type #27

Closed SuragNuthulapaty closed 1 year ago

SuragNuthulapaty commented 1 year ago

Created a script that ranks and gives statistics specifically based on each building type, not across the whole of Chicago.

To run the script, run python3 add-context-by-property-type.py

You can see the output of the rankings in /data/dist/building-benchmarks.csv by looking at the columns that are Specific Category+"RankByPropertyType"

The output of the building statistics are in data/dist/building-statistics-by-property-types.json

Resolves #24

netlify[bot] commented 1 year ago

Deploy Preview for radiant-cucurucho-d09bae ready!

Name Link
Latest commit 1b112d06f42116af22f3b6ee96a91ff5c0fddbd3
Latest deploy log https://app.netlify.com/sites/radiant-cucurucho-d09bae/deploys/648f4fc7c4b5220008c7820c
Deploy Preview https://deploy-preview-27--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 settings.

vkoves commented 1 year ago

@SuragNuthulapaty - do you want to tackle adding this to the UI during next week's CHN? I don't want to merge just raw data since it's pretty hard to debug and validate

SuragNuthulapaty commented 1 year ago

@vkoves sounds good, ill get to work on it

SuragNuthulapaty commented 1 year ago

@vkoves i just remembered I won't be able to make CHN this week, I've pushed up all my work and it's ready to be reviewed

SuragNuthulapaty commented 1 year ago

@vkoves This is now ready to check again

vkoves commented 1 year ago

@SuragNuthulapaty - excellent work (particularly with the custom pluralize function), but have a few last minor comments

vkoves commented 1 year ago

@SuragNuthulapaty - did import not end up working, or are you still working on this?

SuragNuthulapaty commented 1 year ago

@vkoves I'm still working on it but it's not looking too good. I can't seem to figure out anything.

vkoves commented 1 year ago

@SuragNuthulapaty - not sure if it helps, but here's a commit where I have a JSON import: https://github.com/vkoves/electrify-chicago/commit/01f7f7405d673726bf89c7f12608a087adef6ee6

I did have to tweak the TSConfig originally to get that to work, but it should work fine now for all files I'd think

SuragNuthulapaty commented 1 year ago

@vkoves That worked, I fixed everything now. Hopefully that's the last changes needed for now.

vkoves commented 1 year ago

@SuragNuthulapaty - so sorry, I actually found a bug. Here's the bottom of Hermann Hall on prod:

image

On your branch those tiles don't appear:

image

I'm guessing because those don't have category rankings (which is fine), but the tiles expect that every tile does.

SuragNuthulapaty commented 1 year ago

@vkoves I think this should hopefully be good now