The crude death rate is the number of deaths reported each calendar year divided by the population, multiplied by 100,000. Premature death rate includes all deaths where the deceased is younger than 75 years of age. 75 years of age is the standard consideration of a premature death according to the CDC’s definition of Years of Potential Life Loss.
indicator <-fredr_series_observations(series_id = "CDC20N2U006065",
observation_start = as.Date("2010-01-01"))
indicator1 <-fredr_series_observations(series_id = "CDC20N2U006073",
observation_start = as.Date("2010-01-01"))
indicator2 <-fredr_series_observations(series_id = "CDC20N2U006025",
observation_start = as.Date("2010-01-01"))
indicator3 <-fredr_series_observations(series_id = "CDC20N2U006059",
observation_start = as.Date("2010-01-01"))
#Premature Death Rate for Imperial County, CA (CDC20N2U006025)
ggplot() +
geom_line(data=indicator,mapping = aes(x=date,y=value),color="red",size=1) +
geom_text(data = tail(indicator,n=1),
aes(x=date,y = value, label= "Riverside"),
hjust= 1, vjust = 0, size= 3.5,color="red") +
geom_line(data=indicator1,mapping = aes(x=date,y=value),color="blue",size=1) +
geom_text(data = tail(indicator1,n=1),
aes(x=date,y = value, label= "San Diego"),
hjust= 1, vjust = 0, size= 3.5,color="blue") +
geom_line(data=indicator2,mapping = aes(x=date,y=value),color="green4",size=1) +
geom_text(data = tail(indicator2,n=1),
aes(x=date,y = value, label= "Imperial"),
hjust= 1, vjust = 0, size= 3.5,color="green4") +
geom_line(data=indicator3,mapping = aes(x=date,y=value),color="black",size=1) +
geom_text(data = tail(indicator3,n=1),
aes(x=date,y = value, label= "Orange"),
hjust= 1, vjust = 0, size= 3.5,color="black") +
labs(title = "Premature Death Rate by Counties",
subtitle = str_glue("From {min(indicator$date)} through {max(indicator$date)}\nNot seasonally adjusted"),
x="Annual", y="Rate per 100,000",
caption = "Data source: FRED Federal Reserve \n Illustration by @JoeLongSanDiego")+
theme_economist()