I hereby claim:
- I am nacnudus on github.
- I am nacnudus (https://keybase.io/nacnudus) on keybase.
- I have a public key ASCRo_YM6aOXHQOlSQTyw8plq2ubGwakYHS_kdQ07xiQ9wo
To claim this, I am signing this object:
| # Inspired by http://www.brodrigues.co/blog/2018-09-11-human_to_machine/ | |
| # https://twitter.com/brodriguesco/status/1039604517287931904 | |
| # "You can find the data I will use here. Click on the “Time use” folder and you can download the workbook." | |
| # http://statistiques.public.lu/stat/ReportFolders/ReportFolder.aspx?IF_Language=eng&MainTheme=3&FldrName=1&RFPath=14306 | |
| # This time using experimental unpivotr code to allow custom filtering of header cells, rather than having to reposition them. | |
| # https://github.com/nacnudus/unpivotr/commit/0961ec3c3e17b34755f0fce94db7f5bf380d43ce | |
| library(tidyverse) | |
| library(tidyxl) |
| # Inspired by http://www.brodrigues.co/blog/2018-09-11-human_to_machine/ | |
| # https://twitter.com/brodriguesco/status/1039604517287931904 | |
| # "You can find the data I will use here. Click on the “Time use” folder and you can download the workbook." | |
| # http://statistiques.public.lu/stat/ReportFolders/ReportFolder.aspx?IF_Language=eng&MainTheme=3&FldrName=1&RFPath=14306 | |
| library(tidyverse) | |
| library(tidyxl) | |
| library(unpivotr) | |
| library(lubridate) |
I hereby claim:
To claim this, I am signing this object:
| # To install dependencies | |
| # install.packages(c("devtools", "tidyverse")) | |
| # install_github("openregister/RegistersClientR") | |
| library(tidyverse) | |
| library(RegistersClientR) | |
| register <- rr_register("register") | |
| register %>% |
| # Import the participation data | |
| library(tidyverse) | |
| library(tidyxl) # You'll need the dev versions devtools::install_github("nacnudus/tidyxl") | |
| library(unpivotr) # You'll need the dev versions devtools::install_github("nacnudus/unpivotr") | |
| library(here) | |
| path <- here("inst", "extdata", "australian_marriage_law_postal_survey_2017_-_participation_final.xlsx") | |
| book <- xlsx_cells(path) | |
| formats <- xlsx_formats(path) |
| #' Match the Civil Service People Survey to the government-organisation register | |
| library(tidyverse) | |
| library(RegistersClientR) | |
| #' Download the survey and the register | |
| survey_path <- "https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/659571/Civil_Service_People_Survey_2017_All_Organisation_Scores__CSV_.csv" | |
| survey <- read_csv(survey_path)[, 1:5] | |
| govorg <- |
| # Load all registers into various databases | |
| library(tidyverse) | |
| library(DBI) | |
| library(registr) # https://github.com/nacnudus/registr | |
| library(stringr) | |
| library(getPass) | |
| library(here) | |
| beta <- rr_registers() |
| # Rcpp NAs vs std::vector | |
| library(Rcpp) | |
| cppFunction(" | |
| List test1() { | |
| return List::create( | |
| NumericVector::create(NA_REAL), | |
| IntegerVector::create(NA_INTEGER), | |
| LogicalVector::create(NA_LOGICAL), | |
| CharacterVector::create(NA_STRING)); |
| library(data.table) | |
| ?`[.data.table` | |
| DT <- data.table(x=rep(c("b","a","c"),each=3), y=c(1,3,6), v=1:9) | |
| X <- data.table(x=c("c","b"), v=8:7, foo=c(4,2)) | |
| colnames(DT) | |
| # [1] "x" "y" "v" |
| library(tidyxl) | |
| library(tidyverse) | |
| library(unpivotr) | |
| library(rvest) | |
| library(stringr) | |
| library(ggrepel) | |
| download.file("https://smartstart.services.govt.nz/assets/files/Top-baby-names-1954-2016.xlsx", | |
| destfile = "babynames.xlsx", mode = "wb") | |
| babies <- tidy_xlsx("babynames.xlsx") |