Rate of New Cancers in the United States All Types of Cancer, All Ages, All Races/Ethnicities, Male and Female Rate per 100,000 people
USCS_OverviewMap <- read.csv("C:/Users/Joe/Downloads/USCS_OverviewMap.csv")
USCS_OverviewMap$Area <-gsub("[^a-zA-Z]", "", USCS_OverviewMap$Area)
USCS_OverviewMap$CancerType <-gsub("[^a-zA-Z]", "", USCS_OverviewMap$CancerType)
USCS_OverviewMap$Year <- as.numeric(stringr::str_extract(USCS_OverviewMap$Year, "\\d+"))
USCS_OverviewMap$Rate <- as.numeric(stringr::str_extract(USCS_OverviewMap$AgeAdjustedRate, "\\d+"))
USCS_OverviewMap <- arrange(USCS_OverviewMap, Area)
USCS_TopTen <- read.csv("C:/Users/Joe/Downloads/USCS_TopTen.csv")
USCS_TopTen$CancerType <-gsub("[^a-zA-Z]", "", USCS_TopTen$CancerType)
USCS_TopTen$Rate <- as.numeric(stringr::str_extract(USCS_TopTen$AgeAdjustedRate, "\\d+"))
USCS_TopTen <- arrange(USCS_TopTen, desc(Rate))
top_state <- top_n(df_pop_state,10,value)
top_state
## region value
## 1 delaware 487
## 2 iowa 473
## 3 kentucky 509
## 4 louisiana 473
## 5 maine 473
## 6 new hampshire 480
## 7 new jersey 474
## 8 new york 474
## 9 pennsylvania 482
## 10 west virginia 472
ggplot(data=top_state, aes(x=reorder(region,value), y=value,fill=region)) +
geom_bar(stat="identity")+
theme_minimal()+
coord_flip()
bottom_state <- top_n(df_pop_state,10,-value)
bottom_state
## region value
## 1 arizona 376
## 2 california 385
## 3 colorado 388
## 4 district of columbia 378
## 5 massachusetts 404
## 6 nevada 385
## 7 new mexico 359
## 8 texas 391
## 9 utah 390
## 10 wyoming 402
ggplot(data=bottom_state, aes(x=reorder(region,value), y=value,fill=region)) +
geom_bar(stat="identity")+
theme_minimal()+
coord_flip()
ggplot(data=USCS_TopTen, aes(x=reorder(CancerType,Rate), y=Rate,fill=CancerType)) +
geom_bar(stat="identity")+
theme_minimal()+
labs(title = "Top New Cancer Types in 2016", x="Cancer Type",y="Rate per 100,000 population")+
coord_flip()