Is Bigfoot a Republican?

They didn’t have to go THAT hard for this dataset, but they did that.

They did that for us.

Sadly, I’m only going to use location data this time around.

Maybe I’ll have to revisit this dataset one day and use it to plan my own Bigfoot sighting.

3.

0 Preparing the Data# Preparing the data to be merged elec_results <- elec_results %>% filter(cand == “Donald Trump” | cand == “Hillary Clinton”, !is.

na(county)) %>% group_by(county) %>% arrange(county, desc(pct)) %>% filter(pct == max(pct)) %>% mutate(state = abbr2state(st)) %>% select(county, state, lead, pct) bigfoot <- bigfoot %>% select(date, county, state, latitude, longitude)Now comes the part of this comparison where I get the data ready to answer the questions that we want answered.

To make things simpler, above, I have filtered the election data down to just Trump and Clinton and chose just the variables showing who won and with what percentage.

Below, I join the two datasets together by county and by state.

Take a look at the final product.

# Merging the two datasets combined <- bigfoot %>% inner_join(elec_results, by = c(“county”, “state”)) head(combined, 10)## # A tibble: 10 x 7 ## date county state latitude longitude lead pct ## <date> <chr> <chr> <dbl> <dbl> <chr> <dbl> ## 1 NA Yamhill Coun… Oregon NA NA Donald Tru… 0.

501 ## 2 1973–09–28 Washita Coun… Oklahoma 35.

3 -99.

2 Donald Tru… 0.

832 ## 3 1970–09–01 Washoe County Nevada 39.

6 -120.

Hillary Cl… 0.

464 ## 4 1979–07–04 Saunders Cou… Nebraska 41.

2 -96.

4 Donald Tru… 0.

706 ## 5 1988–03–15 Yancey County North Car… 35.

7 -82.

3 Donald Tru… 0.

649 ## 6 1988–12–15 Silver Bow C… Montana 46.

1 -113.

Hillary Cl… 0.

527 ## 7 2006–01–05 Tishomingo C… Mississip… 34.

6 -88.

2 Donald Tru… 0.

856 ## 8 2013–02–16 Tishomingo C… Mississip… 34.

7 -88.

3 Donald Tru… 0.

856 ## 9 2007–08–15 Silver Bow C… Montana 46.

0 -112.

Hillary Cl… 0.

527 ## 10 2011–08–21 Yancey County North Car… 35.

8 -82.

2 Donald Tru… 0.

649Finally, I am putting together one more dataset that I’ll use to map all of these sightings shortly.

# Prepping one more dataset that we’ll need for our map states <- states %>% mutate(state = paste(toupper(substring(region, 1, 1)), substring(region, 2), sep = “”)) %>% left_join(elec_results, by = c(“state”)) %>% select(long, lat, group, order, state, lead) head(states)## long lat group order state lead ## 1 -87.

46201 30.

38968 1 1 Alabama Donald Trump ## 2 -87.

46201 30.

38968 1 1 Alabama Donald Trump ## 3 -87.

46201 30.

38968 1 1 Alabama Donald Trump ## 4 -87.

46201 30.

38968 1 1 Alabama Donald Trump ## 5 -87.

46201 30.

38968 1 1 Alabama Hillary Clinton ## 6 -87.

46201 30.

38968 1 1 Alabama Donald Trump4.

0 Answering the Big QuestionNow that the data is set up to my liking, I can finally start using it to get some answers.

The first question I’m going to ask is whether or not there is any difference between the number of sightings in Trump and Clinton counties.

To do this, I’m going to use a two-sided t-test.

What this t-test is doing is determining whether the difference in the number of sightings between Trump counties and Clinton counties occurred because of chance.

It poses the hypothesis “there is no difference between the results” and then tests whether that can reasonably be said to be true.

In the statistics community, if the results observed (or results more extreme) would only be observed 5% or less of the time, then we reject that hypothesis and say that there is a “significant” difference.

Let’s see what the test says.

t_test <- combined %>% group_by(county, lead) %>% summarize(sightings = n()) t.

test(sightings ~ lead, data = t_test) ## ## Welch Two Sample t-test ## ## data: sightings by lead ## t = -2.

3485, df = 158.

23, p-value = 0.

02008 ## alternative hypothesis: true difference in means not equal to 0 ## 95 percent confidence interval: ## -2.

4356485 -0.

2103888 ## sample estimates: ## mean in group Donald Trump mean in group Hillary Clinton ## 3.

059334 4.

