IMPORTANT need to expand the documentation in this notebook and add a lot of Markdown cells to guide reader.
No description of where the data came from
I suggest adding an outcome (Dem or Rep) categorical variable which will then allow you to look at:
the number of counties that went Rep/Dem in 2020
The point difference variable broken down by outcome - this seems like what you were hoping to investigate with the scatter plot:
but a better way to do this is with a box plot
to me this more clearly illustrates what you were trying to get at with the scatter plot above I think. For the counties won by Republicans there was a large point difference that for those won by Democrats.
Using the same steps outlined in the geopandas example notebook we can also merge the voting data with the us county map and get
outcome (categorical)
combine outcome and point diff so -1 to 1 maps to Dem to Rep
this seems interesting at it shows the outcome and the strength of that outcome
the colormap blue-white-red is one issue as you get counties with white colors for those close to zero (either on the plus or minus) so it is less clear what the outcome is.
I played around with a Blue-Red colormap to see if that made it clearer
but am not entirely convinced it is an improvement
Notebook:
data_analysis/voting_data.ipynb
I've added some notes and code into this notebook
IMPORTANT need to expand the documentation in this notebook and add a lot of Markdown cells to guide reader.
No description of where the data came from
I suggest adding an
outcome
(Dem or Rep) categorical variable which will then allow you to look at:but a better way to do this is with a box plot
to me this more clearly illustrates what you were trying to get at with the scatter plot above I think. For the counties won by Republicans there was a large point difference that for those won by Democrats.
outcome (categorical)![image](https://user-images.githubusercontent.com/725201/144756212-10776ffd-4320-4d27-aba3-a39c8a1ed405.png)
combine outcome and point diff so -1 to 1 maps to Dem to Rep
this seems interesting at it shows the outcome and the strength of that outcome
the colormap blue-white-red is one issue as you get counties with white colors for those close to zero (either on the plus or minus) so it is less clear what the outcome is.
I played around with a Blue-Red colormap to see if that made it clearer
but am not entirely convinced it is an improvement