justinperline / samegrassbutgreener

0 stars 0 forks source link

Calculate Voting History Data #8

Closed justinperline closed 10 months ago

justinperline commented 10 months ago

Goal here is to assess the blue/red leanings of any place in particular. Data from: https://github.com/tonmcg/US_County_Level_Election_Results_08-20/tree/master

That's county-level data pieced together from various sources. I'll need to map that to each city. Unlike #4, I'll want to do a weighted average of each county within a place rather than picking the county with the largest geographic overlap.

justinperline commented 10 months ago

Because I don't know the proportion of people within each place living in each county (in the case of a place belonging to more than one), I'm making an assumption that the population is divided in proportion to the amount of area overlap.

justinperline commented 10 months ago

Code here: https://github.com/justinperline/samegrassbutgreener/blob/main/code/politics.R