Skip to content

Instantly share code, notes, and snippets.

@philippbayer
Created July 2, 2020 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save philippbayer/c04b093a60e1536ee24aba666f8fd805 to your computer and use it in GitHub Desktop.
Save philippbayer/c04b093a60e1536ee24aba666f8fd805 to your computer and use it in GitHub Desktop.
Plotting whether there's a correlation between I've Been Everywhere and Covid-19 cases
```{r setup}
library(tidyverse)
library(ggrepel)
```
```{r}
df <- readxl::read_xlsx('./Covid_vs_State.xlsx')
head(df)
```
```{r}
ggplot(data=df, aes(x=Rank, y=Cases, label=State)) +
geom_point() +
geom_smooth(method='lm') +
cowplot::theme_minimal_hgrid() +
xlab('time a city in the state is first mentioned in "Ive Been Everywhere"') +
ylab('Covid 19 cases per 100k people') +
geom_text_repel()
```
``` # here's the data
# from https://edition.cnn.com/interactive/2020/health/coronavirus-us-maps-and-cases/
# https://en.wikipedia.org/wiki/I%27ve_Been_Everywhere#North_American_versionand
State Cases Rank City
New York 2,026 5 Buffalo
California 605 18 Monterey
Texas 595 10 La Paloma
New Jersey 1,936 6 Winslow
Florida 740 7 Sarasota
Illinois 1,136 2 Chicago
Massachusetts 1,580 13 Boston
Pennsylvania 717
Georgia 793 20 Tallapoosa
Arizona 1,155 31 Arizona
Michigan 712 28 Cadillac
Maryland 1,123 12 Baltimore
North Carolina 636
Virginia 740
Louisiana 1,294 16 Louisiana
Ohio 452 15 Dayton
Connecticut 1,306
Indiana 683
Tennessee 664 22 Tennessee
Alabama 795
South Carolina 736 14 Charleston
Minnesota 651 4 Minnesota
Washington 439 17 Washington
Colorado 573 24 Grand Lake
Iowa 941 23 Spirit Lake
Wisconsin 501 29 Fond du Lac
Mississippi 937
Utah 709
Arkansas 702 8 Wichita
Missouri 343 27 Springfield
Nebraska 998
Nevada 620 1 Reno
Rhode Island 1,591
Kentucky 355 26 Lousville
Kansas 509 21 Oskaloosa
Oklahoma 357 9 Tulsa
New Mexico 585 19 Santa Fe
Delaware 1,182
District of Columbia 1,469
Oregon 212 25 Crater Lake
Puerto Rico 238
South Dakota 772
Idaho 356 30 Idaho
New Hampshire 427
North Dakota 474 3 Fargo
Maine 245 11 Bangor
West Virginia 166
Wyoming 262
Vermont 194
Montana 95
Alaska 133
Hawaii 65
Guam
Other
US Virgin Islands
Northern Mariana Islands
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment