lsb_data <- read_csv("./inst/extdata/Mortality 1967 and Prior - Mortality.csv")
lsb_data %<>%
rename(`< 1 year` = `Under 1 year`) %>%
mutate(`1-4 years` = `1 year` + `2 years` + `3 years` + `4 years`) %>%
rename(`5-9 years` = `5 to 9 years`)%>%
rename(`10-14 years` =`10 to 14 years`) %>%
rename(`15-19 years` = `15 to 19 years`) %>%
rename(`20-24 years` = `20 to 24 years`) %>%
mutate(`25-34 years` = `25 to 29 years` + `30 to 34 years`) %>%
mutate(`35-44 years` = `35 to 39 years` + `40 to 44 years`) %>%
mutate(`45-54 years` = `45 to 49 years` + `50 to 54 years`) %>%
mutate(`55-64 years` = `55 to 59 years` + `60 to 64 years`) %>%
mutate(`65-74 years` = `65 to 69 years` + `70 to 74 years`) %>%
mutate(`75-84 years` = `75 to 79 years` + `80 to 84 years`) %>%
mutate(`85+ years` = `85 to 89 years` + `90 to 94 years` +
`95 to 99 years` + `100 years and over` ) %>%
rename(`Not Stated` = `Not stated`) %>%
select(Year, Race, Sex, `< 1 year`, `1-4 years`, `5-9 years`,
`10-14 years`, `15-19 years`, `20-24 years`, `25-34 years`,
`35-44 years`, `45-54 years`, `55-64 years`, `65-74 years`,
`75-84 years`, `85+ years`, `Not Stated`) %>%
gather("Age_Group", "Deaths", 4:17) %>%
select(Year, Age_Group, Race, Sex, Deaths)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.