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

Update Site To 2021 Data #40

Closed SuragNuthulapaty closed 10 months ago

SuragNuthulapaty commented 11 months ago

Created and added new data from 2021, with a new data process that combines historic data with the 2021 data, allowing buildings with only past data like the Art Institute to still show useful information..

⚠️ Warning - this is currently a destructive update, since you cannot see 2020 data on buildings that reported their 2021 data. We should likely follow this up with a PR tackling historical emissions (Issue #4).

Details

The new data: src/data/source/ChicagoEnergyBenchmarking.csv is the source file src/data/source/ChicagoEnergyBenchmarkingAllNewestInstances.csv are all the newest unique building ID's src/data/source/ChicagoEnergyBenchmarkingThisYear.csv is all submitted data for the current year (2021)

When displaying, an alert will pop up if the webpage is using old (not 2021) data: image

Known Issues To Resolve

netlify[bot] commented 11 months ago

Deploy Preview for radiant-cucurucho-d09bae ready!

Name Link
Latest commit 0b618e533a9d972428b6546bc222b3a3b318b537
Latest deploy log https://app.netlify.com/sites/radiant-cucurucho-d09bae/deploys/64eee31fc7babf00070ee33e
Deploy Preview https://deploy-preview-40--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 commented 11 months ago

Haven't reviewed this yet, but it gives me a chuckle that IIT is still #1 😆

image

We need to tag Crown Hall as an IIT property, and maybe shift to using building ID instead of slugs for owners, since that's probably more stable year over year

vkoves commented 11 months ago

@SuragNuthulapaty - ope, I found a bug. We show buildings that never submitted, like the United Center but the page doesn't work because there's no data:

https://deploy-preview-40--radiant-cucurucho-d09bae.netlify.app/building/united-center/

image

I think changing the yellow warning to a red warning and saying they never submitted then hiding all the info we don't have should be sufficient, and that will solve Issue #25

vkoves commented 11 months ago

Oh one more thing - I think old buildings are getting included in rankings, like "Hyde Park West Apartments" on the homepage. This shouldn't happen, since it isn't really fair to compare buildings in separate years where the data collection could have been different or even just building standards have changed.

SuragNuthulapaty commented 11 months ago

@vkoves This is the raw csv file:

Screenshot 2023-07-14 at 10 20 49 PM

I see that united center has submitted data, I am not sure why it's not working. In that row all the data is there as normal.

vkoves commented 11 months ago

Alright going to try digging into some of these data quirks. Turns out for some reason now buildings sometimes get prefixed with (ILNUMBER) -, so we should try and trim that out:

Update: Fixed in f4b884fa

vkoves commented 10 months ago

So thinking about this more, I think the negative ranking is happening because we are running the add context by property type ranking before the data split by year, which likely means we are ranking across all buildings across all years, so Marina Towers may be ranked as #1,999 dirtiest of #2,000 buildings in the raw data set, but then there's only say #1,000 buildings in the latest year, so the rank gets inverted to 1000 - 1999 = -999. We should likely only rank buildings against buildings in the latest year to simplify this.

To fix this, add-context-by-property-type.py should filter to buildings with data in the latest year, and only apply rankings to that data set. That means older buildings won't be counted in the rank or get a rank.

SuragNuthulapaty commented 10 months ago

Just took a look and i believe I got it wrong. The python3 scripts/clean-and-pare-down-data_all_years.py should be on line 89, not 91, with two lines above it being brought down. Also, the reverence to building-benchmarks.csv is correct, the next two scropts will correctlyupdate the data in ./dist/ to use on the main site.

derekeder commented 10 months ago

Marina Towers is now reporting zero values for gas use, so the front-end rankings calculation needs to account for this:

UI Source Data (just Marina towers, 2021 at top)
Screen Shot 2023-08-22 at 9 59 26 PM Screen Shot 2023-08-22 at 10 03 58 PM

Viktor's note: We should also try to verify if all buildings reporting zero use actually have that

vkoves commented 10 months ago

District cooling and heating no longer shows medians, a good example is Herman Hall.

Prod This Branch
Screenshot from 2023-08-22 23-29-40 Screenshot from 2023-08-22 23-29-33
vkoves commented 10 months ago

Large owners and building images are now fixed with a pivot to IDs! 🎉

Screenshot from 2023-08-24 22-16-06

vkoves commented 10 months ago

I've updated the natural gas tile to provide more information on a building's gas use based on whether or not it uses district steam! We may want to move this up later on, since we should really highlight the few fully gas free buildings:

Fully Gas Free (e.g. Marina Towers) No Local Gas (e.g. Crown Hall)
Screenshot from 2023-08-27 22-49-31 Screenshot from 2023-08-27 22-49-26