decarbonize-my-state
What does it take to decarbonize your state?
Science Score: 23.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
1 of 14 committers (7.1%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.1%) to scientific vocabulary
Keywords
Repository
What does it take to decarbonize your state?
Basic Info
- Host: GitHub
- Owner: chihacknight
- License: mit
- Language: JavaScript
- Default Branch: main
- Homepage: https://decarbmystate.com/
- Size: 2.62 GB
Statistics
- Stars: 13
- Watchers: 7
- Forks: 1
- Open Issues: 11
- Releases: 0
Topics
Metadata Files
README.md
Decarb My State
[!IMPORTANT] Decarb My State isn't currently in active development - the climate change group at Chi Hack Night is now working on other projects - see our breakout group issue to see what we're up to right now!
Chi Hack Night data visualization project to measure the state and progress of decarbonization for all States in the USA.
This is a Gatsby app built on top of the DataMade Gatsby starter template, which was adapted from the default Gatsby starter repo.
Requirements
- Docker
- Docker Compose
- Node 16.X
Quick start
- Grab the repo:
shell
git clone git@github.com:chihacknight/decarbonize-my-state.git
cd decarbonize-my-state
- Start developing
shell
docker-compose up --build
or
shell
yarn install
to install dependencies, then
shell
yarn develop
Your site should now be up and running at http://localhost:8000!
Dependencies
This starter has a minimal number of dependencies in order to stay lean, but you'll likely want to add more to suit your needs. To add a dependency, run:
shell
docker-compose run --rm app add <dependency name> --save
or
shell
yarn add <dependency name>
To remove a dependency:
shell
docker-compose run --rm app remove <dependency name>
or
shell
yarn remove <dependency name>
Testing & syntax linting
When you run docker-compose up locally, ESLint makes sure you're following the right JS style conventions and not importing or exporting anything extraneously. If you are, the build will fail.
If you want to check the linter on its own you can run:
docker-compose run --rm app run test
or
shell
yarn test
If you want to reformat with the linter, you can run:
docker-compose run --rm app run format
or
shell
yarn format
Data processing
All data that appears on the frontend of this site should come directly from a file in data/finalfor more on that line of thinking, see this guide to data handling in Gatsby. The data processing pipeline for this project lives in data/ and follows DataMade's data making guidelines. As these files are relatively small, we keep both raw and final data under version control.
To recreate the data, run:
bash
cd data
docker-compose up --build
Social Cards
We wanted the social cards to include what number emitter the state is and what their emissions breakdown is. To do this, we created a social card page and used puppeteer to take screenshots to output get the dynamic social cards. The new screenshots can be found in /static/social-cards
To generate them:
First make sure yarn develop is running
Then run yarn generate-social-all to generate all social images (~3,500), or run:
- yarn generate-social-states for just state social images (50)
- yarn generate-social-power-plants for just powerplants (~3,500)
To then show progress logs, just tack on --debugging, e.g. yarn generate social-power-plants --debugging.
Finally: Copy paste /power-plant-social-out/social-cards/power-plant directory into
static/social-cards. You have to do this because writing a file to the /static directory causes
Gatsby develop to rebuild, so we cannot have the power plant generation with (> 3K plants) to static
while relying on develop.
What's inside?
Taken from gatsby-starter-default
A quick look at the top-level files and directories you'll see in a Gatsby project.
.
.github/workflows
src
static
.gitignore
.prettierrc
gatsby-browser.js
gatsby-config.js
gatsby-node.js
gatsby-ssr.js
LICENSE
package-lock.json
package.json
README.md
/.github/workflows: This directory contains the project's Github Actions. By default,test.ymlruns a linter./src: This directory will contain all of the code related to what you will see on the front-end of your site (what you see in the browser) such as your site header or a page template.srcis a convention for source code./static: This directory contains files you'll need to access directly on the frontend, like images for social cards..eslintrc.js: This is a configuration file for ESLint, a Javascript linter..gitignore: This file tells git which files it should not track / not maintain a version history for.gatsby-browser.js: This file is where Gatsby expects to find any usage of the Gatsby browser APIs (if any). These allow customization/extension of default Gatsby settings affecting the browser.gatsby-config.js: This is the main configuration file for a Gatsby site. This is where you can specify information about your site (metadata) like the site title and description, which Gatsby plugins youd like to include, etc. (Check out the config docs for more detail).gatsby-node.js: This file is where Gatsby expects to find any usage of the Gatsby Node APIs (if any). These allow customization/extension of default Gatsby settings affecting pieces of the site build process.gatsby-ssr.js: This file is where Gatsby expects to find any usage of the Gatsby server-side rendering APIs (if any). These allow customization of default Gatsby settings affecting server-side rendering.LICENSE: Gatsby is licensed under the MIT license.package.json: A manifest file for Node.js projects, which includes things like metadata (the projects name, author, etc). This manifest is how npm knows which packages to install for your project.README.md: A text file containing useful reference information about your project.
Learning Gatsby
Looking for more guidance? Full documentation for Gatsby lives on the website. Here are some places to start:
For most developers, we recommend starting with our in-depth tutorial for creating a site with Gatsby. It starts with zero assumptions about your level of ability and walks through every step of the process.
To dive straight into code samples, head to our documentation. In particular, check out the Guides, API Reference, and Advanced Tutorials sections in the sidebar.
Deploy
DataMade deploys static sites using Netlify. This project's staging URL is decarbonizemystate.com.
Owner
- Name: Chi Hack Night
- Login: chihacknight
- Kind: organization
- Location: Chicago
- Website: http://chihacknight.org/
- Repositories: 32
- Profile: https://github.com/chihacknight
We are a group of volunteers that care about creating, supporting, and serving the public good
GitHub Events
Total
Last Year
Committers
Last synced: 10 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Viktor Köves | 3****s | 230 |
| SuragNuthulapaty | 7****y | 90 |
| Derek Eder | d****r@g****m | 82 |
| Dylan | d****n@u****u | 49 |
| Howard | h****d@m****m | 24 |
| Robert | r****7@y****m | 13 |
| Sean Watland | s****d@g****m | 12 |
| JoseMRodriguez | J****9@g****m | 6 |
| Sean Watland | 5****0 | 6 |
| Juan-Pablo Velez | j****z@s****m | 4 |
| Derek Eder | d****r@d****s | 2 |
| an emard | a****0@g****m | 2 |
| Maaya | y****a@g****m | 1 |
| Eric Sherman | e****a | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 46
- Total pull requests: 55
- Average time to close issues: 3 months
- Average time to close pull requests: 8 days
- Total issue authors: 7
- Total pull request authors: 9
- Average comments per issue: 2.04
- Average comments per pull request: 3.18
- Merged pull requests: 52
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: 1 day
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 1.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- vkoves (26)
- derekeder (9)
- SuragNuthulapaty (3)
- swatland610 (2)
- hkier (2)
- jpvelez (2)
- mayamauchi (1)
Pull Request Authors
- vkoves (21)
- derekeder (13)
- SuragNuthulapaty (10)
- hkier (4)
- herrerarobert (3)
- nofurtherinformation (2)
- anemard (1)
- mayamauchi (1)
- swatland610 (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- pandas ==1.1.3
- python-slugify ==4.0.1
- actions/checkout v1 composite
- actions/setup-node v1 composite
- nikolaik/python-nodejs latest build
- python 3.7 build
- decarbonize-etl latest
- prettier ^1.19.1 development
- @sentry/gatsby ^5.27.3
- bootstrap ^4.4.1
- eslint-config-react-app ^5.2.1
- fs ^0.0.1-security
- gatsby ^2.19.45
- gatsby-image ^2.2.44
- gatsby-plugin-google-gtag ^4.14.0
- gatsby-plugin-manifest ^2.2.48
- gatsby-plugin-netlify-cache ^1.2.0
- gatsby-plugin-offline ^3.0.41
- gatsby-plugin-react-helmet ^3.1.24
- gatsby-plugin-sharp ^2.4.13
- gatsby-source-filesystem ^2.1.56
- gatsby-transformer-json ^2.5.0
- gatsby-transformer-sharp ^2.3.19
- journalize ^2.5.0
- prop-types ^15.7.2
- puppeteer ^16.0.0
- react ^16.12.0
- react-bootstrap ^1.0.0
- react-bootstrap-table-next ^4.0.3
- react-bootstrap-table2-paginator ^2.1.2
- react-bootstrap-table2-toolkit ^2.1.3
- react-bootstrap-typeahead ^5.1.4
- react-dom ^16.12.0
- react-helmet ^5.2.1
- react-icons ^3.11.0
- react-scrollspy ^3.4.3
- react-select ^3.1.0
- react-svg-map ^2.2.0
- recharts ^2.1.9
- typescript ^3.9.5
- url-search-params-polyfill ^8.1.0