Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deaths not updated #14

Open
himolde110326 opened this issue May 16, 2021 · 2 comments
Open

Deaths not updated #14

himolde110326 opened this issue May 16, 2021 · 2 comments

Comments

@himolde110326
Copy link

Hi, Thanks for this fantastic contribution. I am using this for my schoolwork. Currently learning about ggplot, gganimate and shiny apps.
Succeding in making animated graphs, showing the developement in infected compared to deaths.
The problem is that the data collection of deaths stopped at february 10th. with a total of 592 covid related deaths.

The data is collected through this link: https://raw.githubusercontent.com/thohan88/covid19-nor-data/master/data/03_covid_tests/national_tests.csv.

Is it any chance that you could have a look into this?

@himolde110326
Copy link
Author

Hi again, I think I have solved the problem myself, hope this is satisfactory to you as well. I extracted the data from CSSE:
https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_deaths_global.csv
then I used this code to make an time-serie for the developement of deaths in Norway:

df_death <- read.csv2("https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_deaths_global.csv" ,
header = TRUE,sep = ",", quote = "\"")
df_death$Province.State <- as.factor(df_death$Province.State) #
df_death$Country.Region <- as.factor(df_death$Country.Region)
df_death$Lat <- as.numeric(df_death$Lat)
df_death$Long <- as.numeric(df_death$Long)

df_death_Nor <- df_death %>%
filter(Country.Region == "Norway") # Filter out Norway in a smaller dataset.

rm(df_death)

names(df_death_Nor)[-1:-4] <- as.character(as.Date(names(df_death_Nor)[-1:-4],
format="X%m.%d.%y")) #Convert column names into dates.

df_death_Nor <- reshape2::melt(df_death_Nor, id.vars=1:4, variable.name="date") #reshape dataset.
df_death_Nor$date <- as.Date(df_death_Nor$date, tz = "UTC")

Hope you can use this in your excellent covid19 site.

@minrk
Copy link

minrk commented Jan 13, 2022

FWIW, this is fixed by #13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants