-
Notifications
You must be signed in to change notification settings - Fork 18
/
supported-countries.Rmd
78 lines (65 loc) · 2.39 KB
/
supported-countries.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
---
title: "Supported countries and their support status"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Supported countries and their support status}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```
```{r, include = FALSE}
library(covidregionaldata)
library(dplyr)
library(knitr)
library(dplyr)
library(ggplot2)
library(sf)
```
## Countries with subnational data
This map shows what countries have level 1 and level 2 subregion data directly from an official source within that country. Please note other countries may be provided through our interface to external data sources, such as `WHO()` and `JHU()`.
```{r, supported_region_plot, echo=FALSE, message=FALSE}
regional_countries <- get_available_datasets() %>%
filter(type == "regional")
regional_countries_l2 <- regional_countries %>%
filter(!(is.na(level_2_region)))
world <- map_data("world")
supported_countries <- mutate(
world,
fill = case_when(
region %in% regional_countries_l2[["class"]] ~ "Level 2",
region %in% regional_countries[["class"]] ~ "Level 1",
TRUE ~ "Unsupported"
)
)
ggplot(supported_countries, aes(long, lat, fill = fill, group = group)) +
geom_polygon(color = "black", lwd = 0.1) +
scale_fill_manual(
name = "",
values = c("#0072b2", "#cc79a7", "grey80")
) +
theme_void() +
theme(legend.position = "bottom") +
coord_sf(ylim = c(-55, 80))
```
## Status
Dataset status is shown in the table below. Please see our [hosted page](https://epiforecasts.io/covidregionaldata/articles/supported-countries.html) for up to date information for the CRAN status of data sets. Please note that due to our release schedule datasets may remain non-functional if broken using the CRAN version for some time even if fixed on GitHub. Also note that transient issues may affect our testing of datasets and so our checks may occasionally show a spurious failure.
```{r, echo = FALSE}
datasets <- get_available_datasets() %>%
arrange(origin) %>%
select(Origin = origin, Method = class) %>%
mutate(
`GitHub status` = paste0(
"[![", Method,
"](https://github.com/epiforecasts/covidregionaldata/workflows/",
Method, "/badge.svg)]",
"(https://github.com/epiforecasts/covidregionaldata/actions/workflows/", # nolint
Method, ".yaml)"
)
)
kable(datasets)
```