From b0e8e4301beb0144eca3a58e69fb2ee0cb067678 Mon Sep 17 00:00:00 2001 From: Grant Park Date: Tue, 7 Nov 2023 20:56:05 -0600 Subject: [PATCH 1/3] add README note about macOS dependency issues --- README | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 README diff --git a/README b/README new file mode 100644 index 00000000..32c0b98a --- /dev/null +++ b/README @@ -0,0 +1,98 @@ +# Electrify Chicago + +[![Netlify Status](https://api.netlify.com/api/v1/badges/d777babe-6135-45a1-99dd-6377999b6127/deploy-status)](https://app.netlify.com/sites/radiant-cucurucho-d09bae/deploys) + +A site to publicize some of the most polluting buildings based on the Chicago Energy Benchmarking data published in the City of Chicago Data Portal. + +It's powered by [VueJS 2](https://v2.vuejs.org/) and [GridSome](https://gridsome.org/) + +## Data Import + +Sources: + +- [Chicago Energy Benchmarking - Covered Buildings Data](https://data.cityofchicago.org/Environment-Sustainable-Development/Chicago-Energy-Benchmarking-Covered-Buildings/g5i5-yz37) + +### Cleanup + +GraphQL requires data key names to have no spaces or special characters, so there's a raw data file (only filtered by GHG emissions > 1,000 tons and year = 2020) and a cleaned file that just hast he headers renamed for GraphQL. + +## General To-Do List + +- [x] Pick a framework - statically built VueJSS, maybe [VitePress](https://vitepress.dev/guide/getting-started) +- [x] Setup landing page with SCSS working +- [x] Get CSV data usable and on homepage +- [x] Setup domain and build process +- [x] Setup Typescript +- [ ] Setup linting in CI (ESLint ✅️, Prettier, Stylelint) +- [ ] Setup unit tests + + +## Feature To-Do List + +- [x] Show property owner (manually tagged) +- [x] Pre-process data to calculate things like averages for each property and rank of each building overall, in their class (TODO), and in their ward (TODO) +- [x] Add colors/emoji to table view to give more context (e.g. so people know Keating is super bad) +- [ ] Show % of energy use from the four sources (electric, gas, district chilled water, district steam) +- [ ] Create ward page that shows data by ward (needs new data source) +- [ ] Figure out a way to rank buildings by opportunity for improvement (perhaps higher than avg. in category, uses a lot of natural gas?) + +## Development + +## Setup + +Make sure you have [Yarn](https://yarnpkg.com/) installed, `cd` into the project directory (after cloning it) and run: + +``` +yarn install +``` + +If you encounter a dependency error on macOS such as `sharp Prebuilt libvips 8.10.5 binaries are not yet available for darwin-arm64v8`, you'll need to install these dependencies separately. Install the [Brew package manager](https://brew.sh/), then run the following commands: + +``` +brew install --build-from-source gcc +xcode-select install +brew install vips +``` + +## Running + +Run `yarn develop` to start a local dev server at `http://localhost:8080` + +Happy coding 🎉🙌 + +## Run Linting + +To run linting with auto-fix, run: + +``` +yarn lint-fix +``` + +## Deploys + +This site deploys automatically via Netlify by running `gridsome build`. + +## Tools + +[python](https://www.python.org/) and [pandas](https://pandas.pydata.org/) +for data processing + +Leaflet and Leaflet Google mutant https://www.npmjs.com/package/leaflet.gridlayer.googlemutant + +### Run Data Processing + +If you update the raw data CSVs or the data scripts that post-process them (like if you are adding +a new statistical analysis), you need to re-run the data processing. + +This requires: + +- pip +- python 3.9 + +Run the following commands: + +``` +cd src/data +pip install --no-cache-dir -r requirements.txt +bash run_all.sh +``` From 6d54f733bb162499f8db94b2a421c67c5b5543dc Mon Sep 17 00:00:00 2001 From: Grant Park Date: Tue, 7 Nov 2023 20:58:46 -0600 Subject: [PATCH 2/3] fix filename --- README | 98 ------------------------------------------------------- README.md | 8 +++++ 2 files changed, 8 insertions(+), 98 deletions(-) delete mode 100644 README diff --git a/README b/README deleted file mode 100644 index 32c0b98a..00000000 --- a/README +++ /dev/null @@ -1,98 +0,0 @@ -# Electrify Chicago - -[![Netlify Status](https://api.netlify.com/api/v1/badges/d777babe-6135-45a1-99dd-6377999b6127/deploy-status)](https://app.netlify.com/sites/radiant-cucurucho-d09bae/deploys) - -A site to publicize some of the most polluting buildings based on the Chicago Energy Benchmarking data published in the City of Chicago Data Portal. - -It's powered by [VueJS 2](https://v2.vuejs.org/) and [GridSome](https://gridsome.org/) - -## Data Import - -Sources: - -- [Chicago Energy Benchmarking - Covered Buildings Data](https://data.cityofchicago.org/Environment-Sustainable-Development/Chicago-Energy-Benchmarking-Covered-Buildings/g5i5-yz37) - -### Cleanup - -GraphQL requires data key names to have no spaces or special characters, so there's a raw data file (only filtered by GHG emissions > 1,000 tons and year = 2020) and a cleaned file that just hast he headers renamed for GraphQL. - -## General To-Do List - -- [x] Pick a framework - statically built VueJSS, maybe [VitePress](https://vitepress.dev/guide/getting-started) -- [x] Setup landing page with SCSS working -- [x] Get CSV data usable and on homepage -- [x] Setup domain and build process -- [x] Setup Typescript -- [ ] Setup linting in CI (ESLint ✅️, Prettier, Stylelint) -- [ ] Setup unit tests - - -## Feature To-Do List - -- [x] Show property owner (manually tagged) -- [x] Pre-process data to calculate things like averages for each property and rank of each building overall, in their class (TODO), and in their ward (TODO) -- [x] Add colors/emoji to table view to give more context (e.g. so people know Keating is super bad) -- [ ] Show % of energy use from the four sources (electric, gas, district chilled water, district steam) -- [ ] Create ward page that shows data by ward (needs new data source) -- [ ] Figure out a way to rank buildings by opportunity for improvement (perhaps higher than avg. in category, uses a lot of natural gas?) - -## Development - -## Setup - -Make sure you have [Yarn](https://yarnpkg.com/) installed, `cd` into the project directory (after cloning it) and run: - -``` -yarn install -``` - -If you encounter a dependency error on macOS such as `sharp Prebuilt libvips 8.10.5 binaries are not yet available for darwin-arm64v8`, you'll need to install these dependencies separately. Install the [Brew package manager](https://brew.sh/), then run the following commands: - -``` -brew install --build-from-source gcc -xcode-select install -brew install vips -``` - -## Running - -Run `yarn develop` to start a local dev server at `http://localhost:8080` - -Happy coding 🎉🙌 - -## Run Linting - -To run linting with auto-fix, run: - -``` -yarn lint-fix -``` - -## Deploys - -This site deploys automatically via Netlify by running `gridsome build`. - -## Tools - -[python](https://www.python.org/) and [pandas](https://pandas.pydata.org/) -for data processing - -Leaflet and Leaflet Google mutant https://www.npmjs.com/package/leaflet.gridlayer.googlemutant - -### Run Data Processing - -If you update the raw data CSVs or the data scripts that post-process them (like if you are adding -a new statistical analysis), you need to re-run the data processing. - -This requires: - -- pip -- python 3.9 - -Run the following commands: - -``` -cd src/data -pip install --no-cache-dir -r requirements.txt -bash run_all.sh -``` diff --git a/README.md b/README.md index ff5d4a18..32c0b98a 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,14 @@ Make sure you have [Yarn](https://yarnpkg.com/) installed, `cd` into the project yarn install ``` +If you encounter a dependency error on macOS such as `sharp Prebuilt libvips 8.10.5 binaries are not yet available for darwin-arm64v8`, you'll need to install these dependencies separately. Install the [Brew package manager](https://brew.sh/), then run the following commands: + +``` +brew install --build-from-source gcc +xcode-select install +brew install vips +``` + ## Running Run `yarn develop` to start a local dev server at `http://localhost:8080` From a464f62fc7897415ab47e709128b83dc0de67cbe Mon Sep 17 00:00:00 2001 From: Grant Park Date: Wed, 8 Nov 2023 22:45:37 -0600 Subject: [PATCH 3/3] update readme --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 32c0b98a..68780bd3 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,11 @@ Make sure you have [Yarn](https://yarnpkg.com/) installed, `cd` into the project yarn install ``` -If you encounter a dependency error on macOS such as `sharp Prebuilt libvips 8.10.5 binaries are not yet available for darwin-arm64v8`, you'll need to install these dependencies separately. Install the [Brew package manager](https://brew.sh/), then run the following commands: +### Known Issues + +#### macOS libvips Error + +If you encounter an error on macOS such as `sharp Prebuilt libvips 8.10.5 binaries are not yet available for darwin-arm64v8`, you'll need to install these dependencies separately. Install the [Brew package manager](https://brew.sh/), then run the following commands: ``` brew install --build-from-source gcc