Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

compare_countries.R 1.0 KB

You have to be logged in to leave a comment. Sign In
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
  1. library(readr)
  2. library(ggplot2)
  3. library(dplyr)
  4. library(corrr)
  5. df <- read_delim(file = 'data/preprocessed/DIB_dataset.tsv', delim = '\t')
  6. # What countries have more than 100 confirmed deaths by COVID-19?
  7. df %>%
  8. filter(acc_deaths > 100) %>%
  9. group_by(country_name) %>%
  10. select(country_name, acc_cases) %>%
  11. slice(n()) %>%
  12. arrange(-acc_cases) %>% View
  13. # What are the top 10 countries by lethality rate?
  14. df %>%
  15. select(country_name, lethality_rate_percent) %>%
  16. unique %>%
  17. arrange(-lethality_rate_percent) %>%
  18. slice(1:10) %>%
  19. View
  20. # What's the pearson correlation among the localization categories in Google's
  21. # Community Mobility Reports dataset?
  22. df %>%
  23. select(retail_recreation, grocery_pharmacy, parks, transit_stations,
  24. workplaces, residential) %>%
  25. na.omit() %>%
  26. cor %>% View
  27. # What about number of physicians per 1000 people, lethality and population
  28. # density?
  29. df %>%
  30. select(lethality_rate_percent,
  31. `health_personnel:_physicians_(per_1000_population)_2018`,
  32. population_density_2019) %>%
  33. na.omit() %>%
  34. cor %>% View
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...