diff --git a/R/sysdata.rda b/R/sysdata.rda index aec0197..fcac893 100644 Binary files a/R/sysdata.rda and b/R/sysdata.rda differ diff --git a/data-raw/create_aus_skills.R b/data-raw/create_aus_skills.R index 4d782fa..946f5ea 100644 --- a/data-raw/create_aus_skills.R +++ b/data-raw/create_aus_skills.R @@ -1,59 +1,62 @@ -# Reading and cleaning the Australian Skills Classification -# see: https://www.nationalskillscommission.gov.au/australian-skills-classification-resources - -library(tidyverse) -library(glue) -devtools::load_all() - -# include factor variants or nah? -include_factor_variants <- FALSE - -# fun for captial -> title case -to_title <- function(x) str_to_title(x) %>% tools::toTitleCase() - -# Set up -asc_url <- "https://www.nationalskillscommission.gov.au/sites/default/files/2021-03/Australian%20Skills%20Classification%2012-03-2021.xlsx" - -temp_dir <- tempdir() -temp_path <- glue("{temp_dir}/asc.xlsx") - -download.file(asc_url, temp_path, mode = "wb") - -tidy_acs <- function(.data) { - .data %>% - janitor::clean_names() %>% - rename_with(~ str_replace(.x, "title", "name")) %>% - rename_with(~ str_replace(.x, "_desc$", "_description")) %>% - rename_with(~ str_replace(.x, "tech_tool", "technology_tool")) %>% - mutate(across(contains("anzsco_code"), as.character), - across(contains("ranking"), as.integer), - across(contains("score"), as.integer)) -} - -# Read and tidy -asc_descriptions <- readxl::read_excel(temp_path, sheet = 2) %>% - tidy_acs() - -asc_core_competencies <- readxl::read_excel(temp_path, sheet = 3) %>% - tidy_acs() - -asc_core_competencies_descriptions <- readxl::read_excel(temp_path, sheet = 4) %>% - tidy_acs() - -asc_specialist_tasks <- readxl::read_excel(temp_path, sheet = 5) %>% - tidy_acs() - -asc_technology_tools <- readxl::read_excel(temp_path, sheet = 6) %>% - tidy_acs() - -asc_technology_tools_ranking <- readxl::read_excel(temp_path, sheet = 7) %>% - tidy_acs() - -# Export -usethis::use_data(asc_descriptions, - asc_core_competencies, - asc_core_competencies_descriptions, - asc_specialist_tasks, - asc_technology_tools, - asc_technology_tools_ranking, - overwrite = TRUE) +# # Comment out until can get links working again +# # Reading and cleaning the Australian Skills Classification +# # see: https://www.nationalskillscommission.gov.au/australian-skills-classification-resources +# +# library(tidyverse) +# library(glue) +# devtools::load_all() +# +# # include factor variants or nah? +# include_factor_variants <- FALSE +# +# # fun for captial -> title case +# to_title <- function(x) str_to_title(x) %>% tools::toTitleCase() +# +# # Set up +# asc_url <- "https://www.nationalskillscommission.gov.au/sites/default/files/2021-03/Australian%20Skills%20Classification%2012-03-2021.xlsx" +# # new_url_page <- 'https://www.nationalskillscommission.gov.au/australian-skills-classification#resources' +# # new_link <- https://www.nationalskillscommission.gov.au/data/ASC/release-2022.09/Australian%20Skills%20Classification%20-%20November%202022.xlsx +# +# temp_dir <- tempdir() +# temp_path <- glue("{temp_dir}/asc.xlsx") +# +# download.file(asc_url, temp_path, mode = "wb") +# +# tidy_acs <- function(.data) { +# .data %>% +# janitor::clean_names() %>% +# rename_with(~ str_replace(.x, "title", "name")) %>% +# rename_with(~ str_replace(.x, "_desc$", "_description")) %>% +# rename_with(~ str_replace(.x, "tech_tool", "technology_tool")) %>% +# mutate(across(contains("anzsco_code"), as.character), +# across(contains("ranking"), as.integer), +# across(contains("score"), as.integer)) +# } +# +# # Read and tidy +# asc_descriptions <- readxl::read_excel(temp_path, sheet = 2) %>% +# tidy_acs() +# +# asc_core_competencies <- readxl::read_excel(temp_path, sheet = 3) %>% +# tidy_acs() +# +# asc_core_competencies_descriptions <- readxl::read_excel(temp_path, sheet = 4) %>% +# tidy_acs() +# +# asc_specialist_tasks <- readxl::read_excel(temp_path, sheet = 5) %>% +# tidy_acs() +# +# asc_technology_tools <- readxl::read_excel(temp_path, sheet = 6) %>% +# tidy_acs() +# +# asc_technology_tools_ranking <- readxl::read_excel(temp_path, sheet = 7) %>% +# tidy_acs() +# +# # Export +# usethis::use_data(asc_descriptions, +# asc_core_competencies, +# asc_core_competencies_descriptions, +# asc_specialist_tasks, +# asc_technology_tools, +# asc_technology_tools_ranking, +# overwrite = TRUE) diff --git a/data/palette_state_name_2016.rda b/data/palette_state_name_2016.rda index 48d2756..320a91e 100644 Binary files a/data/palette_state_name_2016.rda and b/data/palette_state_name_2016.rda differ diff --git a/data/state_abb_au.rda b/data/state_abb_au.rda index ec80556..30df4e1 100644 Binary files a/data/state_abb_au.rda and b/data/state_abb_au.rda differ diff --git a/data/state_name_au.rda b/data/state_name_au.rda index b656ca4..4e95a90 100644 Binary files a/data/state_name_au.rda and b/data/state_name_au.rda differ