382353What the code did was count the number of sightings per county and then take the average number of sightings per county for those that voted for Trump and those that voted for Clinton.

Those averages can be seen in the “sample estimates” part of the output.

Clinton’s mean is larger, but again, this could be due to chance.

If we look at the p-value, though, we see .

02.

This number is the estimate of how likely we are to see results this extreme.

Since 2% is less than the 5% threshold that we saw earlier, we can reject the hypothesis that there is no difference between the number of sightings in Trump and Clinton counties.

This means that counties that voted for Donald Trump had, on average, 1.

2 less Bigfoot sightings than those that voted for Clinton.

So Bigfoot has a much larger presence in Democratic counties, huh?.Seems like I might be wrong about a Republican Bigfoot…5.

0 Visual RepresentationsOkay, so Clinton counties may have had a higher average number of sightings, but maybe that’s because she had a smaller number of counties with a large number of sightings.

Maybe Trump counties’ average was lower because there are a lot more of them.

Let’s make a graphic to compare the proportions of Bigfoot sightings between the two sets of counties.

# Plotting the proportion of counties with Bigfoot sigtings (1869–2017) combined %>% distinct(county, .

keep_all = TRUE) %>% select(lead) %>% group_by(lead) %>% summarize(n = n()) %>% mutate(prop = paste(round(n/sum(n), 4) * 100, “%”, sep = “”)) %>% ggplot(aes(x = lead, y = n, fill = lead, label = prop)) + geom_col() + geom_text(aes(family = “Futura Medium”), vjust = -0.

25) + scale_fill_manual(breaks = c(“Donald Trump”, “Hillary Clinton”), values = c(auggie_pink, auggie_blue)) + labs(title = “2016 election results by counties with a bigfoot sighting”, subtitle = “sightings from 1869–2017”, x = “”, y = “number of counties”, caption = “an auggie heschmeyer visual”) + theme_classic() + theme(text = element_text(family = “Futura Medium”), legend.

position = “none”, plot.

title = element_text(hjust = 0.

5), plot.

subtitle = element_text(hjust = 0.

5))Whoa.

It looks like my suspicion was right.

There are a lot more Trump counties with Bigfoot sightings.

What this chart tells me is that Bigfoots (Bigfeet?) have, historically, lived in counties that voted Republican in the last election.

But how do I rectify this with the results of the t-test that showed Clinton counties with more average sightings?.Has Bigfoot been going on vacation to the same Democratic counties and been spotted there over and over again?.Maybe a map showing the sightings will help me sort things out.

# Plotting all Bigfoot sightings on a map combined %>% filter(longitude > -135) %>% ggplot(aes(x = longitude, y = latitude, color = lead)) + geom_polygon(data = states, aes(x = long, y = lat, group = group), fill = NA, color = “grey”, show.

legend = FALSE) + geom_point(alpha = 0.

5) + scale_color_manual(breaks = c(“Donald Trump”, “Hillary Clinton”), values = c(auggie_pink, auggie_blue)) + coord_quickmap() + labs(title = “bigfoot sightings (1869–2017)”, subtitle = “colored by sighting county’s 2016 presidential candidate”, color = “”, caption = “an auggie heschmeyer visual”) + theme_void() + theme(text = element_text(family = “Futura Medium”), legend.

position = “bottom”, plot.

title = element_text(hjust = 0.

5), plot.

subtitle = element_text(hjust = 0.

5))This definitely clears things up.

Trump won a lot of sparsely-populated, rural counties throughout the US.

“Sparsely-populated and rural” sounds a lot like places Bigfoot may want to live.

All of those pink dots represent Bigfoot sightings in Trump counties and most of them aren’t near any major metropolis.

The blue dots, however, do seem to be centered around those metropolises.

This supports my theory that perhaps, like the rest of us, Bigfoot enjoys visiting the city and given how many people there are in the city, the chances of him/her being spotted by more people goes way up.

6.

0 In ConclusionSo, is Bigfoot a Republican?.While I may have had a lot of fun playing around with this data, I don’t think I can definitively make that call.

Given that he/she lives in rural, Trump-leaning counties, it seems like a safe assumption, though.

Or maybe Bigfoot is a Democrat, but just can’t afford rent in the city.

Perhaps we’ll see Bigfeet of the US unite and vote for Elizabeth Warren in 2020 as we can only assume that her wealth redistribution plan includes hairy, upright-walking, ape-like creatures.

Thank you for reading along.

I hope to see you in the next case study.

.

. More details

Leave a Reply