Open
Conversation
Completed code for question ONE
Co-authored-by: Elaineeechen <113189403+Elaineeechen@users.noreply.github.com>
pushing code 2
Completed code for question THREE
Finished Contributions QMD
Completed Version of Standards.qmd
lindsaypoirier
left a comment
There was a problem hiding this comment.
Submission Checklist
-
standards.qmdcompleted -
contributions.qmdcompleted - All documents rendered
- All final code in
main
Nice work team. This was a simple and straightforward analysis.
Transforming Data
| Standard | Score | Comments |
|---|---|---|
| Demonstrates an ability to subset data | 1 | |
| Demonstrates an ability to aggregate data | 1 | |
| Demonstrates an ability to interpret the results of data wrangling | 1 |
Joining Data
| Standard | Score | Comments |
|---|---|---|
| Demonstrates an ability to join to data frames | 1 | |
| Demonstrates an ability to select the most appropriate type of join | 1 | |
| Demonstrates an ability to reflect upon ethical concerns of joining information across data frames | 1 |
GitHub
| Standard | Score | Comments |
|---|---|---|
| Demonstrates an ability to delegate tasks effectively via Issues | 1 | |
| Demonstrates an ability to collaborate across multiple GitHub branches | 1 | |
| Demonstrates an ability to review collaborators' code | 1 |
| candidate_loc_donations <- | ||
| candidates |> | ||
| select(cand_id, cand_name, cand_st) | ||
| candidate_loc_donations |
There was a problem hiding this comment.
In this analysis, I think it would have been nice to have a summary table of the number of candidates in each state.
| contributions |> | ||
| select(cand_id, name, state, transaction_amt, transaction_tp, tran_id) |> | ||
| filter(transaction_tp == "24E") |> | ||
| arrange(desc(transaction_amt)) |
There was a problem hiding this comment.
In this analysis, I think it would have been nice to have a summary table of the number/amount of contributions in each state.
|
|
||
|
|
||
|
|
||
| #Are contributors donating support money to candidates from their own states? |
There was a problem hiding this comment.
It's a really interesting question and simple analysis here.
| # Blog post | ||
|
|
||
| Compose your blog post here... | ||
| The question we wanted to answer through the data analytical process was investigating if contributors supporting candidates were particularly biased to candidates from their own state. When looking at the contributions data set, we saw information on the contributors and the amount of money they donated in the 2016 election cycle. Then, when looking at the candidates data set we were able to see the data on each candidate and the amount of donations they got from each contributor in the 2015-2016 election cycle. In the first data chunk, we wrangled the data from the contributions data set to find out what state each contributor was located in, and how much money they donated throughout the election. In the second chuck, we did a similar wrangling, looking at the candidate data set, finding out location and donation size. Lastly, in the third data set, we joined the two wrangled data frames in order to see if there was any overlap between candidates and contributors. |
There was a problem hiding this comment.
What is this dataset? How would you explain it to someone unfamiliar with the fec16.
| inner_join(candidate_loc_donations, by = "cand_id") |> | ||
| mutate(did_the_states_match = case_when(state == cand_st ~ "Yes", TRUE ~ "No")) |> | ||
| group_by(did_the_states_match) |> | ||
| summarize(number_of_yes_or_no = n()) |
There was a problem hiding this comment.
Could be cool to also consider percent of total
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.