data-raw/tb_not_ew.R

library(tidyverse)

## TB notification data from england and wales
## sourced from https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/464852/TB_case_notifications_1913_to_2014.pdf

tb_not_ew <-  data_frame(year = c(1913:2016),
                         respiratory = c(80788,
                                         76109,
                                         68309,
                                         68109,
                                         68801,
                                         71631,
                                         61154, 
                                         57844,
                                         56334, 
                                         53422, 
                                         57007, 
                                         57737,
                                         58545,
                                         56212, 
                                         54048,
                                         53047, 
                                         52634, 
                                         50583,
                                         49798, 
                                         46579, 
                                         44482, 
                                         43034, 
                                         39635, 
                                         39336, 
                                         39630, 
                                         37879,
                                         34930,
                                         36151,
                                         39499, 
                                         40629, 
                                         42410,
                                         43794, 
                                         42165, 
                                         42173, 
                                         43159,
                                         43971, 
                                         44480,
                                         42435, 
                                         42695,
                                         41904, 
                                         40917,
                                         36973, 
                                         33580, 
                                         31342, 
                                         28870, 
                                         26391, 
                                         24280, 
                                         20799, 
                                         19051, 
                                         17845, 
                                         16348, 
                                         15019, 
                                         13552, 
                                         12355, 
                                         11023, 
                                         10681, 
                                         9675,
                                         9475, 
                                         9119, 
                                         8689, 
                                         8710, 
                                         8102, 
                                         8208,
                                         7712, 
                                         7121, 
                                         7708, 
                                         6807, 
                                         6670, 
                                         5859,
                                         rep(NA,35)),
                         non_respiratory = c(
                                         36351,
                                         23388,
                                         22283,
                                         22799,
                                         20884,
                                         18942,
                                         16357,
                                         15488,
                                         15368,
                                         15837,
                                         18494,
                                         18711,
                                         19228,
                                         18608,
                                         17697,
                                         17977,
                                         16544,
                                         16818,
                                         16084,
                                         15499, 
                                         14095, 
                                         13694,
                                         12435,
                                         12268, 
                                         12661, 
                                         12810, 
                                         11275,
                                         10421,
                                         11465,
                                         11990,
                                         11932, 
                                         10519, 
                                         9944, 
                                         9116, 
                                         8566, 
                                         8605, 
                                         7561,
                                         6923, 
                                         6744, 
                                         6189,
                                         5629, 
                                         5375,
                                         4554,
                                         4162,
                                         3799, 
                                         3447,
                                         2820, 
                                         2806,
                                         2696, 
                                         2674,
                                         2589, 
                                         2580, 
                                         2551, 
                                         2246,
                                         2183, 
                                         2273, 
                                         2490,
                                         2426,
                                         2578,
                                         2384,
                                         2446,
                                         2575,
                                         2610, 
                                         2386,
                                         2399, 
                                         2604,
                                         2459,
                                         2472,
                                         2269,
                                         rep(NA,35)),
                             pulmonary = c(
                               rep(NA,69),
                               5466,
                               4880, 
                               4535,
                               4293, 
                               4345,
                               3640,
                               3675,
                               3816,
                               3618,
                               3596,
                               3816,
                               3961,
                               3694, 
                               3711,
                               3690, 
                               3947,
                               3926, 
                               3827, 
                               3708, 
                               3748, 
                               4136, 
                               4028, 
                               4133,
                               4441, 
                               4409,
                               4283, 
                               4388, 
                               4542, 
                               4163, 
                               4361, 
                               4266, 
                               3805, 
                               3464, 
                               3092, 
                               3114
                             ),
                             extra_pulmonary = c(
                               rep(NA,69),
                               1944,
                               1923,
                               1606,
                               1564,
                               1648,
                               1446,
                               1489,
                               1616,
                               1586,
                               1840,
                               1983,
                               1960,
                               1897,
                               1897,
                               1964,
                               1912,
                               2161,
                               2317,
                               2517,
                               2601,
                               2685,
                               2756,
                               2964,
                               3378,
                               3432,
                               3471,
                               3530,
                               3727,
                               3633,
                               4010,
                               3903,
                               3560,
                               3107,
                               2738,
                               2634  
                                   )
)


#' Add to package
devtools::use_data(tb_not_ew, overwrite = TRUE)

#' Add as raw csv
write_csv(tb_not_ew, "./data-raw/tb_not_ew.csv")
seabbs/tbinenglanddataclean documentation built on May 4, 2018, 3:41 a.m.