Giter VIP home page Giter VIP logo

Comments (4)

github-actions avatar github-actions commented on July 20, 2024

Thanks for opening an issue! We'll try and get back to you shortly. If you've identified an issue and would like to fix it please see our contribution guidelines.

from covidregionaldata.

seabbs avatar seabbs commented on July 20, 2024

Thanks Billy. As you may have noticed covidregionaldata hasn't had a patch in a fair while so issues may have crept in. Can you post a reprex of what you are doing to get data? In particular what data source are you using for SA?

from covidregionaldata.

bquilty25 avatar bquilty25 commented on July 20, 2024

Hey Sam,

It was with default arguments, so I guess WHO (see below). I haven't tried downloading from source separately yet (https://covid19.who.int/WHO-COVID-19-global-data.csv), but just wanted to flag.

sa_dat <- get_national_data(countries = "South Africa") 

sa_plot <- read_csv("data/owid-covid-data.csv")%>%
  filter(iso_code == "ZAF") %>%
  mutate(date = as.Date(date)) %>%
  filter(date <= as.Date("2023-01-01")) %>% 
  ggplot(aes(x = date, y = new_cases))+
  geom_col(alpha = 0.75, aes(fill = "OWID/WHO"))+
  geom_point(data = sa_dat %>% 
               mutate(date = as.Date(date)) %>%
               filter(date <= as.Date("2023-01-01")),
             aes(x = date,y = cases_new, fill = "covidregionaldata"))+
  labs(x = "",y = "Daily reported cases")+
  scale_fill_brewer(palette = "Set2")

ggsave("results/sa_cases.png", width=200, height=100, units="mm", dpi=600, bg="white")

from covidregionaldata.

bquilty25 avatar bquilty25 commented on July 20, 2024

Ah looks like it may be an issue with the source data:

sa_dat <- get_national_data(countries = "South Africa")

sa_plot <- read_csv("data/owid-covid-data.csv") %>%
  filter(iso_code == "ZAF") %>%
  mutate(date = as.Date(date)) %>%
  filter(date <= as.Date("2023-01-01")) %>%
  ggplot(aes(x = date, y = new_cases)) +
  geom_col(alpha = 0.75, aes(colour = "OWID/WHO")) +
  geom_point(
    data = sa_dat %>%
      mutate(date = as.Date(date)) %>%
      filter(date <= as.Date("2023-01-01")),
    aes(x = date, y = cases_new, colour = "covidregionaldata")
  ) +
  geom_line(
    data = read_csv("https://covid19.who.int/WHO-COVID-19-global-data.csv") %>%
      filter(Country == "South Africa") %>%
      filter(Date_reported <= as.Date("2023-01-01")),
    aes(x = Date_reported, y = New_cases, colour = "WHO")
  ) +
  labs(x = "", y = "Daily reported cases") +
  scale_colour_brewer(palette = "Set2")

sa_cases

from covidregionaldata.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.