This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(rvest) | |
| library(readr) | |
| library(dplyr) | |
| library(tidyr) | |
| library(lubridate) | |
| ####### | |
| # assuming the DHB subnational population file downloaded | |
| # and cached in the working directory from | |
| # https://figure.nz/table/vEnTmdKKixC0HrEF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Date | Category | Unvaxed | partvaxed | fullvaxed | under12 | ChangeUn | Change2 | Pop2 | Pop1 | PopU | Unv100K | Two100K | ThreeDayU | ThreeDay2 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2021-11-27 | Cases | 3404 | 1661 | 1080 | 1830 | ||||||||||
| 2021-11-28 | Cases | 3449 | 1681 | 1112 | 1876 | 45 | 32 | ||||||||
| 2021-11-29 | Cases | 3491 | 1711 | 1158 | 1938 | 42 | 46 | ||||||||
| 2021-11-30 | Cases | 3518 | 1737 | 1194 | 1982 | 27 | 36 | ||||||||
| 2021-12-01 | Cases | 3563 | 1759 | 1223 | 2029 | 45 | 29 | ||||||||
| 2021-12-02 | Cases | 3623 | 1786 | 1266 | 2070 | 60 | 43 | ||||||||
| 2021-12-03 | Cases | 3651 | 1812 | 1290 | 2083 | 28 | 24 | ||||||||
| 2021-12-04 | Cases | 3677 | 1832 | 1317 | 2105 | 26 | 27 | ||||||||
| 2021-12-05 | Cases | 3703 | 1855 | 1348 | 2131 | 26 | 31 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(readr) | |
| library(dplyr) | |
| library(lubridate) | |
| library(RcppRoll) | |
| library(ggplot2) | |
| library(ggthemes) | |
| library(sf) | |
| library(rmapshaper) | |
| library(tidyr) | |
| library(patchwork) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(rvest) | |
| library(dplyr) | |
| library(lubridate) | |
| library(readr) | |
| library(ggplot2) | |
| library(ggthemes) | |
| library(ggridges) | |
| source("davidise.R") | |
| # saving reports from the website as html into a folder | |
| # called news_item_html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(readr) | |
| library(dplyr) | |
| library(ggplot2) | |
| library(ggthemes) | |
| library(lubridate) | |
| source("davidise.R") # graph styling and saving at twitter size | |
| # extract colorblind pallete in case I want to make strategic use of it | |
| six_cols <- (colorblind_pal()(6)) | |
| # daily full demographic csvs folder | |
| cases_folder <- list.files("daily_all_cases", pattern = "csv$", full.names = TRUE) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(dplyr) | |
| library(lubridate) | |
| library(ggplot2) | |
| library(ggthemes) | |
| library(tidyr) | |
| library(RcppRoll) | |
| # To look at locations of interest, I am taking my own set of infectious vs isolated cases from the 1pm news conference, the csv of individual case details to get location (available as a csv linked from https://www.health.govt.nz/our-work/diseases-and-conditions/covid-19-novel-coronavirus/covid-19-data-and-statistics/covid-19-case-demographics ), and a collection of the location of interest updates kindly provided by @nzgizmoguy on Twitter at https://github.com/gizmoguy/locations-of-interest | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(dplyr) | |
| library(tidyr) | |
| library(ggplot2) | |
| library(ggthemes) | |
| library(scales) | |
| library(lubridate) | |
| library(rvest) | |
| system_time= paste("Update: ", Sys.time()) | |
| txt_data <- " | |
| dhb, pop12+,dosed2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # OECD weekly all cause deaths to mortality rates | |
| # Keep in mind, some countries (Sweden) exclude 3% of deaths from the weekly | |
| # dataset as the day of death is not known | |
| library(OECD) | |
| library(dplyr) | |
| country1 = "NZL" | |
| country2 = "USA" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # MoH is the ministry of Health all cases demographics csv file | |
| # https://www.health.govt.nz/our-work/diseases-and-conditions/covid-19-novel-coronavirus/covid-19-data-and-statistics/covid-19-case-demographics#case-details | |
| library(readr) | |
| library(dplyr) | |
| library(ggplot2) | |
| library(ggthemes) | |
| library(lubridate) | |
| # you need to provide csv name | |
| file_name <- "covid_cases_2021-09-14.csv" |