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

Model and Visualizations for Campaign Finance Data #5

Merged
merged 17 commits into from
Apr 17, 2024

Conversation

czheng10
Copy link
Contributor

@czheng10 czheng10 commented Apr 13, 2024

Major Changes

  • New CampaignFinance Model for donor-party donations data
  • API paths for CampaignFinance data, specifiable by donor name, party name, or both (Image 5)
  • Frontend path to PiChart of top 10 donors (Image 3, 4)
  • Frontend path to BarChart of top 10 donors (Image 2)
  • Frontend path to Sankey Graph of donor flows to the party they donated to (Image 1) [WIP]

Dependencies
run npm install

To-Dos

  • Styling for legibility and readability of Sankey graph
  • Further visualizations like stacked bar charts for many-to-one relationships (e.g. all donation amounts from all donors who donated to a certain party)
Screen Shot 2024-04-16 at 6 33 08 PM Screenshot 2024-04-13 at 11 34 18 AM Screenshot 2024-04-13 at 11 34 46 AM Screenshot 2024-04-13 at 11 35 16 AM Screenshot 2024-04-13 at 11 46 00 AM

Copy link
Member

@JusticeV452 JusticeV452 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for getting this in! Overall, everything looks good. Some minor nitpicks are some python linters errors and some formatting inconsistent with the other project code (some functions without two spaces between them, x=y instead of x = y for keyword variable assignment in functions). It looks like the linter does not track this, although keeping the formatting consistent helps with searching the project. You don't need to worry about these as you are coding; just make sure to run the formatter on each file you include in a PR (shift + alt + f or shift + command + f). I made the changes, although I am mentioning them for future PRs.

Another thing I suggest as a todo is to make it easier to see the Contribution amount by increasing the area around the lines that make it appear. It seems like I need to have the tip of my mouse pointer exactly on the line for the pop-up to appear.

Also, make sure to use npm ci instead of npm install when installing new dependencies after pulling.

frontend/components/PieChart.js Show resolved Hide resolved
@JusticeV452 JusticeV452 merged commit 823457e into main Apr 17, 2024
3 of 4 checks passed
@JusticeV452 JusticeV452 deleted the campaign-finance branch April 17, 2024 00:06
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.

3 participants