-
Notifications
You must be signed in to change notification settings - Fork 6
/
country-report.Rmd
154 lines (120 loc) · 5.57 KB
/
country-report.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
---
title: "Tuberculosis Report"
output: html_document
params:
country: "United Kingdom"
interactive: FALSE
---
```{r setup, include = FALSE}
knitr::opts_chunk$set(echo = FALSE,
warnings = FALSE,
eval = TRUE)
```
```{r report-setup, include = FALSE, results = "hide"}
## Load the package
library(getTBinR)
## Load additional packages
library(ggplot2)
## Get the data
tb <- get_tb_burden(verbose = FALSE)
## Get the data dictionary
dict <- get_data_dict(verbose = FALSE)
##Assign parameters
country <- params$country
interactive <- params$interactive
```
## TB incidence rates
```{r get country-stats, include = FALSE, results = "hide"}
inc_sum <- summarise_metric(tb, "e_inc_100k", country)
```
In `r inc_sum$year` `r country` had an estimated Tuberculosis incidence rate of `r inc_sum$metric` per 100,000 people making it number `r inc_sum$world_rank` in the world and number `r inc_sum$region_rank` regionally. In the last 10 years this has changed by `r inc_sum$avg_change` on average each year.
### Regional and Global Trends Comparision
```{r}
plot_tb_burden_summary(countries = country,
metric_label = "e_inc_100k",
compare_to_world = TRUE,
compare_to_region = TRUE,
compare_all_regions = FALSE,
annual_change = FALSE,
facet = "Area",
scales = "free_y",
legend = "none",
interactive = interactive,
verbose = FALSE)
```
## Rates Regional Breakdown
```{r, fig.height = 8, fig.width = 8 }
plot_tb_burden_overview(countries = country,
compare_to_region = TRUE,
interactive = interactive,
verbose = FALSE)
```
## Case Detection Rates (CDR)
```{r, include = FALSE, results = "hide"}
cdr_sum <- summarise_metric(tb, "c_cdr", country)
```
`r country` had an estimated case detection rate of `r cdr_sum$metric`% in `r cdr_sum$year` making it number `r cdr_sum$world_rank` in the world (with number 1 having the highest CDR) and number `r cdr_sum$region_rank` regionally. In the last 10 years this has changed by `r cdr_sum$avg_change` on average each year.
### Regional Breakdown
```{r, fig.height = 8, fig.width = 8}
plot_tb_burden_overview(metric = "c_cdr",
countries = country,
compare_to_region = TRUE,
interactive = interactive,
verbose = FALSE)
```
## TB mortality rates - excluding HIV
```{r, include = FALSE, results = "hide"}
mort_exc_hiv_sum <- summarise_metric(tb, "e_mort_exc_tbhiv_100k", country)
```
In `r mort_exc_hiv_sum$year` `r country` had an estimated Tuberculosis mortality rate (excluding HIV) of `r mort_exc_hiv_sum$metric` per 100,000 people making it number `r mort_exc_hiv_sum$world_rank` in the world and number `r mort_exc_hiv_sum$region_rank` regionally. In the last 10 years this has changed by `r mort_exc_hiv_sum$avg_change` on average each year.
### Proportion of TB Cases that Died (excluding HIV) - Regional and Global Comparision
```{r, fig.height = 8, fig.width = 12}
plot_tb_burden_summary(metric = "e_mort_exc_tbhiv_num",
denom = "e_inc_num",
rate_scale = 100,
countries = country,
compare_to_region = TRUE,
compare_all_regions = FALSE,
interactive = interactive,
verbose = FALSE,
facet = "Area",
scales = "free_y",
legend = "none") +
labs(y = "Proportion (%) of TB cases that died (excluding HIV)")
```
### Rates Regional Breakdown
```{r, fig.height = 8, fig.width = 8}
plot_tb_burden_overview(metric = "e_mort_exc_tbhiv_100k",
countries = country,
compare_to_region = TRUE,
interactive = interactive,
verbose = FALSE)
```
## TB HIV related mortality rates
```{r, include = FALSE, results = "hide"}
mort_inc_hiv_sum <- summarise_metric(tb, "e_mort_tbhiv_100k", country)
```
In `r mort_inc_hiv_sum$year` `r country` had an estimated Tuberculosis mortality rate (related to HIV) of `r mort_inc_hiv_sum$metric` per 100,000 people making it number `r mort_inc_hiv_sum$world_rank` in the world and number `r mort_inc_hiv_sum$region_rank` regionally. In the last 10 years this has changed by `r mort_inc_hiv_sum$avg_change` on average each year.
### Proportion of TB Cases that Died (related to HIV) - Regional and Global Comparision
```{r, fig.height = 8, fig.width = 12}
plot_tb_burden_summary(metric = "e_mort_tbhiv_num",
denom = "e_inc_num",
rate_scale = 100,
countries = country,
compare_to_region = TRUE,
compare_all_regions = FALSE,
interactive = interactive,
verbose = FALSE,
facet = "Area",
scales = "free_y",
legend = "none") +
labs(y = "Proportion (%) of TB cases that died (related to HIV)")
```
### Rates Regional Breakdown
```{r, fig.height = 8, fig.width = 8}
plot_tb_burden_overview(metric = "e_mort_tbhiv_100k",
countries = country,
compare_to_region = TRUE,
interactive = interactive,
verbose = FALSE)
```