Open himolde110326 opened 3 years ago
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.
FWIW, this is fixed by #13
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?