lforando / sds192-mp2

Mini-project 2
0 stars 0 forks source link

Functions #5

Open lforando opened 5 years ago

lforando commented 5 years ago

After looking over our code, I realized/noticed a few places where we repeat/have to re-type the code and could potentially use functions instead.

-committees (make a function for what we are selecting out of committees) -contributions (make a function for what we are selecting out of contributions)

Let me know what you guys think of this idea and/or if there are other places where we can include a function.

lforando commented 5 years ago

I realize I didn't put inline comments for the data graphics yet - I will, I just wanted to update the file before I head over to dinner. I also combined a few of the code chunks together so that it's easier to read. Everything is combined so it's "Data Wrangling: Florida", "Data Wrangling: California", "Data Wrangling: Texas", and "Data Graphics".

lzdoesdata commented 5 years ago

ok! I agree that creating a function to iterate over committees and contributions makes the most sense, but we run into a problem with the rest of our data wrangling (all the joining to create the final tables for each state) that is very input specific. Not sure how we could also iterate through those operations using just one function.

also, we could probably use a function for creating the 3 data graphics

sarah-daum commented 5 years ago

I agree that we need a function. Couldn't we write the function after joining all the tables?