df <- read.csv ('https://raw.githubusercontent.com/ulklc/covid19-
timeseries/master/countryReport/raw/rawReport.csv',
stringsAsFactors = FALSE)
df8 <- read.csv ('https://raw.githubusercontent.com/hirenvadher954/Worldometers-
Scraping/master/countries.csv',
stringsAsFactors = FALSE)
install.packages("tidyverse")
library(tidyverse)
df %>%
left_join(df8, by = c("countryName" = "country_name")) %>%
mutate(population = as.numeric(str_remove_all(population, ","))) %>%
group_by(countryName) %>%
group_by(countryName) %>%
unique() %>%
summarize(population = sum(population, na.rm = TRUE),
confirmed = sum(confirmed, na.rm = TRUE),
recovered = sum(recovered, na.rm = TRUE),
death = sum(death, na.rm = TRUE),
death_prop = paste0(as.character(death), "/", as.character(population))
)
в этом коде
рассчитано население / коэффициент смертности.
самый высокий коэффициент населения / смертности
10 стран.
подтверждено и восстановлено
не будет доступно.
10 x 6
countryName population confirmed recovered death death_prop<br>
<chr> <dbl> <int> <int> <int> <chr><br>
1 Afghanistan 4749258212 141652 16505 3796 3796/4749258212
2 Albania 351091234 37233 22518 1501 1501/351091234<br>
3 Algeria 5349827368 206413 88323 20812 20812/5349827368
4 Andorra 9411324 38518 18054 2015 2015/9411324<br>
5 Angola 4009685184 1620 435 115 115/4009685184<br>
6 Anguilla 1814018 161 92 0 0/1814018<br>
7 Antigua and Barbuda 11947338 1230 514 128 128/11947338<br>
8 Argentina 5513884428 232975 66155 10740 10740/5513884428
9 Armenia 361515646 121702 46955 1626 1626/361515646<br>
10 Aruba 13025452 5194 3135 91 91/13025452
данные являются примером.
информация неверна.