M2M – April – Update #2

This month, I set out to do weekly ad-hoc analysis from different data sets. This week, I choose to use FiveThirtyEight’s Democratic primary endorsements data. This dataset assigns “endorsement points” based on the position/stature of the person giving the endorsement.

I used the “ave” function to get each candidate’s cumulative points over time.


endorse_agg$csum = ave(endorse_agg$totalpoints, endorse_agg$endorsee, FUN=cumsum)

I then used ggplot to graph the trend since January.


ggplot(data=endorse_agg, aes(x=date, y=csum, group=endorsee, color=endorsee)) +
geom_point() +
geom_line() +
geom_text(label=endorse_agg$endorsee, check_overlap = TRUE, size=3, hjust=0.5, vjust=-1.1) +
theme(legend.position = “bottom”,axis.text.x = element_text(angle = 90, hjust = 1)) +
labs(x=”Date”,y=”Endorsement Points (FiveThrityEight)”,title=”Candidate Endorsement Points Over Time”)

democratic_primary_endorsement_points_over_time

We can see that Cory Booker is the leader, with Kamala Harris and Amy Klobuchar close behind. Which leads to a follow up question: why are these three candidates so far ahead? I had a guess from my exploratory data analysis that it was because they had consolidated support in their region. With that in mind, I looked at each candidate’s endorsement points by state.

democratic_primary_endorsement_points_by_state

Indeed, Booker had nearly all his points from New Jersey, Harris from California, and Klobuchar from Minnesota. Warren lagged behind but had a large percentage from Massachusetts. It’s still early in the race, and we shall continue to monitor this going forward.

Leave a Reply

Your email address will not be published. Required fields are marked *