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

Total climate pollution chart & projection to 0 by 2050 #43

Merged
merged 11 commits into from
Apr 6, 2022
Merged

Total climate pollution chart & projection to 0 by 2050 #43

merged 11 commits into from
Apr 6, 2022

Conversation

hkier
Copy link
Collaborator

@hkier hkier commented Mar 28, 2022

Overview

This PR adds the area chart to both the index and state detail pages.

Closes #17

Demo

What does it take to decarbonize your state .pdf

Testing Instructions

This PR can be tested by loading the app and visually looking at the area chart on both the index and state pages. Various state pages should be check to verify proper functioning.

@nofurtherinformation
Copy link
Collaborator

Awesome! A couple suggestions:

  • This component should be responsive, so that it will also look great on smaller screens -- check out how the stacked bar chart uses the ResponsiveContainer component from recharts here
  • For the emissions_data property that this component takes, if you wrap that in curly braces {} in the function, you can use it directly instead of using Object.values(emissions_data)[0] (see here for reference). For more on what's going on with this syntax, object destructuring, check out this article
  • On the design-side, I'd considering ditching the legend for in-chart labels, something like this:

Screen Shot 2022-03-28 at 7 20 28 PM

A rough approach to this could look like:
   // other component stuff
    <ReferenceLine x="2018" stroke="none" label={{value:"Emissions", angle:90, fill:"#b65c00"}} />
    <ReferenceLine x="2024" stroke="none" label={{value:"Projections", angle:90, fill:"#36a654"}} />
    // rest of component stuff

@vkoves vkoves changed the base branch from Total-climate-pollution-chart-&-projection-to-0-by-2050 to main March 30, 2022 01:19
@vkoves vkoves mentioned this pull request Mar 30, 2022
@netlify
Copy link

netlify bot commented Mar 30, 2022

Deploy Preview for state-decarbonize ready!

Name Link
🔨 Latest commit 105ce12
🔍 Latest deploy log https://app.netlify.com/sites/state-decarbonize/deploys/624d034f5f17f1000832b8f1
😎 Deploy Preview https://deploy-preview-43--state-decarbonize.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.

@derekeder
Copy link
Member

derekeder commented Apr 5, 2022

@hkier looks like this is failing on build because it is referencing guam which @vkoves removed in ccb1cd6. If you pull down the latest changes from main to your branch, it should build

deploy error: https://app.netlify.com/sites/state-decarbonize/deploys/624631e33beeab0008842e0b#L147

@hkier
Copy link
Collaborator Author

hkier commented Apr 5, 2022

When I attempted to update my branch from main, I was informed I was up to date. I did attempt another commit and it is showing 1 file conflict which is just deleting a blank line. Not sure what else might be causing the problem/conflicts.

@derekeder
Copy link
Member

@hkier ok - if you are coming to hack night tonight, we can spend some time and sort it out. looks like we also have some merge conflicts with the recently merged in PR #40 that we will also have to resolve

@hkier
Copy link
Collaborator Author

hkier commented Apr 5, 2022

Derek, sorry but I have a meeting conflict this evening and was not planning to attend. Even if I were to drop in for a couple of minutes (from my other meetings) I would not have my coding computer available for screen sharing and diagnostic work.

I see this:
Add more commits by pushing to the [Total-climate-pollution-chart-&-projection-to-0-by-2050](https://github.com/hkier/state-by-state-decarbonization/tree/Total-climate-pollution-chart-%26-projection-to-0-by-2050) branch on [hkier/state-by-state-decarbonization](https://github.com/hkier/state-by-state-decarbonization).

I wonder if this might be the problem and if so, I need to remember how to push to a specific repo/branch.

@hkier hkier merged commit eda5bd3 into chihacknight:main Apr 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Homepage Total US Pollution Chart with Projection to 0 by 2050
3 participants