Updating the package version
-Once changes have been completed, reviewed and are ready for use in the wild, you can increment the package version using:
+In general, we’ll be working on a ‘development’ version (x.x.x.9000) of the package in between CRAN releases, which should happen no more than every 1-2 months (CRAN recommendation).
+Once changes have been completed, reviewed and are ready for use in the wild, you should review the R packages guidance for submitting a new version to CRAN. You can increment the package version using:
If you are unsure what kind of version to increment, have a look through lifecycle’s guidance on release types.
Once you’ve incremented the version number, it’ll offer to perform a commit on your behalf. As this happens it will add an update to NEWS.md
, which acts as the changelog for the package. Make sure this is updated correctly and then push to GitHub.
-Once the version has been updated and pushed, create a new GitHub release version.
+Once the version has been updated and pushed, and is accepted and working on CRAN create a new GitHub release version.
+In case it’s useful, we documented some of the initial CRAN release process and tweaks in https://github.com/dfe-analytical-services/dfeR/pull/103.
Lifecyles
The package has lifecycle imported, follow their guidance for the process around deprecating any functions or arguments.
diff --git a/LICENSE.html b/LICENSE.html
index e51712e..5e396e0 100644
--- a/LICENSE.html
+++ b/LICENSE.html
@@ -7,7 +7,7 @@
dfeR
-
1.0.1
+
1.0.1.9000
+
+
dfeR (development version)
+
dfeR 1.0.1
Fix the spacing and printing of the z_replace() warning message, updating the eesyapi URL in the README and removed extraneous package tests.
diff --git a/pkgdown.yml b/pkgdown.yml
index 46c92c3..6b41f33 100644
--- a/pkgdown.yml
+++ b/pkgdown.yml
@@ -3,7 +3,7 @@ pkgdown: 2.1.1
pkgdown_sha: ~
articles:
connecting_to_sql: connecting_to_sql.html
-last_built: 2025-01-16T17:12Z
+last_built: 2025-01-16T17:28Z
urls:
reference: https://dfe-analytical-services.github.io/dfeR/reference
article: https://dfe-analytical-services.github.io/dfeR/articles
diff --git a/reference/comma_sep.html b/reference/comma_sep.html
index 00f0afa..ce399a2 100644
--- a/reference/comma_sep.html
+++ b/reference/comma_sep.html
@@ -9,7 +9,7 @@
dfeR
-
1.0.1
+
1.0.1.9000
diff --git a/reference/countries.html b/reference/countries.html
index f8aeed1..c114936 100644
--- a/reference/countries.html
+++ b/reference/countries.html
@@ -11,7 +11,7 @@
dfeR
- 1.0.1
+ 1.0.1.9000
diff --git a/reference/create_project.html b/reference/create_project.html
index cfd87fb..65c8f5d 100644
--- a/reference/create_project.html
+++ b/reference/create_project.html
@@ -7,7 +7,7 @@
dfeR
- 1.0.1
+ 1.0.1.9000
diff --git a/reference/dfeR-package.html b/reference/dfeR-package.html
index b431a2f..8c8b34e 100644
--- a/reference/dfeR-package.html
+++ b/reference/dfeR-package.html
@@ -9,7 +9,7 @@
dfeR
- 1.0.1
+ 1.0.1.9000
diff --git a/reference/fetch.html b/reference/fetch.html
index 26a3516..35d052d 100644
--- a/reference/fetch.html
+++ b/reference/fetch.html
@@ -9,7 +9,7 @@
dfeR
- 1.0.1
+ 1.0.1.9000
diff --git a/reference/fetch_countries.html b/reference/fetch_countries.html
index 808a866..db86af7 100644
--- a/reference/fetch_countries.html
+++ b/reference/fetch_countries.html
@@ -7,7 +7,7 @@
dfeR
- 1.0.1
+ 1.0.1.9000
diff --git a/reference/fetch_lads.html b/reference/fetch_lads.html
index bdb936b..df98604 100644
--- a/reference/fetch_lads.html
+++ b/reference/fetch_lads.html
@@ -7,7 +7,7 @@
dfeR
- 1.0.1
+ 1.0.1.9000
diff --git a/reference/fetch_las.html b/reference/fetch_las.html
index aeb9c41..3a6ffe6 100644
--- a/reference/fetch_las.html
+++ b/reference/fetch_las.html
@@ -7,7 +7,7 @@
dfeR
- 1.0.1
+ 1.0.1.9000
diff --git a/reference/fetch_regions.html b/reference/fetch_regions.html
index f85ad62..70e5f41 100644
--- a/reference/fetch_regions.html
+++ b/reference/fetch_regions.html
@@ -7,7 +7,7 @@
dfeR
- 1.0.1
+ 1.0.1.9000
diff --git a/reference/fetch_wards.html b/reference/fetch_wards.html
index e30794c..9f85455 100644
--- a/reference/fetch_wards.html
+++ b/reference/fetch_wards.html
@@ -7,7 +7,7 @@
dfeR
- 1.0.1
+ 1.0.1.9000
diff --git a/reference/format_ay.html b/reference/format_ay.html
index 0c49b2e..5921e23 100644
--- a/reference/format_ay.html
+++ b/reference/format_ay.html
@@ -9,7 +9,7 @@
dfeR
- 1.0.1
+ 1.0.1.9000
diff --git a/reference/format_ay_reverse.html b/reference/format_ay_reverse.html
index 2e6eb79..35e1cf2 100644
--- a/reference/format_ay_reverse.html
+++ b/reference/format_ay_reverse.html
@@ -7,7 +7,7 @@
dfeR
- 1.0.1
+ 1.0.1.9000
diff --git a/reference/format_fy.html b/reference/format_fy.html
index ba1bbea..71df413 100644
--- a/reference/format_fy.html
+++ b/reference/format_fy.html
@@ -9,7 +9,7 @@
dfeR
- 1.0.1
+ 1.0.1.9000
diff --git a/reference/format_fy_reverse.html b/reference/format_fy_reverse.html
index 4a461d7..89b98aa 100644
--- a/reference/format_fy_reverse.html
+++ b/reference/format_fy_reverse.html
@@ -7,7 +7,7 @@
dfeR
- 1.0.1
+ 1.0.1.9000
diff --git a/reference/geog_time_identifiers.html b/reference/geog_time_identifiers.html
index 2b00f9d..b9dfbaa 100644
--- a/reference/geog_time_identifiers.html
+++ b/reference/geog_time_identifiers.html
@@ -9,7 +9,7 @@
dfeR
- 1.0.1
+ 1.0.1.9000
diff --git a/reference/get_clean_sql.html b/reference/get_clean_sql.html
index 7aac257..9c8c9c2 100644
--- a/reference/get_clean_sql.html
+++ b/reference/get_clean_sql.html
@@ -7,7 +7,7 @@
dfeR
- 1.0.1
+ 1.0.1.9000
diff --git a/reference/get_ons_api_data.html b/reference/get_ons_api_data.html
index ee356b7..03f737d 100644
--- a/reference/get_ons_api_data.html
+++ b/reference/get_ons_api_data.html
@@ -11,7 +11,7 @@
dfeR
- 1.0.1
+ 1.0.1.9000
diff --git a/reference/index.html b/reference/index.html
index afeef72..d312798 100644
--- a/reference/index.html
+++ b/reference/index.html
@@ -7,7 +7,7 @@
dfeR
- 1.0.1
+ 1.0.1.9000
diff --git a/reference/ons_geog_shorthands.html b/reference/ons_geog_shorthands.html
index f08c0d7..e68eafc 100644
--- a/reference/ons_geog_shorthands.html
+++ b/reference/ons_geog_shorthands.html
@@ -9,7 +9,7 @@
dfeR
- 1.0.1
+ 1.0.1.9000
diff --git a/reference/pretty_filesize.html b/reference/pretty_filesize.html
index 485d06c..d6aa5e0 100644
--- a/reference/pretty_filesize.html
+++ b/reference/pretty_filesize.html
@@ -7,7 +7,7 @@
dfeR
- 1.0.1
+ 1.0.1.9000
diff --git a/reference/pretty_num.html b/reference/pretty_num.html
index 9a1ce84..6eaf8b7 100644
--- a/reference/pretty_num.html
+++ b/reference/pretty_num.html
@@ -27,7 +27,7 @@
dfeR
- 1.0.1
+ 1.0.1.9000
diff --git a/reference/pretty_num_table.html b/reference/pretty_num_table.html
index 83a0d92..817f3b1 100644
--- a/reference/pretty_num_table.html
+++ b/reference/pretty_num_table.html
@@ -13,7 +13,7 @@
dfeR
- 1.0.1
+ 1.0.1.9000
diff --git a/reference/pretty_time_taken.html b/reference/pretty_time_taken.html
index 28a9013..2505599 100644
--- a/reference/pretty_time_taken.html
+++ b/reference/pretty_time_taken.html
@@ -7,7 +7,7 @@
dfeR
- 1.0.1
+ 1.0.1.9000
diff --git a/reference/regions.html b/reference/regions.html
index 678411f..4980003 100644
--- a/reference/regions.html
+++ b/reference/regions.html
@@ -9,7 +9,7 @@
dfeR
- 1.0.1
+ 1.0.1.9000
diff --git a/reference/round_five_up.html b/reference/round_five_up.html
index e440bca..7f7c87e 100644
--- a/reference/round_five_up.html
+++ b/reference/round_five_up.html
@@ -7,7 +7,7 @@
dfeR
- 1.0.1
+ 1.0.1.9000
diff --git a/reference/toggle_message.html b/reference/toggle_message.html
index 87ea06b..4418207 100644
--- a/reference/toggle_message.html
+++ b/reference/toggle_message.html
@@ -11,7 +11,7 @@
dfeR
- 1.0.1
+ 1.0.1.9000
diff --git a/reference/wd_pcon_lad_la_rgn_ctry.html b/reference/wd_pcon_lad_la_rgn_ctry.html
index be34cae..7670de2 100644
--- a/reference/wd_pcon_lad_la_rgn_ctry.html
+++ b/reference/wd_pcon_lad_la_rgn_ctry.html
@@ -11,7 +11,7 @@
dfeR
- 1.0.1
+ 1.0.1.9000
diff --git a/reference/z_replace.html b/reference/z_replace.html
index e6674cc..58f5560 100644
--- a/reference/z_replace.html
+++ b/reference/z_replace.html
@@ -11,7 +11,7 @@
dfeR
- 1.0.1
+ 1.0.1.9000
diff --git a/search.json b/search.json
index 8267943..3dd7801 100644
--- a/search.json
+++ b/search.json
@@ -1 +1 @@
-[{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement statistics.development@education.gov.uk. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired Mozilla’s code conduct enforcement ladder. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contributing to dfeR","title":"Contributing to dfeR","text":"Ideas dfeR first raised GitHub issue anyone free write code create pull request review. detailed discussion contributing R packages tidyverse, please see development contributing guide code review principles. Full knowledge isn’t needed, though awareness general principles may useful.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":"support","dir":"","previous_headings":"","what":"Support","title":"Contributing to dfeR","text":"’re keen anyone DfE able feel comfortable contributing package. questions, like support making changes, let Statistics Development Team know.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":"basics","dir":"","previous_headings":"","what":"Basics","title":"Contributing to dfeR","text":"contributing dfeR work new branch taken main. pull request must reviewed approved least one admin user can merged. ’ve found bug, please file issue illustrates bug minimal reprex example (also help write unit test, needed). See tidyverse guide create great issue advice.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":"fixing-typos","dir":"","previous_headings":"Basics","what":"Fixing typos","title":"Contributing to dfeR","text":"can fix typos, spelling mistakes, grammatical errors documentation directly using GitHub web interface, long changes made source file. generally means ’ll need edit roxygen2 comments .R, .Rd file. can find .R file generates .Rd reading comment first line.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":"bigger-changes","dir":"","previous_headings":"Basics","what":"Bigger changes","title":"Contributing to dfeR","text":"want make bigger change, ’s good idea first file issue make sure someone team agrees change. Packages worth installing aid development : possible, ’d recommend following Test Driven Development (TDD) approach. Though ’re new package development, already code specific function feel free start step 2, copy function package go back step 1 afterwards. Write tests using testthat behaviour want. Either edit existing test script, adding new function, create test script using: Feel free look /tests/test_that folder examples want see example tests practice. Write just enough code tests pass. , either edit existing function, add new R script using: Add documentation ’ve done. Follow roxygen2 pattern comments. can add standard skeleton using Code > Insert Roxygen Skeleton Ctrl+Shift+Alt+R R script. ’s example looks like basic add() function: Continue improve code keeping tests passing. Automatically style code using: Run full check package using following functions:","code":"install.packages(\"devtools\") install.packages(\"usethis\") install.packages(\"pkgdown\") install.packages(\"roxygen2\") install.packages(\"spelling\") install.packages(\"lintr\") install.packages(\"styler\") usethis::use_test(\"name_of_new_function\") usethis::use_r(\"name_of_new_function\") #' @description Add together two numbers #' #' @param x A number. #' @param y A number. #' @return A number. #' @examples #' add(1, 1) #' add(10, 1) add <- function(x, y) { x + y } styler::style_pkg() devtools::check() # General package check, can also use Ctrl-Shift-E lintr::lint_package() # Check formatting of code spelling::spell_check() # Check for spelling mistakes"},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":"handy-workflows","dir":"","previous_headings":"","what":"Handy workflows","title":"Contributing to dfeR","text":"Keyboard shortcuts devtools package use RStudio: recommend using usethis package possible consistency simplicity.","code":"load_all() # (Ctrl-Shift-L): Load code with dfeR package test() # (Ctrl-Shift-T): Run tests document() # (Ctrl-Shift-D): Rebuild docs and NAMESPACE check() # (Ctrl-Shift-E): Check complete package"},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":"adding-package-dependencies","dir":"","previous_headings":"","what":"Adding package dependencies","title":"Contributing to dfeR","text":"Add packages package users need : Add packages package developers may need :","code":"usethis::use_package(pkgname) usethis::use_package(pkgname, type = \"suggests\")"},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":"updating-the-readme","dir":"","previous_headings":"","what":"Updating the README","title":"Contributing to dfeR","text":"two README files linked pre-commit-hook ensure kept sync. Make changes README.Rmd file run following line rebuild:","code":"devtools::build_readme()"},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":"pkgdown-site","dir":"","previous_headings":"","what":"pkgdown site","title":"Contributing to dfeR","text":"pkgdown site automatically generated. theme set _pkgdown.yml file. Custom CSS can set pkgdown/extra.css file. make edits file need re-initialise site using following line: site hosted GitHub pages. build preview pkgdown site locally running:","code":"pkgdown::init_site() devtools::build_site()"},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":"updating-the-package-version","dir":"","previous_headings":"","what":"Updating the package version","title":"Contributing to dfeR","text":"changes completed, reviewed ready use wild, can increment package version using: unsure kind version increment, look lifecycle’s guidance release types. ’ve incremented version number, ’ll offer perform commit behalf. happens add update NEWS.md, acts changelog package. Make sure updated correctly push GitHub. version updated pushed, create new GitHub release version.","code":"usethis::use_version()"},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":"lifecyles","dir":"","previous_headings":"Updating the package version","what":"Lifecyles","title":"Contributing to dfeR","text":"package lifecycle imported, follow guidance process around deprecating functions arguments.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":"code-style","dir":"","previous_headings":"","what":"Code style","title":"Contributing to dfeR","text":"New code follow tidyverse style guide. use lintr scan styling pull requests, automatically run add comments code failing standards ’d expect. happen, please proactively resolve unlikely approve pull requests styling issues. can use styler package apply styling using: check styling issues locally, use: styler fix linting issues, recommend using first, using lintr check places may need manually fix styling issues line length using snake_case.","code":"styler::style_pkg() lintr::lint_package()"},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":"folder-and-script-structure-conventions","dir":"","previous_headings":"","what":"Folder and script structure conventions","title":"Contributing to dfeR","text":"R package allowed sub directories R/ folder. possible : one script per function one script per function family function belongs family script share name function family. needed _utils.R script used internal functions relate specific family. Documentation data shipped packages kept R/datasets_documentation.R. Scripts used preparing data used package R folder, data-raw/ folder, helper functions can found R/datasets_utils.R folder, details maintaining data sets can found Package data header page. utils.R used hold cross-package helpers aren’t exported functions specific family. Every exported function data set gets test script, called test-.R test-data-.R data set.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":"testing","dir":"","previous_headings":"Folder and script structure conventions","what":"Testing","title":"Contributing to dfeR","text":"use testthat unit tests, expect new functions level test coverage. want see examples existing tests inspiration, take look inside tests/testthat/ folder.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":"test-coverage","dir":"","previous_headings":"Folder and script structure conventions","what":"Test coverage","title":"Contributing to dfeR","text":"GitHub Actions workflows check link package codecov.io, runs automatic scans check % lines functions testing. dfeR codecov pages can preview variation branch commit see impact changes made. need create account login using GitHub see pages. current % coverage shown badge package README GitHub. worth noting 100% coverage mean tests perfect, means lines ran tests, ’s measure quantity rather quality. Interesting see though, ’d recommend using spot potential elements complicated functions may forgotten test.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":"spelling","dir":"","previous_headings":"Folder and script structure conventions","what":"Spelling","title":"Contributing to dfeR","text":"spelling package used check spelling. custom word list exceptions package exists inst/ folder. messages devtools::check() output ’s potential spelling errors. Please review fix genuine errors. can run check using: automatically pick genuine new words package add list, use:","code":"spelling::spell_check_package() spelling::update_wordlist()"},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":"adding-vignettes","dir":"","previous_headings":"","what":"Adding vignettes","title":"Contributing to dfeR","text":"Vignettes can found vignettes/ folder .Rmd files. start new one use:","code":"usethis::use_vignette(\"name_of_vignette\")"},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":"package-data","dir":"","previous_headings":"","what":"Package data","title":"Contributing to dfeR","text":"general workflow data package : Make sure everything need installed package loaded devtools::load_all() Use relevant script data-raw/ generate save data set Document data set R/datasets_documentation.R Update relevant fetch_ functions use data appropriate Run usual package checks re-documenting package update general principle data created reproducible code, ’s custom data ’re defining, write code. ’re sourcing elsewhere, try make use API connections. saves unnecessary data storage bloat makes scripts nice reproducible without external dependencies worry . try keep data-raw/ scripts tidy possible, helper functions created R/datasets-utils.R. exported users package used scripts data-raw/ folder creation data exported package. Sometimes running scripts create new data sets might hit error: , try restarting R, making sure project open, package loaded using devtools::load_all() run . details maintaining data R package generally, see chapter 7 Data, R packages Hadley Wickham Jennifer Bryan.","code":"Error in `check_is_package()`: i use_data() is designed to work with packages X Project \"some letters and numbers\" is not an R package."},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":"geography-data-sets","dir":"","previous_headings":"Package data","what":"Geography data sets","title":"Contributing to dfeR","text":"package export number data sets derived ONS Open Geography portal easy reuse within DfE analysis. Whenever new data appears want make updates need manually.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":"source","dir":"","previous_headings":"Package data > Geography data sets","what":"Source","title":"Contributing to dfeR","text":"can, use API get data, completely reproducible pipelines (rather saving static files manually check updates made, worry file storage). ONS Open Geography portal, usually looking data published feature feature layer, ones made available via API connection. ’ll able preview data browser basic searching / filtering table want visualise . feature data option somewhere ‘want use data’ (something similar update website design) can get API explorer allows run basic query browser. can usually find dataset_id also parameters want use get data need. get_ons_api_data() function acts wrapper ONS API, things like converting readable parameters query string also handles batching multiple requests needed, get data one nice neat data frame (’s limit rows per single query API). Make use function first, though ’re looking expand function ’s anything get_ons_api_data() function doesn’t ’d like , check boundr package need, gives number methods extracting data portal well. neither existing function boundr package need, can look raising suggestion dfeR ’s DfE specific request, boundr ’s general request. way ONS publish varied first years publishing, top data set individual API connection every year boundaries. ’s link time ONS side helper functions defined R/datasets_utils.R wrap single neat time series bundle us. Given likelihood variations, don’t surprised adding new years data sets results errors first time around, manual fudgery often needed roll sleeves prepare get elbow deep murky depths R/datasets_utils.R file! also data just define code curate , like custom regions publish DfE lookup table shorthands used column names ONS.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":"workflow-for-updating-geography-data","dir":"","previous_headings":"Package data > Geography data sets","what":"Workflow for updating geography data","title":"Contributing to dfeR","text":"general workflow data package : Add new year relevant script data-raw/ script Run script create new data set Run package checks make sure data hasn’t gone funky Update fetch_ functions use data appropriate Document changes data set R/datasets_documentation.R appropriate data sets tests fail soon number rows columns change, provide reliable service users, also catch remind us maintain documentation row number column names defined R/datasets_documentation.R. tests fail, update relevant documentation, (!) update test expectations match new documentation. fetch_ family functions R/fetch.R act quick helpers pull data sets export, users can ees-ily grab say list Scottish Parliamentary Constituencies 2024, rather needing pull whole data frame process . Often adding new year data , need edit year variables set near start data-raw/ file also relevant fetch_ function @param year, well updating public documentation data set R/datasets_documentation.R.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Contributing to dfeR","text":"Please note dfeR project released Contributor Code Conduct. contributing project agree abide terms.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"GNU General Public License","title":"GNU General Public License","text":"Version 3, 29 June 2007Copyright © 2007 Free Software Foundation, Inc. Everyone permitted copy distribute verbatim copies license document, changing allowed.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/LICENSE.html","id":"preamble","dir":"","previous_headings":"","what":"Preamble","title":"GNU General Public License","text":"GNU General Public License free, copyleft license software kinds works. licenses software practical works designed take away freedom share change works. contrast, GNU General Public License intended guarantee freedom share change versions program–make sure remains free software users. , Free Software Foundation, use GNU General Public License software; applies also work released way authors. can apply programs, . speak free software, referring freedom, price. General Public Licenses designed make sure freedom distribute copies free software (charge wish), receive source code can get want , can change software use pieces new free programs, know can things. protect rights, need prevent others denying rights asking surrender rights. Therefore, certain responsibilities distribute copies software, modify : responsibilities respect freedom others. example, distribute copies program, whether gratis fee, must pass recipients freedoms received. must make sure , , receive can get source code. must show terms know rights. Developers use GNU GPL protect rights two steps: (1) assert copyright software, (2) offer License giving legal permission copy, distribute /modify . developers’ authors’ protection, GPL clearly explains warranty free software. users’ authors’ sake, GPL requires modified versions marked changed, problems attributed erroneously authors previous versions. devices designed deny users access install run modified versions software inside , although manufacturer can . fundamentally incompatible aim protecting users’ freedom change software. systematic pattern abuse occurs area products individuals use, precisely unacceptable. Therefore, designed version GPL prohibit practice products. problems arise substantially domains, stand ready extend provision domains future versions GPL, needed protect freedom users. Finally, every program threatened constantly software patents. States allow patents restrict development use software general-purpose computers, , wish avoid special danger patents applied free program make effectively proprietary. prevent , GPL assures patents used render program non-free. precise terms conditions copying, distribution modification follow.","code":""},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/LICENSE.html","id":"id_0-definitions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"0. Definitions","title":"GNU General Public License","text":"“License” refers version 3 GNU General Public License. “Copyright” also means copyright-like laws apply kinds works, semiconductor masks. “Program” refers copyrightable work licensed License. licensee addressed “”. “Licensees” “recipients” may individuals organizations. “modify” work means copy adapt part work fashion requiring copyright permission, making exact copy. resulting work called “modified version” earlier work work “based ” earlier work. “covered work” means either unmodified Program work based Program. “propagate” work means anything , without permission, make directly secondarily liable infringement applicable copyright law, except executing computer modifying private copy. Propagation includes copying, distribution (without modification), making available public, countries activities well. “convey” work means kind propagation enables parties make receive copies. Mere interaction user computer network, transfer copy, conveying. interactive user interface displays “Appropriate Legal Notices” extent includes convenient prominently visible feature (1) displays appropriate copyright notice, (2) tells user warranty work (except extent warranties provided), licensees may convey work License, view copy License. interface presents list user commands options, menu, prominent item list meets criterion.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/LICENSE.html","id":"id_1-source-code","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"1. Source Code","title":"GNU General Public License","text":"“source code” work means preferred form work making modifications . “Object code” means non-source form work. “Standard Interface” means interface either official standard defined recognized standards body, , case interfaces specified particular programming language, one widely used among developers working language. “System Libraries” executable work include anything, work whole, () included normal form packaging Major Component, part Major Component, (b) serves enable use work Major Component, implement Standard Interface implementation available public source code form. “Major Component”, context, means major essential component (kernel, window system, ) specific operating system () executable work runs, compiler used produce work, object code interpreter used run . “Corresponding Source” work object code form means source code needed generate, install, (executable work) run object code modify work, including scripts control activities. However, include work’s System Libraries, general-purpose tools generally available free programs used unmodified performing activities part work. example, Corresponding Source includes interface definition files associated source files work, source code shared libraries dynamically linked subprograms work specifically designed require, intimate data communication control flow subprograms parts work. Corresponding Source need include anything users can regenerate automatically parts Corresponding Source. Corresponding Source work source code form work.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/LICENSE.html","id":"id_2-basic-permissions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"2. Basic Permissions","title":"GNU General Public License","text":"rights granted License granted term copyright Program, irrevocable provided stated conditions met. License explicitly affirms unlimited permission run unmodified Program. output running covered work covered License output, given content, constitutes covered work. License acknowledges rights fair use equivalent, provided copyright law. may make, run propagate covered works convey, without conditions long license otherwise remains force. may convey covered works others sole purpose make modifications exclusively , provide facilities running works, provided comply terms License conveying material control copyright. thus making running covered works must exclusively behalf, direction control, terms prohibit making copies copyrighted material outside relationship . Conveying circumstances permitted solely conditions stated . Sublicensing allowed; section 10 makes unnecessary.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/LICENSE.html","id":"id_3-protecting-users-legal-rights-from-anti-circumvention-law","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"3. Protecting Users’ Legal Rights From Anti-Circumvention Law","title":"GNU General Public License","text":"covered work shall deemed part effective technological measure applicable law fulfilling obligations article 11 WIPO copyright treaty adopted 20 December 1996, similar laws prohibiting restricting circumvention measures. convey covered work, waive legal power forbid circumvention technological measures extent circumvention effected exercising rights License respect covered work, disclaim intention limit operation modification work means enforcing, work’s users, third parties’ legal rights forbid circumvention technological measures.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/LICENSE.html","id":"id_4-conveying-verbatim-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"4. Conveying Verbatim Copies","title":"GNU General Public License","text":"may convey verbatim copies Program’s source code receive , medium, provided conspicuously appropriately publish copy appropriate copyright notice; keep intact notices stating License non-permissive terms added accord section 7 apply code; keep intact notices absence warranty; give recipients copy License along Program. may charge price price copy convey, may offer support warranty protection fee.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/LICENSE.html","id":"id_5-conveying-modified-source-versions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"5. Conveying Modified Source Versions","title":"GNU General Public License","text":"may convey work based Program, modifications produce Program, form source code terms section 4, provided also meet conditions: ) work must carry prominent notices stating modified , giving relevant date. b) work must carry prominent notices stating released License conditions added section 7. requirement modifies requirement section 4 “keep intact notices”. c) must license entire work, whole, License anyone comes possession copy. License therefore apply, along applicable section 7 additional terms, whole work, parts, regardless packaged. License gives permission license work way, invalidate permission separately received . d) work interactive user interfaces, must display Appropriate Legal Notices; however, Program interactive interfaces display Appropriate Legal Notices, work need make . compilation covered work separate independent works, nature extensions covered work, combined form larger program, volume storage distribution medium, called “aggregate” compilation resulting copyright used limit access legal rights compilation’s users beyond individual works permit. Inclusion covered work aggregate cause License apply parts aggregate.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/LICENSE.html","id":"id_6-conveying-non-source-forms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"6. Conveying Non-Source Forms","title":"GNU General Public License","text":"may convey covered work object code form terms sections 4 5, provided also convey machine-readable Corresponding Source terms License, one ways: ) Convey object code , embodied , physical product (including physical distribution medium), accompanied Corresponding Source fixed durable physical medium customarily used software interchange. b) Convey object code , embodied , physical product (including physical distribution medium), accompanied written offer, valid least three years valid long offer spare parts customer support product model, give anyone possesses object code either (1) copy Corresponding Source software product covered License, durable physical medium customarily used software interchange, price reasonable cost physically performing conveying source, (2) access copy Corresponding Source network server charge. c) Convey individual copies object code copy written offer provide Corresponding Source. alternative allowed occasionally noncommercially, received object code offer, accord subsection 6b. d) Convey object code offering access designated place (gratis charge), offer equivalent access Corresponding Source way place charge. need require recipients copy Corresponding Source along object code. place copy object code network server, Corresponding Source may different server (operated third party) supports equivalent copying facilities, provided maintain clear directions next object code saying find Corresponding Source. Regardless server hosts Corresponding Source, remain obligated ensure available long needed satisfy requirements. e) Convey object code using peer--peer transmission, provided inform peers object code Corresponding Source work offered general public charge subsection 6d. separable portion object code, whose source code excluded Corresponding Source System Library, need included conveying object code work. “User Product” either (1) “consumer product”, means tangible personal property normally used personal, family, household purposes, (2) anything designed sold incorporation dwelling. determining whether product consumer product, doubtful cases shall resolved favor coverage. particular product received particular user, “normally used” refers typical common use class product, regardless status particular user way particular user actually uses, expects expected use, product. product consumer product regardless whether product substantial commercial, industrial non-consumer uses, unless uses represent significant mode use product. “Installation Information” User Product means methods, procedures, authorization keys, information required install execute modified versions covered work User Product modified version Corresponding Source. information must suffice ensure continued functioning modified object code case prevented interfered solely modification made. convey object code work section , , specifically use , User Product, conveying occurs part transaction right possession use User Product transferred recipient perpetuity fixed term (regardless transaction characterized), Corresponding Source conveyed section must accompanied Installation Information. requirement apply neither third party retains ability install modified object code User Product (example, work installed ROM). requirement provide Installation Information include requirement continue provide support service, warranty, updates work modified installed recipient, User Product modified installed. Access network may denied modification materially adversely affects operation network violates rules protocols communication across network. Corresponding Source conveyed, Installation Information provided, accord section must format publicly documented (implementation available public source code form), must require special password key unpacking, reading copying.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/LICENSE.html","id":"id_7-additional-terms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"7. Additional Terms","title":"GNU General Public License","text":"“Additional permissions” terms supplement terms License making exceptions one conditions. Additional permissions applicable entire Program shall treated though included License, extent valid applicable law. additional permissions apply part Program, part may used separately permissions, entire Program remains governed License without regard additional permissions. convey copy covered work, may option remove additional permissions copy, part . (Additional permissions may written require removal certain cases modify work.) may place additional permissions material, added covered work, can give appropriate copyright permission. Notwithstanding provision License, material add covered work, may (authorized copyright holders material) supplement terms License terms: ) Disclaiming warranty limiting liability differently terms sections 15 16 License; b) Requiring preservation specified reasonable legal notices author attributions material Appropriate Legal Notices displayed works containing ; c) Prohibiting misrepresentation origin material, requiring modified versions material marked reasonable ways different original version; d) Limiting use publicity purposes names licensors authors material; e) Declining grant rights trademark law use trade names, trademarks, service marks; f) Requiring indemnification licensors authors material anyone conveys material (modified versions ) contractual assumptions liability recipient, liability contractual assumptions directly impose licensors authors. non-permissive additional terms considered “restrictions” within meaning section 10. Program received , part , contains notice stating governed License along term restriction, may remove term. license document contains restriction permits relicensing conveying License, may add covered work material governed terms license document, provided restriction survive relicensing conveying. add terms covered work accord section, must place, relevant source files, statement additional terms apply files, notice indicating find applicable terms. Additional terms, permissive non-permissive, may stated form separately written license, stated exceptions; requirements apply either way.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/LICENSE.html","id":"id_8-termination","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"8. Termination","title":"GNU General Public License","text":"may propagate modify covered work except expressly provided License. attempt otherwise propagate modify void, automatically terminate rights License (including patent licenses granted third paragraph section 11). However, cease violation License, license particular copyright holder reinstated () provisionally, unless copyright holder explicitly finally terminates license, (b) permanently, copyright holder fails notify violation reasonable means prior 60 days cessation. Moreover, license particular copyright holder reinstated permanently copyright holder notifies violation reasonable means, first time received notice violation License (work) copyright holder, cure violation prior 30 days receipt notice. Termination rights section terminate licenses parties received copies rights License. rights terminated permanently reinstated, qualify receive new licenses material section 10.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/LICENSE.html","id":"id_9-acceptance-not-required-for-having-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"9. Acceptance Not Required for Having Copies","title":"GNU General Public License","text":"required accept License order receive run copy Program. Ancillary propagation covered work occurring solely consequence using peer--peer transmission receive copy likewise require acceptance. However, nothing License grants permission propagate modify covered work. actions infringe copyright accept License. Therefore, modifying propagating covered work, indicate acceptance License .","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/LICENSE.html","id":"id_10-automatic-licensing-of-downstream-recipients","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"10. Automatic Licensing of Downstream Recipients","title":"GNU General Public License","text":"time convey covered work, recipient automatically receives license original licensors, run, modify propagate work, subject License. responsible enforcing compliance third parties License. “entity transaction” transaction transferring control organization, substantially assets one, subdividing organization, merging organizations. propagation covered work results entity transaction, party transaction receives copy work also receives whatever licenses work party’s predecessor interest give previous paragraph, plus right possession Corresponding Source work predecessor interest, predecessor can get reasonable efforts. may impose restrictions exercise rights granted affirmed License. example, may impose license fee, royalty, charge exercise rights granted License, may initiate litigation (including cross-claim counterclaim lawsuit) alleging patent claim infringed making, using, selling, offering sale, importing Program portion .","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/LICENSE.html","id":"id_11-patents","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"11. Patents","title":"GNU General Public License","text":"“contributor” copyright holder authorizes use License Program work Program based. work thus licensed called contributor’s “contributor version”. contributor’s “essential patent claims” patent claims owned controlled contributor, whether already acquired hereafter acquired, infringed manner, permitted License, making, using, selling contributor version, include claims infringed consequence modification contributor version. purposes definition, “control” includes right grant patent sublicenses manner consistent requirements License. contributor grants non-exclusive, worldwide, royalty-free patent license contributor’s essential patent claims, make, use, sell, offer sale, import otherwise run, modify propagate contents contributor version. following three paragraphs, “patent license” express agreement commitment, however denominated, enforce patent (express permission practice patent covenant sue patent infringement). “grant” patent license party means make agreement commitment enforce patent party. convey covered work, knowingly relying patent license, Corresponding Source work available anyone copy, free charge terms License, publicly available network server readily accessible means, must either (1) cause Corresponding Source available, (2) arrange deprive benefit patent license particular work, (3) arrange, manner consistent requirements License, extend patent license downstream recipients. “Knowingly relying” means actual knowledge , patent license, conveying covered work country, recipient’s use covered work country, infringe one identifiable patents country reason believe valid. , pursuant connection single transaction arrangement, convey, propagate procuring conveyance , covered work, grant patent license parties receiving covered work authorizing use, propagate, modify convey specific copy covered work, patent license grant automatically extended recipients covered work works based . patent license “discriminatory” include within scope coverage, prohibits exercise , conditioned non-exercise one rights specifically granted License. may convey covered work party arrangement third party business distributing software, make payment third party based extent activity conveying work, third party grants, parties receive covered work , discriminatory patent license () connection copies covered work conveyed (copies made copies), (b) primarily connection specific products compilations contain covered work, unless entered arrangement, patent license granted, prior 28 March 2007. Nothing License shall construed excluding limiting implied license defenses infringement may otherwise available applicable patent law.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/LICENSE.html","id":"id_12-no-surrender-of-others-freedom","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"12. No Surrender of Others’ Freedom","title":"GNU General Public License","text":"conditions imposed (whether court order, agreement otherwise) contradict conditions License, excuse conditions License. convey covered work satisfy simultaneously obligations License pertinent obligations, consequence may convey . example, agree terms obligate collect royalty conveying convey Program, way satisfy terms License refrain entirely conveying Program.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/LICENSE.html","id":"id_13-use-with-the-gnu-affero-general-public-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"13. Use with the GNU Affero General Public License","title":"GNU General Public License","text":"Notwithstanding provision License, permission link combine covered work work licensed version 3 GNU Affero General Public License single combined work, convey resulting work. terms License continue apply part covered work, special requirements GNU Affero General Public License, section 13, concerning interaction network apply combination .","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/LICENSE.html","id":"id_14-revised-versions-of-this-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"14. Revised Versions of this License","title":"GNU General Public License","text":"Free Software Foundation may publish revised /new versions GNU General Public License time time. new versions similar spirit present version, may differ detail address new problems concerns. version given distinguishing version number. Program specifies certain numbered version GNU General Public License “later version” applies , option following terms conditions either numbered version later version published Free Software Foundation. Program specify version number GNU General Public License, may choose version ever published Free Software Foundation. Program specifies proxy can decide future versions GNU General Public License can used, proxy’s public statement acceptance version permanently authorizes choose version Program. Later license versions may give additional different permissions. However, additional obligations imposed author copyright holder result choosing follow later version.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/LICENSE.html","id":"id_15-disclaimer-of-warranty","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"15. Disclaimer of Warranty","title":"GNU General Public License","text":"WARRANTY PROGRAM, EXTENT PERMITTED APPLICABLE LAW. EXCEPT OTHERWISE STATED WRITING COPYRIGHT HOLDERS /PARTIES PROVIDE PROGRAM “” WITHOUT WARRANTY KIND, EITHER EXPRESSED IMPLIED, INCLUDING, LIMITED , IMPLIED WARRANTIES MERCHANTABILITY FITNESS PARTICULAR PURPOSE. ENTIRE RISK QUALITY PERFORMANCE PROGRAM . PROGRAM PROVE DEFECTIVE, ASSUME COST NECESSARY SERVICING, REPAIR CORRECTION.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/LICENSE.html","id":"id_16-limitation-of-liability","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"16. Limitation of Liability","title":"GNU General Public License","text":"EVENT UNLESS REQUIRED APPLICABLE LAW AGREED WRITING COPYRIGHT HOLDER, PARTY MODIFIES /CONVEYS PROGRAM PERMITTED , LIABLE DAMAGES, INCLUDING GENERAL, SPECIAL, INCIDENTAL CONSEQUENTIAL DAMAGES ARISING USE INABILITY USE PROGRAM (INCLUDING LIMITED LOSS DATA DATA RENDERED INACCURATE LOSSES SUSTAINED THIRD PARTIES FAILURE PROGRAM OPERATE PROGRAMS), EVEN HOLDER PARTY ADVISED POSSIBILITY DAMAGES.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/LICENSE.html","id":"id_17-interpretation-of-sections-15-and-16","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"17. Interpretation of Sections 15 and 16","title":"GNU General Public License","text":"disclaimer warranty limitation liability provided given local legal effect according terms, reviewing courts shall apply local law closely approximates absolute waiver civil liability connection Program, unless warranty assumption liability accompanies copy Program return fee. END TERMS CONDITIONS","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/LICENSE.html","id":"how-to-apply-these-terms-to-your-new-programs","dir":"","previous_headings":"","what":"How to Apply These Terms to Your New Programs","title":"GNU General Public License","text":"develop new program, want greatest possible use public, best way achieve make free software everyone can redistribute change terms. , attach following notices program. safest attach start source file effectively state exclusion warranty; file least “copyright” line pointer full notice found. Also add information contact electronic paper mail. program terminal interaction, make output short notice like starts interactive mode: hypothetical commands show w show c show appropriate parts General Public License. course, program’s commands might different; GUI interface, use “box”. also get employer (work programmer) school, , sign “copyright disclaimer” program, necessary. information , apply follow GNU GPL, see . GNU General Public License permit incorporating program proprietary programs. program subroutine library, may consider useful permit linking proprietary applications library. want , use GNU Lesser General Public License instead License. first, please read .","code":" Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free software, and you are welcome to redistribute it under certain conditions; type 'show c' for details."},{"path":"https://dfe-analytical-services.github.io/dfeR/PULL_REQUEST_TEMPLATE.html","id":null,"dir":"","previous_headings":"","what":"Brief overview of changes","title":"Brief overview of changes","text":"…","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/PULL_REQUEST_TEMPLATE.html","id":"why-are-these-changes-being-made","dir":"","previous_headings":"","what":"Why are these changes being made?","title":"Brief overview of changes","text":"…","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/PULL_REQUEST_TEMPLATE.html","id":"detailed-description-of-changes","dir":"","previous_headings":"","what":"Detailed description of changes","title":"Brief overview of changes","text":"…","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/PULL_REQUEST_TEMPLATE.html","id":"additional-information-for-reviewers","dir":"","previous_headings":"","what":"Additional information for reviewers","title":"Brief overview of changes","text":"…","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/PULL_REQUEST_TEMPLATE.html","id":"issue-ticket-numbers-and-link","dir":"","previous_headings":"","what":"Issue ticket number/s and link","title":"Brief overview of changes","text":"…","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/articles/connecting_to_sql.html","id":"pre-requisites","dir":"Articles","previous_headings":"","what":"Pre-requisites","title":"Connecting to SQL","text":"connect SQL need SQL drivers installed. come standard currently Microsoft SQL Server Management Studio downloads Department Education’s software center. Make sure downloaded latest version starting.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/articles/connecting_to_sql.html","id":"connecting-to-a-database","dir":"Articles","previous_headings":"","what":"Connecting to a database","title":"Connecting to SQL","text":"Usually DfE use combination odbc DBI connect SQL databases. connect vary depending whether ’re running R code laptop, part deployed R Shiny app. running code laptop can automatically use Windows login (trusted connection) grant access database, package can automatically detect user details. advice finding database details, connecting SQL database R Shiny app deployed server, please contact Statistics Development Team able advise setup steps required. Note server name may include backslashes, ’ll need make sure two backslashes R code due way special characters escaped. example, SQL Server Management Studio (SSMS) Azure Data Studio might call server T1PRANMSQL\\SQLPROD,60125, R adding server name ’d need call T1PRANMSQL\\\\SQLPROD,60125.","code":"# Library calls ==== library(odbc) library(DBI) # Database connection ==== con <- DBI::dbConnect(odbc::odbc(), Driver = \"ODBC Driver 17 for SQL Server\", Server = \"server_name\", Database = \"database_name\", UID = \"\", PWD = \"\", Trusted_Connection = \"Yes\" )"},{"path":"https://dfe-analytical-services.github.io/dfeR/articles/connecting_to_sql.html","id":"reading-a-sql-script-into-r","dir":"Articles","previous_headings":"","what":"Reading a SQL script into R","title":"Connecting to SQL","text":"number standard characters found SQL scripts can cause issues reading SQL script within R created get_clean_sql() function assist . Assume connected database assigned connection con variable, use following line read cleaned version SQL script R. get_clean_sql() ignore lines code start USE specify database, database already specified connection setup.","code":"sql_query <- dfeR::get_clean_sql(\"path_to_sql_file.sql\")"},{"path":"https://dfe-analytical-services.github.io/dfeR/articles/connecting_to_sql.html","id":"executing-the-sql-query","dir":"Articles","previous_headings":"","what":"Executing the SQL query","title":"Connecting to SQL","text":"Now SQL query saved variable R environment can pass function execute database. ’s number potential ways , though common way use dbGetQuery() DBI package, setting statement cleaned SQL query. ’s important note dbGetQuery() intended work ‘SELECT’ style queries . ’re something isn’t ‘SELECT’ query, writing back SQL, consider using dbExecute() dbSendQuery() functions DBI package instead. side note, SQL query short, write directly function :","code":"sql_query_result <- DBI::dbGetQuery(con, statement = sql_query) sql_query_result <- DBI::dbGetQuery( con, statement = \"SELECT * FROM [my_database_table]\" )"},{"path":"https://dfe-analytical-services.github.io/dfeR/articles/connecting_to_sql.html","id":"troubleshooting","dir":"Articles","previous_headings":"Executing the SQL query","what":"Troubleshooting","title":"Connecting to SQL","text":"first advice hit error, check SQL script runs SQL Server Management Studio (SSMS) Azure Data Studio valid SQL ‘SELECT’ query returns single output. Assuming runs fine SSMS, next thing try set additional settings cleaning SQL script. can additional_settings argument get_clean_sql() function. add additional settings start SQL query sometimes necessary odbc DBI connection correctly execute query. troubleshooting tips, please see Interacting SQL database section Analysts’ Guide, contact Statistics Development Team support.","code":"sql_query <- dfeR::get_clean_sql( \"path_to_sql_file.sql\", additional_settings = TRUE )"},{"path":"https://dfe-analytical-services.github.io/dfeR/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Cam Race. Author, maintainer. Department Education, England. Copyright holder. Laura Selby. Author. Adam Robinson. Author. Jen Machin. Contributor. Jake Tufts. Contributor. Rich Bielby. Contributor. Menna Zayed. Contributor. Lauren Snaathorst. Contributor.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Race C, Selby L, Robinson (2025). dfeR: Common Department Education Analysis Tasks. R package version 1.0.1, https://github.com/dfe-analytical-services/dfeR, https://dfe-analytical-services.github.io/dfeR/.","code":"@Manual{, title = {dfeR: Common Department for Education Analysis Tasks}, author = {Cam Race and Laura Selby and Adam Robinson}, year = {2025}, note = {R package version 1.0.1, https://github.com/dfe-analytical-services/dfeR}, url = {https://dfe-analytical-services.github.io/dfeR/}, }"},{"path":"https://dfe-analytical-services.github.io/dfeR/index.html","id":"dfer-","dir":"","previous_headings":"","what":"Common Department for Education Analysis Tasks","title":"Common Department for Education Analysis Tasks","text":"goal dfeR help standardise R programming across Department Education (DfE), facilitate sharing business specific functions, making code easier read write. Credit lauraselby logo featuring Frederick!","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/index.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Common Department for Education Analysis Tasks","text":"package open DfE anything think useful programmers analysts can contributed. Functionality dfeR expected focus around following: DfE specific formatting helper functions Working DfE databases Templates analytical projects API wrappers commonly needed DfE analysis (don’t separate package) Geography lookup files helper functions Documentation included package far pkgdown site.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/index.html","id":"relevant-other-packages","dir":"","previous_headings":"Scope","what":"Relevant other packages","title":"Common Department for Education Analysis Tasks","text":"also maintain dfeshiny package, expect functions specific R Shiny applications live . connecting data explore education statistics, building eesyapi package. giasr package, developed connecting data get information schools service. DfE specific data dfeR package taken Open Geography Portal. ’re looking getting new data portal also worth looking boundr package, gives functions directly extracting data .","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Common Department for Education Analysis Tasks","text":"dfeR available CRAN can install directly : can install development version GitHub. using renv project (recommended): Otherwise:","code":"install.packages(\"dfeR\") renv::install(\"dfe-analytical-services/dfeR\") # install.packages(\"devtools\") devtools::install_github(\"dfe-analytical-services/dfeR\")"},{"path":"https://dfe-analytical-services.github.io/dfeR/index.html","id":"proxy","dir":"","previous_headings":"","what":"Proxy","title":"Common Department for Education Analysis Tasks","text":"need setting proxy settings order able work R Git within DfE estate now ended. previously run proxy script previous versions dfeR package, contact Statistics Development Team assist cleaning system settings.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/index.html","id":"contributing","dir":"","previous_headings":"","what":"Contributing","title":"Common Department for Education Analysis Tasks","text":"Ideas dfeR first raised GitHub issue anyone free write code create pull request review. details contributing dfeR, see contributing guidelines.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/index.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Common Department for Education Analysis Tasks","text":"Please note dfeR project released Contributor Code Conduct. contributing project, agree abide terms.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/index.html","id":"examples","dir":"","previous_headings":"","what":"Examples","title":"Common Department for Education Analysis Tasks","text":"example functions within package: details functions available package, examples use , please see dfeR package reference documentation.","code":"library(dfeR) # Prettify large numbers pretty_num(111111111, gbp = TRUE) #> [1] \"£111 million\" pretty_num(-11^8, dp = -1) #> [1] \"-210 million\" # Convert bytes to readable size pretty_filesize(77777777) #> [1] \"77.78 MB\" # Calculate elapsed time and present prettily start <- Sys.time() end <- Sys.time() + 789890 pretty_time_taken(start, end) #> [1] \"219 hours 24 minutes 50 seconds\" # Round 5's up instead of bankers round used by round() in base R round_five_up(2.5) #> [1] 3 round(2.5) # base R #> [1] 2 # Custom formatting for academic and financial years format_ay(202425) #> [1] \"2024/25\" format_fy(202425) #> [1] \"2024-25\" format_ay_reverse(\"2024/25\") #> [1] \"202425\" format_fy_reverse(\"2024-25\") #> [1] \"202425\" # Get Ward to PCon to LAD to LA to Rgn to Ctry lookup file my_data <- dfeR::wd_pcon_lad_la_rgn_ctry head(my_data) # show first 5 rows in console #> first_available_year_included most_recent_year_included #> 1 2017 2017 #> 2 2017 2017 #> 3 2017 2020 #> 4 2017 2017 #> 5 2017 2020 #> 6 2017 2017 #> ward_name pcon_name lad_name la_name #> 1 Bastwell Blackburn Blackburn with Darwen Blackburn with Darwen #> 2 Ormesby Redcar Redcar and Cleveland Redcar and Cleveland #> 3 Burn Valley Hartlepool Hartlepool Hartlepool #> 4 Beardwood with Lammack Blackburn Blackburn with Darwen Blackburn with Darwen #> 5 De Bruce Hartlepool Hartlepool Hartlepool #> 6 St Germain's Redcar Redcar and Cleveland Redcar and Cleveland #> region_name country_name ward_code pcon_code lad_code new_la_code #> 1 North West England E05001621 E14000570 E06000008 E06000008 #> 2 North East England E05001518 E14000891 E06000003 E06000003 #> 3 North East England E05008942 E14000733 E06000001 E06000001 #> 4 North West England E05001622 E14000570 E06000008 E06000008 #> 5 North East England E05008943 E14000733 E06000001 E06000001 #> 6 North East England E05001519 E14000891 E06000003 E06000003 #> region_code country_code #> 1 E12000002 E92000001 #> 2 E12000001 E92000001 #> 3 E12000001 E92000001 #> 4 E12000002 E92000001 #> 5 E12000001 E92000001 #> 6 E12000001 E92000001 # Get all countries dfeR::countries #> country_code country_name #> 1 E92000001 England #> 2 K02000001 United Kingdom #> 3 K03000001 Great Britain #> 4 K04000001 England and Wales #> 5 N92000002 Northern Ireland #> 6 S92000003 Scotland #> 7 W92000004 Wales #> 8 z England, Wales and Northern Ireland #> 9 z Outside of England and unknown #> 10 z Outside of the United Kingdom and unknown # Get all PCon names and codes for 2024 fetch_pcons(2024) |> head() # show first 5 rows only #> pcon_code pcon_name #> 1 S14000045 Midlothian #> 2 S14000027 Na h-Eileanan an Iar #> 3 S14000021 East Renfrewshire #> 4 S14000048 North Ayrshire and Arran #> 5 S14000051 Orkney and Shetland #> 6 E14001440 Redcar # Get All LADs in Scotland in 2017 fetch_lads(2017, \"Scotland\") |> head() # show first 5 rows only #> lad_code lad_name #> 1 S12000019 Midlothian #> 2 S12000015 Fife #> 3 S12000014 Falkirk #> 4 S12000013 Na h-Eileanan Siar #> 5 S12000018 Inverclyde #> 6 S12000011 East Renfrewshire # Get all LAs in Scotland and Northern Ireland in 2022 fetch_las(2022, c(\"Scotland\", \"Northern Ireland\")) |> head() # show first 5 rows only #> new_la_code la_name #> 1 N09000003 Belfast #> 2 N09000004 Causeway Coast and Glens #> 3 N09000002 Armagh City, Banbridge and Craigavon #> 4 N09000005 Derry City and Strabane #> 5 N09000001 Antrim and Newtownabbey #> 6 N09000006 Fermanagh and Omagh # Get all Welsh wards for 2021 fetch_wards(2021, \"Wales\") |> head() # show first 5 rows only #> ward_code ward_name #> 1 W05000981 Aethwy #> 2 W05000982 Bro Aberffraw #> 3 W05000983 Bro Rhosyr #> 4 W05000107 Tregarth & Mynydd Llandygai #> 5 W05000984 Caergybi #> 6 W05000985 Canolbarth Môn # The following have no specific years available and return all values fetch_regions() #> region_code region_name #> 1 E12000001 North East #> 2 E12000002 North West #> 3 E12000003 Yorkshire and The Humber #> 4 E12000004 East Midlands #> 5 E12000005 West Midlands #> 6 E12000006 East of England #> 7 E12000007 London #> 8 E12000008 South East #> 9 E12000009 South West #> 10 E13000001 Inner London #> 11 E13000002 Outer London #> 12 z Outside of England and unknown #> 13 z Outside of the United Kingdom and unknown #> 14 z Outside of England #> 15 z Outside of United Kingdom #> 16 z Unknown fetch_countries() #> country_code country_name #> 1 E92000001 England #> 2 K02000001 United Kingdom #> 3 K03000001 Great Britain #> 4 K04000001 England and Wales #> 5 N92000002 Northern Ireland #> 6 S92000003 Scotland #> 7 W92000004 Wales #> 8 z England, Wales and Northern Ireland #> 9 z Outside of England and unknown #> 10 z Outside of the United Kingdom and unknown"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/comma_sep.html","id":null,"dir":"Reference","previous_headings":"","what":"Comma separate — comma_sep","title":"Comma separate — comma_sep","text":"Adds separating commas big numbers. value numeric return value unchanged string.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/comma_sep.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Comma separate — comma_sep","text":"","code":"comma_sep(number, nsmall = 0L)"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/comma_sep.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Comma separate — comma_sep","text":"number number comma separated nsmall minimum number digits right decimal point","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/comma_sep.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Comma separate — comma_sep","text":"string","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/comma_sep.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Comma separate — comma_sep","text":"","code":"comma_sep(100) #> [1] \"100\" comma_sep(1000) #> [1] \"1,000\" comma_sep(3567000) #> [1] \"3,567,000\""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/countries.html","id":null,"dir":"Reference","previous_headings":"","what":"Lookup for valid country names and codes — countries","title":"Lookup for valid country names and codes — countries","text":"lookup ONS geography country names codes, well custom DfE names codes. used definitive list screening open data published DfE.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/countries.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Lookup for valid country names and codes — countries","text":"","code":"countries"},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/countries.html","id":"countries","dir":"Reference","previous_headings":"","what":"countries","title":"Lookup for valid country names and codes — countries","text":"data frame 10 rows 2 columns: country_name Country name country_code Country code","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/countries.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Lookup for valid country names and codes — countries","text":"curated explore.statistics@education.gov.uk, ONS codes sourced https://geoportal.statistics.gov.uk/search?q=countries%20names%20and%20codes","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/create_project.html","id":null,"dir":"Reference","previous_headings":"","what":"Creates a pre-populated project for DfE R — create_project","title":"Creates a pre-populated project for DfE R — create_project","text":"Creates pre-populated project DfE R","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/create_project.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creates a pre-populated project for DfE R — create_project","text":"","code":"create_project( path, init_renv = TRUE, include_structure_for_pkg = FALSE, create_publication_proj = FALSE, include_github_gitignore, ... )"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/create_project.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creates a pre-populated project for DfE R — create_project","text":"path Path new project init_renv Boolean; initiate renv project. Default set true. include_structure_for_pkg Boolean; Additional folder structure package development. Default set false. create_publication_proj Boolean; folder structure publication project. Default set false. include_github_gitignore Boolean; strict .gitignore file GitHub created. ... Additional parameters, currently used","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/create_project.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creates a pre-populated project for DfE R — create_project","text":"return values, project contents created","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/create_project.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Creates a pre-populated project for DfE R — create_project","text":"function creates new project custom folder structure. sets R/ folder template function scripts, initializes {testthat} adds tests function scripts, builds core project structure, creates .gitignore file, creates readme, optionally initializes {renv}.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/create_project.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Creates a pre-populated project for DfE R — create_project","text":"","code":"if (FALSE) { # \\dontrun{ # Call the function to create a new project dfeR::create_project( path = \"C:/path/to/your/new/project\", init_renv = TRUE, include_structure_for_pkg = FALSE, create_publication_proj = FALSE, include_github_gitignore = TRUE ) } # }"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/dfeR-package.html","id":null,"dir":"Reference","previous_headings":"","what":"dfeR: Common Department for Education Analysis Tasks — dfeR-package","title":"dfeR: Common Department for Education Analysis Tasks — dfeR-package","text":"Preferred methods common analytical tasks undertaken across Department, including number formatting, project templates curated reference data.","code":""},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/dfeR-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"dfeR: Common Department for Education Analysis Tasks — dfeR-package","text":"Maintainer: Cam Race cameron.race@education.gov.uk Authors: Laura Selby laura.selby@education.gov.uk Adam Robinson contributors: Department Education, England statistics.development@education.gov.uk [copyright holder] Jen Machin jen.machin@education.gov.uk [contributor] Jake Tufts jake.tufts@education.gov.uk [contributor] Rich Bielby richard.bielby@education.gov.uk (ORCID) [contributor] Menna Zayed menna.zayed@education.gov.uk [contributor] Lauren Snaathorst lauren.snaathorst@education.gov.uk [contributor]","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch.html","id":null,"dir":"Reference","previous_headings":"","what":"Fetch Westminster parliamentary constituencies — fetch","title":"Fetch Westminster parliamentary constituencies — fetch","text":"Fetch data frame Westminster Parliamentary Constituencies given year country based dfeR::wd_pcon_lad_la_rgn_ctry file","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fetch Westminster parliamentary constituencies — fetch","text":"","code":"fetch_pcons(year = \"All\", countries = \"All\")"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fetch Westminster parliamentary constituencies — fetch","text":"year year filter locations , default \"\", options 2017, 2019, 2020, 2021, 2022\", 2023, 2024 countries vector desired countries filter locations , default \"\", can vector options \"England\", \"Scotland\", \"Wales\" \"Northern Ireland\"","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fetch Westminster parliamentary constituencies — fetch","text":"data frame unique location names codes","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fetch Westminster parliamentary constituencies — fetch","text":"","code":"# Using head() to show only top 5 rows for examples head(fetch_wards()) #> ward_code ward_name #> 1 E05001621 Bastwell #> 2 E05001518 Ormesby #> 3 E05008942 Burn Valley #> 4 E05001622 Beardwood with Lammack #> 5 E05008943 De Bruce #> 6 E05001519 St Germain's head(fetch_pcons()) #> pcon_code pcon_name #> 1 E14000570 Blackburn #> 2 E14000891 Redcar #> 3 E14000733 Hartlepool #> 4 E14000970 Stockton North #> 5 E14000819 Middlesbrough #> 6 E14000971 Stockton South head(fetch_pcons(2023)) #> pcon_code pcon_name #> 1 E14000570 Blackburn #> 2 E14000891 Redcar #> 3 E14000733 Hartlepool #> 4 E14000970 Stockton North #> 5 E14000819 Middlesbrough #> 6 E14000971 Stockton South head(fetch_pcons(countries = \"Scotland\")) #> pcon_code pcon_name #> 1 S14000045 Midlothian #> 2 S14000041 Kirkcaldy and Cowdenbeath #> 3 S14000028 Falkirk #> 4 S14000036 Glenrothes #> 5 S14000027 Na h-Eileanan an Iar #> 6 S14000038 Inverclyde head(fetch_pcons(year = 2023, countries = c(\"England\", \"Wales\"))) #> pcon_code pcon_name #> 1 E14000570 Blackburn #> 2 E14000891 Redcar #> 3 E14000733 Hartlepool #> 4 E14000970 Stockton North #> 5 E14000819 Middlesbrough #> 6 E14000971 Stockton South fetch_lads(2024, \"Wales\") #> lad_code lad_name #> 1 W06000001 Isle of Anglesey #> 2 W06000002 Gwynedd #> 3 W06000003 Conwy #> 4 W06000011 Swansea #> 5 W06000009 Pembrokeshire #> 6 W06000006 Wrexham #> 7 W06000004 Denbighshire #> 8 W06000005 Flintshire #> 9 W06000008 Ceredigion #> 10 W06000010 Carmarthenshire #> 11 W06000012 Neath Port Talbot #> 12 W06000014 Vale of Glamorgan #> 13 W06000022 Newport #> 14 W06000023 Powys #> 15 W06000020 Torfaen #> 16 W06000016 Rhondda Cynon Taf #> 17 W06000019 Blaenau Gwent #> 18 W06000018 Caerphilly #> 19 W06000021 Monmouthshire #> 20 W06000013 Bridgend #> 21 W06000015 Cardiff #> 22 W06000024 Merthyr Tydfil fetch_las(2022, \"Northern Ireland\") #> new_la_code la_name #> 1 N09000003 Belfast #> 2 N09000004 Causeway Coast and Glens #> 3 N09000002 Armagh City, Banbridge and Craigavon #> 4 N09000005 Derry City and Strabane #> 5 N09000001 Antrim and Newtownabbey #> 6 N09000006 Fermanagh and Omagh #> 7 N09000008 Mid and East Antrim #> 8 N09000010 Newry, Mourne and Down #> 9 N09000009 Mid Ulster #> 10 N09000011 Ards and North Down #> 11 N09000007 Lisburn and Castlereagh # The following have no specific years available and return all values fetch_regions() #> region_code region_name #> 1 E12000001 North East #> 2 E12000002 North West #> 3 E12000003 Yorkshire and The Humber #> 4 E12000004 East Midlands #> 5 E12000005 West Midlands #> 6 E12000006 East of England #> 7 E12000007 London #> 8 E12000008 South East #> 9 E12000009 South West #> 10 E13000001 Inner London #> 11 E13000002 Outer London #> 12 z Outside of England and unknown #> 13 z Outside of the United Kingdom and unknown #> 14 z Outside of England #> 15 z Outside of United Kingdom #> 16 z Unknown fetch_countries() #> country_code country_name #> 1 E92000001 England #> 2 K02000001 United Kingdom #> 3 K03000001 Great Britain #> 4 K04000001 England and Wales #> 5 N92000002 Northern Ireland #> 6 S92000003 Scotland #> 7 W92000004 Wales #> 8 z England, Wales and Northern Ireland #> 9 z Outside of England and unknown #> 10 z Outside of the United Kingdom and unknown"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_countries.html","id":null,"dir":"Reference","previous_headings":"","what":"Fetch countries — fetch_countries","title":"Fetch countries — fetch_countries","text":"Fetch countries","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_countries.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fetch countries — fetch_countries","text":"","code":"fetch_countries()"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_countries.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fetch countries — fetch_countries","text":"data frame unique location names codes","code":""},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_countries.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fetch countries — fetch_countries","text":"","code":"# Using head() to show only top 5 rows for examples head(fetch_wards()) #> ward_code ward_name #> 1 E05001621 Bastwell #> 2 E05001518 Ormesby #> 3 E05008942 Burn Valley #> 4 E05001622 Beardwood with Lammack #> 5 E05008943 De Bruce #> 6 E05001519 St Germain's head(fetch_pcons()) #> pcon_code pcon_name #> 1 E14000570 Blackburn #> 2 E14000891 Redcar #> 3 E14000733 Hartlepool #> 4 E14000970 Stockton North #> 5 E14000819 Middlesbrough #> 6 E14000971 Stockton South head(fetch_pcons(2023)) #> pcon_code pcon_name #> 1 E14000570 Blackburn #> 2 E14000891 Redcar #> 3 E14000733 Hartlepool #> 4 E14000970 Stockton North #> 5 E14000819 Middlesbrough #> 6 E14000971 Stockton South head(fetch_pcons(countries = \"Scotland\")) #> pcon_code pcon_name #> 1 S14000045 Midlothian #> 2 S14000041 Kirkcaldy and Cowdenbeath #> 3 S14000028 Falkirk #> 4 S14000036 Glenrothes #> 5 S14000027 Na h-Eileanan an Iar #> 6 S14000038 Inverclyde head(fetch_pcons(year = 2023, countries = c(\"England\", \"Wales\"))) #> pcon_code pcon_name #> 1 E14000570 Blackburn #> 2 E14000891 Redcar #> 3 E14000733 Hartlepool #> 4 E14000970 Stockton North #> 5 E14000819 Middlesbrough #> 6 E14000971 Stockton South fetch_lads(2024, \"Wales\") #> lad_code lad_name #> 1 W06000001 Isle of Anglesey #> 2 W06000002 Gwynedd #> 3 W06000003 Conwy #> 4 W06000011 Swansea #> 5 W06000009 Pembrokeshire #> 6 W06000006 Wrexham #> 7 W06000004 Denbighshire #> 8 W06000005 Flintshire #> 9 W06000008 Ceredigion #> 10 W06000010 Carmarthenshire #> 11 W06000012 Neath Port Talbot #> 12 W06000014 Vale of Glamorgan #> 13 W06000022 Newport #> 14 W06000023 Powys #> 15 W06000020 Torfaen #> 16 W06000016 Rhondda Cynon Taf #> 17 W06000019 Blaenau Gwent #> 18 W06000018 Caerphilly #> 19 W06000021 Monmouthshire #> 20 W06000013 Bridgend #> 21 W06000015 Cardiff #> 22 W06000024 Merthyr Tydfil fetch_las(2022, \"Northern Ireland\") #> new_la_code la_name #> 1 N09000003 Belfast #> 2 N09000004 Causeway Coast and Glens #> 3 N09000002 Armagh City, Banbridge and Craigavon #> 4 N09000005 Derry City and Strabane #> 5 N09000001 Antrim and Newtownabbey #> 6 N09000006 Fermanagh and Omagh #> 7 N09000008 Mid and East Antrim #> 8 N09000010 Newry, Mourne and Down #> 9 N09000009 Mid Ulster #> 10 N09000011 Ards and North Down #> 11 N09000007 Lisburn and Castlereagh # The following have no specific years available and return all values fetch_regions() #> region_code region_name #> 1 E12000001 North East #> 2 E12000002 North West #> 3 E12000003 Yorkshire and The Humber #> 4 E12000004 East Midlands #> 5 E12000005 West Midlands #> 6 E12000006 East of England #> 7 E12000007 London #> 8 E12000008 South East #> 9 E12000009 South West #> 10 E13000001 Inner London #> 11 E13000002 Outer London #> 12 z Outside of England and unknown #> 13 z Outside of the United Kingdom and unknown #> 14 z Outside of England #> 15 z Outside of United Kingdom #> 16 z Unknown fetch_countries() #> country_code country_name #> 1 E92000001 England #> 2 K02000001 United Kingdom #> 3 K03000001 Great Britain #> 4 K04000001 England and Wales #> 5 N92000002 Northern Ireland #> 6 S92000003 Scotland #> 7 W92000004 Wales #> 8 z England, Wales and Northern Ireland #> 9 z Outside of England and unknown #> 10 z Outside of the United Kingdom and unknown"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_lads.html","id":null,"dir":"Reference","previous_headings":"","what":"Fetch local authority districts — fetch_lads","title":"Fetch local authority districts — fetch_lads","text":"Fetch local authority districts","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_lads.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fetch local authority districts — fetch_lads","text":"","code":"fetch_lads(year = \"All\", countries = \"All\")"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_lads.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fetch local authority districts — fetch_lads","text":"year year filter locations , default \"\", options 2017, 2019, 2020, 2021, 2022\", 2023, 2024 countries vector desired countries filter locations , default \"\", can vector options \"England\", \"Scotland\", \"Wales\" \"Northern Ireland\"","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_lads.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fetch local authority districts — fetch_lads","text":"data frame unique location names codes","code":""},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_lads.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fetch local authority districts — fetch_lads","text":"","code":"# Using head() to show only top 5 rows for examples head(fetch_wards()) #> ward_code ward_name #> 1 E05001621 Bastwell #> 2 E05001518 Ormesby #> 3 E05008942 Burn Valley #> 4 E05001622 Beardwood with Lammack #> 5 E05008943 De Bruce #> 6 E05001519 St Germain's head(fetch_pcons()) #> pcon_code pcon_name #> 1 E14000570 Blackburn #> 2 E14000891 Redcar #> 3 E14000733 Hartlepool #> 4 E14000970 Stockton North #> 5 E14000819 Middlesbrough #> 6 E14000971 Stockton South head(fetch_pcons(2023)) #> pcon_code pcon_name #> 1 E14000570 Blackburn #> 2 E14000891 Redcar #> 3 E14000733 Hartlepool #> 4 E14000970 Stockton North #> 5 E14000819 Middlesbrough #> 6 E14000971 Stockton South head(fetch_pcons(countries = \"Scotland\")) #> pcon_code pcon_name #> 1 S14000045 Midlothian #> 2 S14000041 Kirkcaldy and Cowdenbeath #> 3 S14000028 Falkirk #> 4 S14000036 Glenrothes #> 5 S14000027 Na h-Eileanan an Iar #> 6 S14000038 Inverclyde head(fetch_pcons(year = 2023, countries = c(\"England\", \"Wales\"))) #> pcon_code pcon_name #> 1 E14000570 Blackburn #> 2 E14000891 Redcar #> 3 E14000733 Hartlepool #> 4 E14000970 Stockton North #> 5 E14000819 Middlesbrough #> 6 E14000971 Stockton South fetch_lads(2024, \"Wales\") #> lad_code lad_name #> 1 W06000001 Isle of Anglesey #> 2 W06000002 Gwynedd #> 3 W06000003 Conwy #> 4 W06000011 Swansea #> 5 W06000009 Pembrokeshire #> 6 W06000006 Wrexham #> 7 W06000004 Denbighshire #> 8 W06000005 Flintshire #> 9 W06000008 Ceredigion #> 10 W06000010 Carmarthenshire #> 11 W06000012 Neath Port Talbot #> 12 W06000014 Vale of Glamorgan #> 13 W06000022 Newport #> 14 W06000023 Powys #> 15 W06000020 Torfaen #> 16 W06000016 Rhondda Cynon Taf #> 17 W06000019 Blaenau Gwent #> 18 W06000018 Caerphilly #> 19 W06000021 Monmouthshire #> 20 W06000013 Bridgend #> 21 W06000015 Cardiff #> 22 W06000024 Merthyr Tydfil fetch_las(2022, \"Northern Ireland\") #> new_la_code la_name #> 1 N09000003 Belfast #> 2 N09000004 Causeway Coast and Glens #> 3 N09000002 Armagh City, Banbridge and Craigavon #> 4 N09000005 Derry City and Strabane #> 5 N09000001 Antrim and Newtownabbey #> 6 N09000006 Fermanagh and Omagh #> 7 N09000008 Mid and East Antrim #> 8 N09000010 Newry, Mourne and Down #> 9 N09000009 Mid Ulster #> 10 N09000011 Ards and North Down #> 11 N09000007 Lisburn and Castlereagh # The following have no specific years available and return all values fetch_regions() #> region_code region_name #> 1 E12000001 North East #> 2 E12000002 North West #> 3 E12000003 Yorkshire and The Humber #> 4 E12000004 East Midlands #> 5 E12000005 West Midlands #> 6 E12000006 East of England #> 7 E12000007 London #> 8 E12000008 South East #> 9 E12000009 South West #> 10 E13000001 Inner London #> 11 E13000002 Outer London #> 12 z Outside of England and unknown #> 13 z Outside of the United Kingdom and unknown #> 14 z Outside of England #> 15 z Outside of United Kingdom #> 16 z Unknown fetch_countries() #> country_code country_name #> 1 E92000001 England #> 2 K02000001 United Kingdom #> 3 K03000001 Great Britain #> 4 K04000001 England and Wales #> 5 N92000002 Northern Ireland #> 6 S92000003 Scotland #> 7 W92000004 Wales #> 8 z England, Wales and Northern Ireland #> 9 z Outside of England and unknown #> 10 z Outside of the United Kingdom and unknown"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_las.html","id":null,"dir":"Reference","previous_headings":"","what":"Fetch local authorities — fetch_las","title":"Fetch local authorities — fetch_las","text":"Fetch local authorities","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_las.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fetch local authorities — fetch_las","text":"","code":"fetch_las(year = \"All\", countries = \"All\")"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_las.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fetch local authorities — fetch_las","text":"year year filter locations , default \"\", options 2017, 2019, 2020, 2021, 2022\", 2023, 2024 countries vector desired countries filter locations , default \"\", can vector options \"England\", \"Scotland\", \"Wales\" \"Northern Ireland\"","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_las.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fetch local authorities — fetch_las","text":"data frame unique location names codes","code":""},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_las.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fetch local authorities — fetch_las","text":"","code":"# Using head() to show only top 5 rows for examples head(fetch_wards()) #> ward_code ward_name #> 1 E05001621 Bastwell #> 2 E05001518 Ormesby #> 3 E05008942 Burn Valley #> 4 E05001622 Beardwood with Lammack #> 5 E05008943 De Bruce #> 6 E05001519 St Germain's head(fetch_pcons()) #> pcon_code pcon_name #> 1 E14000570 Blackburn #> 2 E14000891 Redcar #> 3 E14000733 Hartlepool #> 4 E14000970 Stockton North #> 5 E14000819 Middlesbrough #> 6 E14000971 Stockton South head(fetch_pcons(2023)) #> pcon_code pcon_name #> 1 E14000570 Blackburn #> 2 E14000891 Redcar #> 3 E14000733 Hartlepool #> 4 E14000970 Stockton North #> 5 E14000819 Middlesbrough #> 6 E14000971 Stockton South head(fetch_pcons(countries = \"Scotland\")) #> pcon_code pcon_name #> 1 S14000045 Midlothian #> 2 S14000041 Kirkcaldy and Cowdenbeath #> 3 S14000028 Falkirk #> 4 S14000036 Glenrothes #> 5 S14000027 Na h-Eileanan an Iar #> 6 S14000038 Inverclyde head(fetch_pcons(year = 2023, countries = c(\"England\", \"Wales\"))) #> pcon_code pcon_name #> 1 E14000570 Blackburn #> 2 E14000891 Redcar #> 3 E14000733 Hartlepool #> 4 E14000970 Stockton North #> 5 E14000819 Middlesbrough #> 6 E14000971 Stockton South fetch_lads(2024, \"Wales\") #> lad_code lad_name #> 1 W06000001 Isle of Anglesey #> 2 W06000002 Gwynedd #> 3 W06000003 Conwy #> 4 W06000011 Swansea #> 5 W06000009 Pembrokeshire #> 6 W06000006 Wrexham #> 7 W06000004 Denbighshire #> 8 W06000005 Flintshire #> 9 W06000008 Ceredigion #> 10 W06000010 Carmarthenshire #> 11 W06000012 Neath Port Talbot #> 12 W06000014 Vale of Glamorgan #> 13 W06000022 Newport #> 14 W06000023 Powys #> 15 W06000020 Torfaen #> 16 W06000016 Rhondda Cynon Taf #> 17 W06000019 Blaenau Gwent #> 18 W06000018 Caerphilly #> 19 W06000021 Monmouthshire #> 20 W06000013 Bridgend #> 21 W06000015 Cardiff #> 22 W06000024 Merthyr Tydfil fetch_las(2022, \"Northern Ireland\") #> new_la_code la_name #> 1 N09000003 Belfast #> 2 N09000004 Causeway Coast and Glens #> 3 N09000002 Armagh City, Banbridge and Craigavon #> 4 N09000005 Derry City and Strabane #> 5 N09000001 Antrim and Newtownabbey #> 6 N09000006 Fermanagh and Omagh #> 7 N09000008 Mid and East Antrim #> 8 N09000010 Newry, Mourne and Down #> 9 N09000009 Mid Ulster #> 10 N09000011 Ards and North Down #> 11 N09000007 Lisburn and Castlereagh # The following have no specific years available and return all values fetch_regions() #> region_code region_name #> 1 E12000001 North East #> 2 E12000002 North West #> 3 E12000003 Yorkshire and The Humber #> 4 E12000004 East Midlands #> 5 E12000005 West Midlands #> 6 E12000006 East of England #> 7 E12000007 London #> 8 E12000008 South East #> 9 E12000009 South West #> 10 E13000001 Inner London #> 11 E13000002 Outer London #> 12 z Outside of England and unknown #> 13 z Outside of the United Kingdom and unknown #> 14 z Outside of England #> 15 z Outside of United Kingdom #> 16 z Unknown fetch_countries() #> country_code country_name #> 1 E92000001 England #> 2 K02000001 United Kingdom #> 3 K03000001 Great Britain #> 4 K04000001 England and Wales #> 5 N92000002 Northern Ireland #> 6 S92000003 Scotland #> 7 W92000004 Wales #> 8 z England, Wales and Northern Ireland #> 9 z Outside of England and unknown #> 10 z Outside of the United Kingdom and unknown"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_regions.html","id":null,"dir":"Reference","previous_headings":"","what":"Fetch regions — fetch_regions","title":"Fetch regions — fetch_regions","text":"Fetch regions","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_regions.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fetch regions — fetch_regions","text":"","code":"fetch_regions()"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_regions.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fetch regions — fetch_regions","text":"data frame unique location names codes","code":""},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_regions.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fetch regions — fetch_regions","text":"","code":"# Using head() to show only top 5 rows for examples head(fetch_wards()) #> ward_code ward_name #> 1 E05001621 Bastwell #> 2 E05001518 Ormesby #> 3 E05008942 Burn Valley #> 4 E05001622 Beardwood with Lammack #> 5 E05008943 De Bruce #> 6 E05001519 St Germain's head(fetch_pcons()) #> pcon_code pcon_name #> 1 E14000570 Blackburn #> 2 E14000891 Redcar #> 3 E14000733 Hartlepool #> 4 E14000970 Stockton North #> 5 E14000819 Middlesbrough #> 6 E14000971 Stockton South head(fetch_pcons(2023)) #> pcon_code pcon_name #> 1 E14000570 Blackburn #> 2 E14000891 Redcar #> 3 E14000733 Hartlepool #> 4 E14000970 Stockton North #> 5 E14000819 Middlesbrough #> 6 E14000971 Stockton South head(fetch_pcons(countries = \"Scotland\")) #> pcon_code pcon_name #> 1 S14000045 Midlothian #> 2 S14000041 Kirkcaldy and Cowdenbeath #> 3 S14000028 Falkirk #> 4 S14000036 Glenrothes #> 5 S14000027 Na h-Eileanan an Iar #> 6 S14000038 Inverclyde head(fetch_pcons(year = 2023, countries = c(\"England\", \"Wales\"))) #> pcon_code pcon_name #> 1 E14000570 Blackburn #> 2 E14000891 Redcar #> 3 E14000733 Hartlepool #> 4 E14000970 Stockton North #> 5 E14000819 Middlesbrough #> 6 E14000971 Stockton South fetch_lads(2024, \"Wales\") #> lad_code lad_name #> 1 W06000001 Isle of Anglesey #> 2 W06000002 Gwynedd #> 3 W06000003 Conwy #> 4 W06000011 Swansea #> 5 W06000009 Pembrokeshire #> 6 W06000006 Wrexham #> 7 W06000004 Denbighshire #> 8 W06000005 Flintshire #> 9 W06000008 Ceredigion #> 10 W06000010 Carmarthenshire #> 11 W06000012 Neath Port Talbot #> 12 W06000014 Vale of Glamorgan #> 13 W06000022 Newport #> 14 W06000023 Powys #> 15 W06000020 Torfaen #> 16 W06000016 Rhondda Cynon Taf #> 17 W06000019 Blaenau Gwent #> 18 W06000018 Caerphilly #> 19 W06000021 Monmouthshire #> 20 W06000013 Bridgend #> 21 W06000015 Cardiff #> 22 W06000024 Merthyr Tydfil fetch_las(2022, \"Northern Ireland\") #> new_la_code la_name #> 1 N09000003 Belfast #> 2 N09000004 Causeway Coast and Glens #> 3 N09000002 Armagh City, Banbridge and Craigavon #> 4 N09000005 Derry City and Strabane #> 5 N09000001 Antrim and Newtownabbey #> 6 N09000006 Fermanagh and Omagh #> 7 N09000008 Mid and East Antrim #> 8 N09000010 Newry, Mourne and Down #> 9 N09000009 Mid Ulster #> 10 N09000011 Ards and North Down #> 11 N09000007 Lisburn and Castlereagh # The following have no specific years available and return all values fetch_regions() #> region_code region_name #> 1 E12000001 North East #> 2 E12000002 North West #> 3 E12000003 Yorkshire and The Humber #> 4 E12000004 East Midlands #> 5 E12000005 West Midlands #> 6 E12000006 East of England #> 7 E12000007 London #> 8 E12000008 South East #> 9 E12000009 South West #> 10 E13000001 Inner London #> 11 E13000002 Outer London #> 12 z Outside of England and unknown #> 13 z Outside of the United Kingdom and unknown #> 14 z Outside of England #> 15 z Outside of United Kingdom #> 16 z Unknown fetch_countries() #> country_code country_name #> 1 E92000001 England #> 2 K02000001 United Kingdom #> 3 K03000001 Great Britain #> 4 K04000001 England and Wales #> 5 N92000002 Northern Ireland #> 6 S92000003 Scotland #> 7 W92000004 Wales #> 8 z England, Wales and Northern Ireland #> 9 z Outside of England and unknown #> 10 z Outside of the United Kingdom and unknown"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_wards.html","id":null,"dir":"Reference","previous_headings":"","what":"Fetch wards — fetch_wards","title":"Fetch wards — fetch_wards","text":"Fetch wards","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_wards.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fetch wards — fetch_wards","text":"","code":"fetch_wards(year = \"All\", countries = \"All\")"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_wards.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fetch wards — fetch_wards","text":"year year filter locations , default \"\", options 2017, 2019, 2020, 2021, 2022\", 2023, 2024 countries vector desired countries filter locations , default \"\", can vector options \"England\", \"Scotland\", \"Wales\" \"Northern Ireland\"","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_wards.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fetch wards — fetch_wards","text":"data frame unique location names codes","code":""},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_wards.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fetch wards — fetch_wards","text":"","code":"# Using head() to show only top 5 rows for examples head(fetch_wards()) #> ward_code ward_name #> 1 E05001621 Bastwell #> 2 E05001518 Ormesby #> 3 E05008942 Burn Valley #> 4 E05001622 Beardwood with Lammack #> 5 E05008943 De Bruce #> 6 E05001519 St Germain's head(fetch_pcons()) #> pcon_code pcon_name #> 1 E14000570 Blackburn #> 2 E14000891 Redcar #> 3 E14000733 Hartlepool #> 4 E14000970 Stockton North #> 5 E14000819 Middlesbrough #> 6 E14000971 Stockton South head(fetch_pcons(2023)) #> pcon_code pcon_name #> 1 E14000570 Blackburn #> 2 E14000891 Redcar #> 3 E14000733 Hartlepool #> 4 E14000970 Stockton North #> 5 E14000819 Middlesbrough #> 6 E14000971 Stockton South head(fetch_pcons(countries = \"Scotland\")) #> pcon_code pcon_name #> 1 S14000045 Midlothian #> 2 S14000041 Kirkcaldy and Cowdenbeath #> 3 S14000028 Falkirk #> 4 S14000036 Glenrothes #> 5 S14000027 Na h-Eileanan an Iar #> 6 S14000038 Inverclyde head(fetch_pcons(year = 2023, countries = c(\"England\", \"Wales\"))) #> pcon_code pcon_name #> 1 E14000570 Blackburn #> 2 E14000891 Redcar #> 3 E14000733 Hartlepool #> 4 E14000970 Stockton North #> 5 E14000819 Middlesbrough #> 6 E14000971 Stockton South fetch_lads(2024, \"Wales\") #> lad_code lad_name #> 1 W06000001 Isle of Anglesey #> 2 W06000002 Gwynedd #> 3 W06000003 Conwy #> 4 W06000011 Swansea #> 5 W06000009 Pembrokeshire #> 6 W06000006 Wrexham #> 7 W06000004 Denbighshire #> 8 W06000005 Flintshire #> 9 W06000008 Ceredigion #> 10 W06000010 Carmarthenshire #> 11 W06000012 Neath Port Talbot #> 12 W06000014 Vale of Glamorgan #> 13 W06000022 Newport #> 14 W06000023 Powys #> 15 W06000020 Torfaen #> 16 W06000016 Rhondda Cynon Taf #> 17 W06000019 Blaenau Gwent #> 18 W06000018 Caerphilly #> 19 W06000021 Monmouthshire #> 20 W06000013 Bridgend #> 21 W06000015 Cardiff #> 22 W06000024 Merthyr Tydfil fetch_las(2022, \"Northern Ireland\") #> new_la_code la_name #> 1 N09000003 Belfast #> 2 N09000004 Causeway Coast and Glens #> 3 N09000002 Armagh City, Banbridge and Craigavon #> 4 N09000005 Derry City and Strabane #> 5 N09000001 Antrim and Newtownabbey #> 6 N09000006 Fermanagh and Omagh #> 7 N09000008 Mid and East Antrim #> 8 N09000010 Newry, Mourne and Down #> 9 N09000009 Mid Ulster #> 10 N09000011 Ards and North Down #> 11 N09000007 Lisburn and Castlereagh # The following have no specific years available and return all values fetch_regions() #> region_code region_name #> 1 E12000001 North East #> 2 E12000002 North West #> 3 E12000003 Yorkshire and The Humber #> 4 E12000004 East Midlands #> 5 E12000005 West Midlands #> 6 E12000006 East of England #> 7 E12000007 London #> 8 E12000008 South East #> 9 E12000009 South West #> 10 E13000001 Inner London #> 11 E13000002 Outer London #> 12 z Outside of England and unknown #> 13 z Outside of the United Kingdom and unknown #> 14 z Outside of England #> 15 z Outside of United Kingdom #> 16 z Unknown fetch_countries() #> country_code country_name #> 1 E92000001 England #> 2 K02000001 United Kingdom #> 3 K03000001 Great Britain #> 4 K04000001 England and Wales #> 5 N92000002 Northern Ireland #> 6 S92000003 Scotland #> 7 W92000004 Wales #> 8 z England, Wales and Northern Ireland #> 9 z Outside of England and unknown #> 10 z Outside of the United Kingdom and unknown"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_ay.html","id":null,"dir":"Reference","previous_headings":"","what":"Format academic year — format_ay","title":"Format academic year — format_ay","text":"function formats academic year variables reporting purposes. convert academic year input 201516 format 2015/16 format.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_ay.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Format academic year — format_ay","text":"","code":"format_ay(year)"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_ay.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Format academic year — format_ay","text":"year Academic year","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_ay.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Format academic year — format_ay","text":"Character vector formatted academic year","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_ay.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Format academic year — format_ay","text":"accepts numerical character arguments.","code":""},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_ay.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Format academic year — format_ay","text":"","code":"format_ay(201617) #> [1] \"2016/17\" format_ay(\"201617\") #> [1] \"2016/17\""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_ay_reverse.html","id":null,"dir":"Reference","previous_headings":"","what":"Undo academic year formatting — format_ay_reverse","title":"Undo academic year formatting — format_ay_reverse","text":"function converts academic year variables back 201617 format.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_ay_reverse.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Undo academic year formatting — format_ay_reverse","text":"","code":"format_ay_reverse(year)"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_ay_reverse.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Undo academic year formatting — format_ay_reverse","text":"year Academic year","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_ay_reverse.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Undo academic year formatting — format_ay_reverse","text":"Unformatted 6 digit year string","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_ay_reverse.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Undo academic year formatting — format_ay_reverse","text":"accepts character arguments.","code":""},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_ay_reverse.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Undo academic year formatting — format_ay_reverse","text":"","code":"format_ay_reverse(\"2016/17\") #> [1] \"201617\""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_fy.html","id":null,"dir":"Reference","previous_headings":"","what":"Format financial year — format_fy","title":"Format financial year — format_fy","text":"function formats financial year variables reporting purposes. convert year input 201516 format 2015-16 format.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_fy.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Format financial year — format_fy","text":"","code":"format_fy(year)"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_fy.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Format financial year — format_fy","text":"year Financial year","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_fy.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Format financial year — format_fy","text":"Character vector formatted financial year","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_fy.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Format financial year — format_fy","text":"accepts numerical character arguments.","code":""},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_fy.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Format financial year — format_fy","text":"","code":"format_fy(201617) #> [1] \"2016-17\" format_fy(\"201617\") #> [1] \"2016-17\""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_fy_reverse.html","id":null,"dir":"Reference","previous_headings":"","what":"Undo financial year formatting — format_fy_reverse","title":"Undo financial year formatting — format_fy_reverse","text":"function converts financial year variables back 201617 format.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_fy_reverse.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Undo financial year formatting — format_fy_reverse","text":"","code":"format_fy_reverse(year)"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_fy_reverse.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Undo financial year formatting — format_fy_reverse","text":"year Financial year","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_fy_reverse.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Undo financial year formatting — format_fy_reverse","text":"Unformatted 6 digit year string","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_fy_reverse.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Undo financial year formatting — format_fy_reverse","text":"accepts character arguments.","code":""},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_fy_reverse.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Undo financial year formatting — format_fy_reverse","text":"","code":"format_fy_reverse(\"2016-17\") #> [1] \"201617\""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/geog_time_identifiers.html","id":null,"dir":"Reference","previous_headings":"","what":"Potential names for geography and time columns — geog_time_identifiers","title":"Potential names for geography and time columns — geog_time_identifiers","text":"Potential names geography time columns line ones used explore education statistics data screener.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/geog_time_identifiers.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Potential names for geography and time columns — geog_time_identifiers","text":"","code":"geog_time_identifiers"},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/geog_time_identifiers.html","id":"geog-time-identifiers","dir":"Reference","previous_headings":"","what":"geog_time_identifiers","title":"Potential names for geography and time columns — geog_time_identifiers","text":"character vector 38 potential column names snake case format.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/geog_time_identifiers.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Potential names for geography and time columns — geog_time_identifiers","text":"curated explore.statistics@education.gov.uk. Guidance time geography data.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/get_clean_sql.html","id":null,"dir":"Reference","previous_headings":"","what":"Get a cleaned SQL script into R — get_clean_sql","title":"Get a cleaned SQL script into R — get_clean_sql","text":"function cleans SQL script, ready using within R DfE.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/get_clean_sql.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get a cleaned SQL script into R — get_clean_sql","text":"","code":"get_clean_sql(filepath, additional_settings = FALSE)"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/get_clean_sql.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get a cleaned SQL script into R — get_clean_sql","text":"filepath path SQL script additional_settings TRUE FALSE boolean addition settings start SQL script","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/get_clean_sql.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get a cleaned SQL script into R — get_clean_sql","text":"Cleaned string containing SQL query","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/get_clean_sql.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get a cleaned SQL script into R — get_clean_sql","text":"","code":"# This assumes you have already set up a database connection # and that the filepath for the function exists # For more details see the vignette on connecting to SQL # Pull a cleaned version of the SQL file into R if (file.exists(\"your_script.sql\")) { sql_query <- get_clean_sql(\"your_script.sql\") }"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/get_ons_api_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Fetch ONS Open Geography API data — get_ons_api_data","title":"Fetch ONS Open Geography API data — get_ons_api_data","text":"Helper function takes data set id parameters query parse data ONS Open Geography API. Technically uses POST request rather GET request.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/get_ons_api_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fetch ONS Open Geography API data — get_ons_api_data","text":"","code":"get_ons_api_data( data_id, query_params = list(where = \"1=1\", outFields = \"*\", outSR = \"4326\", f = \"json\"), batch_size = 200, verbose = TRUE )"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/get_ons_api_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fetch ONS Open Geography API data — get_ons_api_data","text":"data_id id data set query, can found Open Geography Portal query_params query parameters pass API, see ESRI documentation information query parameters - ESRI Query (Feature Service/Layer) batch_size number rows per query. 250 default, hit errors try lowering . API limit 1000 2000 rows per query, truth, actual limit method lower every ObjectId queried pasted query URL every row included batch, especial Id's go 1,000s 10,000s increase size URL risk hitting limit. verbose TRUE FALSE boolean. TRUE default. FALSE turn messages console update function ","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/get_ons_api_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fetch ONS Open Geography API data — get_ons_api_data","text":"parsed data.frame geographic names codes","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/get_ons_api_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Fetch ONS Open Geography API data — get_ons_api_data","text":"pre-query understand ObjectIds query want, query retrieve Ids directly batches stacking whole thing back together work around row limits single query. Open Geography Portal, find data set interested use query explorer find information query. function mostly developed ease use dfeR maintainers interested getting data Open Geography Portal widely also look boundr package.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/get_ons_api_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fetch ONS Open Geography API data — get_ons_api_data","text":"","code":"# Fetch everything from a data set dfeR::get_ons_api_data(data_id = \"LAD23_RGN23_EN_LU\") #> Checking total number of objects... #> 296 objects found for the query #> Created 2 batches of objects to query #> Querying API to get objects... #> ...fetching batch 1: objects 1 to 200... #> ...success! There are now 200 rows in your table... #> ...fetching batch 2: objects 201 to 296... #> ...success! There are now 296 rows in your table... #> ...data frame batched, stacked and delivered! #> attributes.LAD23CD attributes.LAD23NM attributes.RGN23CD #> 1 E06000001 Hartlepool E12000001 #> 2 E06000002 Middlesbrough E12000001 #> 3 E06000003 Redcar and Cleveland E12000001 #> 4 E06000004 Stockton-on-Tees E12000001 #> 5 E06000005 Darlington E12000001 #> 6 E06000006 Halton E12000002 #> 7 E06000007 Warrington E12000002 #> 8 E06000008 Blackburn with Darwen E12000002 #> 9 E06000009 Blackpool E12000002 #> 10 E06000010 Kingston upon Hull, City of E12000003 #> 11 E06000011 East Riding of Yorkshire E12000003 #> 12 E06000012 North East Lincolnshire E12000003 #> 13 E06000013 North Lincolnshire E12000003 #> 14 E06000014 York E12000003 #> 15 E06000015 Derby E12000004 #> 16 E06000016 Leicester E12000004 #> 17 E06000017 Rutland E12000004 #> 18 E06000018 Nottingham E12000004 #> 19 E06000019 Herefordshire, County of E12000005 #> 20 E06000020 Telford and Wrekin E12000005 #> 21 E06000021 Stoke-on-Trent E12000005 #> 22 E06000022 Bath and North East Somerset E12000009 #> 23 E06000023 Bristol, City of E12000009 #> 24 E06000024 North Somerset E12000009 #> 25 E06000025 South Gloucestershire E12000009 #> 26 E06000026 Plymouth E12000009 #> 27 E06000027 Torbay E12000009 #> 28 E06000030 Swindon E12000009 #> 29 E06000031 Peterborough E12000006 #> 30 E06000032 Luton E12000006 #> 31 E06000033 Southend-on-Sea E12000006 #> 32 E06000034 Thurrock E12000006 #> 33 E06000035 Medway E12000008 #> 34 E06000036 Bracknell Forest E12000008 #> 35 E06000037 West Berkshire E12000008 #> 36 E06000038 Reading E12000008 #> 37 E06000039 Slough E12000008 #> 38 E06000040 Windsor and Maidenhead E12000008 #> 39 E06000041 Wokingham E12000008 #> 40 E06000042 Milton Keynes E12000008 #> 41 E06000043 Brighton and Hove E12000008 #> 42 E06000044 Portsmouth E12000008 #> 43 E06000045 Southampton E12000008 #> 44 E06000046 Isle of Wight E12000008 #> 45 E06000047 County Durham E12000001 #> 46 E06000049 Cheshire East E12000002 #> 47 E06000050 Cheshire West and Chester E12000002 #> 48 E06000051 Shropshire E12000005 #> 49 E06000052 Cornwall E12000009 #> 50 E06000053 Isles of Scilly E12000009 #> 51 E06000054 Wiltshire E12000009 #> 52 E06000055 Bedford E12000006 #> 53 E06000056 Central Bedfordshire E12000006 #> 54 E06000057 Northumberland E12000001 #> 55 E06000058 Bournemouth, Christchurch and Poole E12000009 #> 56 E06000059 Dorset E12000009 #> 57 E06000060 Buckinghamshire E12000008 #> 58 E06000061 North Northamptonshire E12000004 #> 59 E06000062 West Northamptonshire E12000004 #> 60 E06000063 Cumberland E12000002 #> 61 E07000181 West Oxfordshire E12000008 #> 62 E07000192 Cannock Chase E12000005 #> 63 E07000193 East Staffordshire E12000005 #> 64 E07000194 Lichfield E12000005 #> 65 E07000195 Newcastle-under-Lyme E12000005 #> 66 E07000196 South Staffordshire E12000005 #> 67 E07000197 Stafford E12000005 #> 68 E07000198 Staffordshire Moorlands E12000005 #> 69 E07000199 Tamworth E12000005 #> 70 E07000200 Babergh E12000006 #> 71 E07000202 Ipswich E12000006 #> 72 E07000203 Mid Suffolk E12000006 #> 73 E07000207 Elmbridge E12000008 #> 74 E07000208 Epsom and Ewell E12000008 #> 75 E07000209 Guildford E12000008 #> 76 E07000210 Mole Valley E12000008 #> 77 E07000211 Reigate and Banstead E12000008 #> 78 E07000212 Runnymede E12000008 #> 79 E07000213 Spelthorne E12000008 #> 80 E07000214 Surrey Heath E12000008 #> 81 E07000215 Tandridge E12000008 #> 82 E07000216 Waverley E12000008 #> 83 E07000217 Woking E12000008 #> 84 E07000218 North Warwickshire E12000005 #> 85 E07000219 Nuneaton and Bedworth E12000005 #> 86 E07000220 Rugby E12000005 #> 87 E07000221 Stratford-on-Avon E12000005 #> 88 E07000222 Warwick E12000005 #> 89 E07000223 Adur E12000008 #> 90 E07000224 Arun E12000008 #> 91 E07000225 Chichester E12000008 #> 92 E07000226 Crawley E12000008 #> 93 E07000227 Horsham E12000008 #> 94 E07000228 Mid Sussex E12000008 #> 95 E07000229 Worthing E12000008 #> 96 E07000234 Bromsgrove E12000005 #> 97 E07000235 Malvern Hills E12000005 #> 98 E07000236 Redditch E12000005 #> 99 E07000237 Worcester E12000005 #> 100 E07000238 Wychavon E12000005 #> 101 E07000239 Wyre Forest E12000005 #> 102 E07000240 St Albans E12000006 #> 103 E07000241 Welwyn Hatfield E12000006 #> 104 E07000242 East Hertfordshire E12000006 #> 105 E07000243 Stevenage E12000006 #> 106 E07000244 East Suffolk E12000006 #> 107 E07000245 West Suffolk E12000006 #> 108 E08000001 Bolton E12000002 #> 109 E08000002 Bury E12000002 #> 110 E08000003 Manchester E12000002 #> 111 E08000004 Oldham E12000002 #> 112 E08000005 Rochdale E12000002 #> 113 E08000006 Salford E12000002 #> 114 E08000007 Stockport E12000002 #> 115 E08000008 Tameside E12000002 #> 116 E08000009 Trafford E12000002 #> 117 E08000010 Wigan E12000002 #> 118 E08000011 Knowsley E12000002 #> 119 E08000012 Liverpool E12000002 #> 120 E08000013 St. Helens E12000002 #> 121 E07000098 Hertsmere E12000006 #> 122 E07000099 North Hertfordshire E12000006 #> 123 E07000102 Three Rivers E12000006 #> 124 E07000103 Watford E12000006 #> 125 E07000105 Ashford E12000008 #> 126 E07000106 Canterbury E12000008 #> 127 E07000107 Dartford E12000008 #> 128 E07000108 Dover E12000008 #> 129 E07000109 Gravesham E12000008 #> 130 E07000110 Maidstone E12000008 #> 131 E07000111 Sevenoaks E12000008 #> 132 E07000112 Folkestone and Hythe E12000008 #> 133 E07000113 Swale E12000008 #> 134 E07000114 Thanet E12000008 #> 135 E07000115 Tonbridge and Malling E12000008 #> 136 E07000116 Tunbridge Wells E12000008 #> 137 E07000117 Burnley E12000002 #> 138 E07000118 Chorley E12000002 #> 139 E07000119 Fylde E12000002 #> 140 E07000120 Hyndburn E12000002 #> 141 E07000121 Lancaster E12000002 #> 142 E07000122 Pendle E12000002 #> 143 E07000123 Preston E12000002 #> 144 E07000124 Ribble Valley E12000002 #> 145 E07000125 Rossendale E12000002 #> 146 E07000126 South Ribble E12000002 #> 147 E07000127 West Lancashire E12000002 #> 148 E07000128 Wyre E12000002 #> 149 E07000129 Blaby E12000004 #> 150 E07000130 Charnwood E12000004 #> 151 E07000131 Harborough E12000004 #> 152 E07000132 Hinckley and Bosworth E12000004 #> 153 E07000133 Melton E12000004 #> 154 E07000134 North West Leicestershire E12000004 #> 155 E07000135 Oadby and Wigston E12000004 #> 156 E07000136 Boston E12000004 #> 157 E07000137 East Lindsey E12000004 #> 158 E07000138 Lincoln E12000004 #> 159 E07000139 North Kesteven E12000004 #> 160 E07000140 South Holland E12000004 #> 161 E07000141 South Kesteven E12000004 #> 162 E07000142 West Lindsey E12000004 #> 163 E07000143 Breckland E12000006 #> 164 E07000144 Broadland E12000006 #> 165 E07000145 Great Yarmouth E12000006 #> 166 E07000146 King's Lynn and West Norfolk E12000006 #> 167 E07000147 North Norfolk E12000006 #> 168 E07000148 Norwich E12000006 #> 169 E07000149 South Norfolk E12000006 #> 170 E07000170 Ashfield E12000004 #> 171 E07000171 Bassetlaw E12000004 #> 172 E07000172 Broxtowe E12000004 #> 173 E07000173 Gedling E12000004 #> 174 E07000174 Mansfield E12000004 #> 175 E07000175 Newark and Sherwood E12000004 #> 176 E07000176 Rushcliffe E12000004 #> 177 E07000177 Cherwell E12000008 #> 178 E07000178 Oxford E12000008 #> 179 E07000179 South Oxfordshire E12000008 #> 180 E07000180 Vale of White Horse E12000008 #> 181 E08000014 Sefton E12000002 #> 182 E08000015 Wirral E12000002 #> 183 E08000016 Barnsley E12000003 #> 184 E08000017 Doncaster E12000003 #> 185 E08000018 Rotherham E12000003 #> 186 E08000019 Sheffield E12000003 #> 187 E08000021 Newcastle upon Tyne E12000001 #> 188 E08000022 North Tyneside E12000001 #> 189 E08000023 South Tyneside E12000001 #> 190 E08000024 Sunderland E12000001 #> 191 E08000025 Birmingham E12000005 #> 192 E08000026 Coventry E12000005 #> 193 E08000027 Dudley E12000005 #> 194 E08000028 Sandwell E12000005 #> 195 E08000029 Solihull E12000005 #> 196 E08000030 Walsall E12000005 #> 197 E08000031 Wolverhampton E12000005 #> 198 E08000032 Bradford E12000003 #> 199 E08000033 Calderdale E12000003 #> 200 E08000034 Kirklees E12000003 #> 201 E06000064 Westmorland and Furness E12000002 #> 202 E08000035 Leeds E12000003 #> 203 E08000036 Wakefield E12000003 #> 204 E08000037 Gateshead E12000001 #> 205 E09000001 City of London E12000007 #> 206 E09000002 Barking and Dagenham E12000007 #> 207 E09000003 Barnet E12000007 #> 208 E09000004 Bexley E12000007 #> 209 E09000005 Brent E12000007 #> 210 E09000006 Bromley E12000007 #> 211 E09000007 Camden E12000007 #> 212 E09000008 Croydon E12000007 #> 213 E09000009 Ealing E12000007 #> 214 E09000010 Enfield E12000007 #> 215 E09000011 Greenwich E12000007 #> 216 E09000012 Hackney E12000007 #> 217 E09000013 Hammersmith and Fulham E12000007 #> 218 E09000014 Haringey E12000007 #> 219 E09000015 Harrow E12000007 #> 220 E09000016 Havering E12000007 #> 221 E09000017 Hillingdon E12000007 #> 222 E09000018 Hounslow E12000007 #> 223 E09000019 Islington E12000007 #> 224 E09000020 Kensington and Chelsea E12000007 #> 225 E09000021 Kingston upon Thames E12000007 #> 226 E09000022 Lambeth E12000007 #> 227 E09000023 Lewisham E12000007 #> 228 E09000024 Merton E12000007 #> 229 E09000025 Newham E12000007 #> 230 E09000026 Redbridge E12000007 #> 231 E09000027 Richmond upon Thames E12000007 #> 232 E09000028 Southwark E12000007 #> 233 E09000029 Sutton E12000007 #> 234 E09000030 Tower Hamlets E12000007 #> 235 E09000031 Waltham Forest E12000007 #> 236 E09000032 Wandsworth E12000007 #> 237 E09000033 Westminster E12000007 #> 238 E06000065 North Yorkshire E12000003 #> 239 E06000066 Somerset E12000009 #> 240 E07000008 Cambridge E12000006 #> 241 E07000009 East Cambridgeshire E12000006 #> 242 E07000010 Fenland E12000006 #> 243 E07000011 Huntingdonshire E12000006 #> 244 E07000012 South Cambridgeshire E12000006 #> 245 E07000032 Amber Valley E12000004 #> 246 E07000033 Bolsover E12000004 #> 247 E07000034 Chesterfield E12000004 #> 248 E07000035 Derbyshire Dales E12000004 #> 249 E07000036 Erewash E12000004 #> 250 E07000037 High Peak E12000004 #> 251 E07000038 North East Derbyshire E12000004 #> 252 E07000039 South Derbyshire E12000004 #> 253 E07000040 East Devon E12000009 #> 254 E07000041 Exeter E12000009 #> 255 E07000042 Mid Devon E12000009 #> 256 E07000043 North Devon E12000009 #> 257 E07000044 South Hams E12000009 #> 258 E07000045 Teignbridge E12000009 #> 259 E07000046 Torridge E12000009 #> 260 E07000047 West Devon E12000009 #> 261 E07000061 Eastbourne E12000008 #> 262 E07000062 Hastings E12000008 #> 263 E07000063 Lewes E12000008 #> 264 E07000064 Rother E12000008 #> 265 E07000065 Wealden E12000008 #> 266 E07000066 Basildon E12000006 #> 267 E07000067 Braintree E12000006 #> 268 E07000068 Brentwood E12000006 #> 269 E07000069 Castle Point E12000006 #> 270 E07000070 Chelmsford E12000006 #> 271 E07000071 Colchester E12000006 #> 272 E07000072 Epping Forest E12000006 #> 273 E07000073 Harlow E12000006 #> 274 E07000074 Maldon E12000006 #> 275 E07000075 Rochford E12000006 #> 276 E07000076 Tendring E12000006 #> 277 E07000077 Uttlesford E12000006 #> 278 E07000078 Cheltenham E12000009 #> 279 E07000079 Cotswold E12000009 #> 280 E07000080 Forest of Dean E12000009 #> 281 E07000081 Gloucester E12000009 #> 282 E07000082 Stroud E12000009 #> 283 E07000083 Tewkesbury E12000009 #> 284 E07000084 Basingstoke and Deane E12000008 #> 285 E07000085 East Hampshire E12000008 #> 286 E07000086 Eastleigh E12000008 #> 287 E07000087 Fareham E12000008 #> 288 E07000088 Gosport E12000008 #> 289 E07000089 Hart E12000008 #> 290 E07000090 Havant E12000008 #> 291 E07000091 New Forest E12000008 #> 292 E07000092 Rushmoor E12000008 #> 293 E07000093 Test Valley E12000008 #> 294 E07000094 Winchester E12000008 #> 295 E07000095 Broxbourne E12000006 #> 296 E07000096 Dacorum E12000006 #> attributes.RGN23NM attributes.ObjectId #> 1 North East 1 #> 2 North East 2 #> 3 North East 3 #> 4 North East 4 #> 5 North East 5 #> 6 North West 6 #> 7 North West 7 #> 8 North West 8 #> 9 North West 9 #> 10 Yorkshire and The Humber 10 #> 11 Yorkshire and The Humber 11 #> 12 Yorkshire and The Humber 12 #> 13 Yorkshire and The Humber 13 #> 14 Yorkshire and The Humber 14 #> 15 East Midlands 15 #> 16 East Midlands 16 #> 17 East Midlands 17 #> 18 East Midlands 18 #> 19 West Midlands 19 #> 20 West Midlands 20 #> 21 West Midlands 21 #> 22 South West 22 #> 23 South West 23 #> 24 South West 24 #> 25 South West 25 #> 26 South West 26 #> 27 South West 27 #> 28 South West 28 #> 29 East of England 29 #> 30 East of England 30 #> 31 East of England 31 #> 32 East of England 32 #> 33 South East 33 #> 34 South East 34 #> 35 South East 35 #> 36 South East 36 #> 37 South East 37 #> 38 South East 38 #> 39 South East 39 #> 40 South East 40 #> 41 South East 41 #> 42 South East 42 #> 43 South East 43 #> 44 South East 44 #> 45 North East 45 #> 46 North West 46 #> 47 North West 47 #> 48 West Midlands 48 #> 49 South West 49 #> 50 South West 50 #> 51 South West 51 #> 52 East of England 52 #> 53 East of England 53 #> 54 North East 54 #> 55 South West 55 #> 56 South West 56 #> 57 South East 57 #> 58 East Midlands 58 #> 59 East Midlands 59 #> 60 North West 60 #> 61 South East 61 #> 62 West Midlands 62 #> 63 West Midlands 63 #> 64 West Midlands 64 #> 65 West Midlands 65 #> 66 West Midlands 66 #> 67 West Midlands 67 #> 68 West Midlands 68 #> 69 West Midlands 69 #> 70 East of England 70 #> 71 East of England 71 #> 72 East of England 72 #> 73 South East 73 #> 74 South East 74 #> 75 South East 75 #> 76 South East 76 #> 77 South East 77 #> 78 South East 78 #> 79 South East 79 #> 80 South East 80 #> 81 South East 81 #> 82 South East 82 #> 83 South East 83 #> 84 West Midlands 84 #> 85 West Midlands 85 #> 86 West Midlands 86 #> 87 West Midlands 87 #> 88 West Midlands 88 #> 89 South East 89 #> 90 South East 90 #> 91 South East 91 #> 92 South East 92 #> 93 South East 93 #> 94 South East 94 #> 95 South East 95 #> 96 West Midlands 96 #> 97 West Midlands 97 #> 98 West Midlands 98 #> 99 West Midlands 99 #> 100 West Midlands 100 #> 101 West Midlands 101 #> 102 East of England 102 #> 103 East of England 103 #> 104 East of England 104 #> 105 East of England 105 #> 106 East of England 106 #> 107 East of England 107 #> 108 North West 108 #> 109 North West 109 #> 110 North West 110 #> 111 North West 111 #> 112 North West 112 #> 113 North West 113 #> 114 North West 114 #> 115 North West 115 #> 116 North West 116 #> 117 North West 117 #> 118 North West 118 #> 119 North West 119 #> 120 North West 120 #> 121 East of England 121 #> 122 East of England 122 #> 123 East of England 123 #> 124 East of England 124 #> 125 South East 125 #> 126 South East 126 #> 127 South East 127 #> 128 South East 128 #> 129 South East 129 #> 130 South East 130 #> 131 South East 131 #> 132 South East 132 #> 133 South East 133 #> 134 South East 134 #> 135 South East 135 #> 136 South East 136 #> 137 North West 137 #> 138 North West 138 #> 139 North West 139 #> 140 North West 140 #> 141 North West 141 #> 142 North West 142 #> 143 North West 143 #> 144 North West 144 #> 145 North West 145 #> 146 North West 146 #> 147 North West 147 #> 148 North West 148 #> 149 East Midlands 149 #> 150 East Midlands 150 #> 151 East Midlands 151 #> 152 East Midlands 152 #> 153 East Midlands 153 #> 154 East Midlands 154 #> 155 East Midlands 155 #> 156 East Midlands 156 #> 157 East Midlands 157 #> 158 East Midlands 158 #> 159 East Midlands 159 #> 160 East Midlands 160 #> 161 East Midlands 161 #> 162 East Midlands 162 #> 163 East of England 163 #> 164 East of England 164 #> 165 East of England 165 #> 166 East of England 166 #> 167 East of England 167 #> 168 East of England 168 #> 169 East of England 169 #> 170 East Midlands 170 #> 171 East Midlands 171 #> 172 East Midlands 172 #> 173 East Midlands 173 #> 174 East Midlands 174 #> 175 East Midlands 175 #> 176 East Midlands 176 #> 177 South East 177 #> 178 South East 178 #> 179 South East 179 #> 180 South East 180 #> 181 North West 181 #> 182 North West 182 #> 183 Yorkshire and The Humber 183 #> 184 Yorkshire and The Humber 184 #> 185 Yorkshire and The Humber 185 #> 186 Yorkshire and The Humber 186 #> 187 North East 187 #> 188 North East 188 #> 189 North East 189 #> 190 North East 190 #> 191 West Midlands 191 #> 192 West Midlands 192 #> 193 West Midlands 193 #> 194 West Midlands 194 #> 195 West Midlands 195 #> 196 West Midlands 196 #> 197 West Midlands 197 #> 198 Yorkshire and The Humber 198 #> 199 Yorkshire and The Humber 199 #> 200 Yorkshire and The Humber 200 #> 201 North West 201 #> 202 Yorkshire and The Humber 202 #> 203 Yorkshire and The Humber 203 #> 204 North East 204 #> 205 London 205 #> 206 London 206 #> 207 London 207 #> 208 London 208 #> 209 London 209 #> 210 London 210 #> 211 London 211 #> 212 London 212 #> 213 London 213 #> 214 London 214 #> 215 London 215 #> 216 London 216 #> 217 London 217 #> 218 London 218 #> 219 London 219 #> 220 London 220 #> 221 London 221 #> 222 London 222 #> 223 London 223 #> 224 London 224 #> 225 London 225 #> 226 London 226 #> 227 London 227 #> 228 London 228 #> 229 London 229 #> 230 London 230 #> 231 London 231 #> 232 London 232 #> 233 London 233 #> 234 London 234 #> 235 London 235 #> 236 London 236 #> 237 London 237 #> 238 Yorkshire and The Humber 238 #> 239 South West 239 #> 240 East of England 240 #> 241 East of England 241 #> 242 East of England 242 #> 243 East of England 243 #> 244 East of England 244 #> 245 East Midlands 245 #> 246 East Midlands 246 #> 247 East Midlands 247 #> 248 East Midlands 248 #> 249 East Midlands 249 #> 250 East Midlands 250 #> 251 East Midlands 251 #> 252 East Midlands 252 #> 253 South West 253 #> 254 South West 254 #> 255 South West 255 #> 256 South West 256 #> 257 South West 257 #> 258 South West 258 #> 259 South West 259 #> 260 South West 260 #> 261 South East 261 #> 262 South East 262 #> 263 South East 263 #> 264 South East 264 #> 265 South East 265 #> 266 East of England 266 #> 267 East of England 267 #> 268 East of England 268 #> 269 East of England 269 #> 270 East of England 270 #> 271 East of England 271 #> 272 East of England 272 #> 273 East of England 273 #> 274 East of England 274 #> 275 East of England 275 #> 276 East of England 276 #> 277 East of England 277 #> 278 South West 278 #> 279 South West 279 #> 280 South West 280 #> 281 South West 281 #> 282 South West 282 #> 283 South West 283 #> 284 South East 284 #> 285 South East 285 #> 286 South East 286 #> 287 South East 287 #> 288 South East 288 #> 289 South East 289 #> 290 South East 290 #> 291 South East 291 #> 292 South East 292 #> 293 South East 293 #> 294 South East 294 #> 295 East of England 295 #> 296 East of England 296 # Specify the columns you want dfeR::get_ons_api_data( \"RGN_DEC_2023_EN_NC\", query_params = list( where = \"1=1\", outFields = \"RGN23CD,RGN23NM\", outSR = 4326, f = \"json\" ) ) #> Checking total number of objects... #> 9 objects found for the query #> Created 1 batches of objects to query #> Querying API to get objects... #> ...fetching batch 1: objects 1 to 9... #> ...success! There are now 9 rows in your table... #> ...data frame batched, stacked and delivered! #> attributes.RGN23CD attributes.RGN23NM #> 1 E12000001 North East #> 2 E12000002 North West #> 3 E12000003 Yorkshire and The Humber #> 4 E12000004 East Midlands #> 5 E12000005 West Midlands #> 6 E12000006 East of England #> 7 E12000007 London #> 8 E12000008 South East #> 9 E12000009 South West"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/ons_geog_shorthands.html","id":null,"dir":"Reference","previous_headings":"","what":"Lookup for ONS geography columns shorthands — ons_geog_shorthands","title":"Lookup for ONS geography columns shorthands — ons_geog_shorthands","text":"lookup ONS geography shorthands respective column names line DfE open data standards.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/ons_geog_shorthands.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Lookup for ONS geography columns shorthands — ons_geog_shorthands","text":"","code":"ons_geog_shorthands"},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/ons_geog_shorthands.html","id":"ons-geog-shorthands","dir":"Reference","previous_headings":"","what":"ons_geog_shorthands","title":"Lookup for ONS geography columns shorthands — ons_geog_shorthands","text":"data frame 7 rows 3 columns: ons_level_shorthands ONS shorthands used lookup files name_column DfE names geography name columns code_column DfE names geography code columns","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/ons_geog_shorthands.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Lookup for ONS geography columns shorthands — ons_geog_shorthands","text":"curated explore.statistics@education.gov.uk","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/ons_geog_shorthands.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Lookup for ONS geography columns shorthands — ons_geog_shorthands","text":"GOR (Government Office Region) predecessor RGN.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_filesize.html","id":null,"dir":"Reference","previous_headings":"","what":"Pretty numbers into readable file size — pretty_filesize","title":"Pretty numbers into readable file size — pretty_filesize","text":"Converts raw file size bytes readable format.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_filesize.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Pretty numbers into readable file size — pretty_filesize","text":"","code":"pretty_filesize(filesize)"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_filesize.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Pretty numbers into readable file size — pretty_filesize","text":"filesize file size bytes","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_filesize.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Pretty numbers into readable file size — pretty_filesize","text":"string containing prettified file size","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_filesize.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Pretty numbers into readable file size — pretty_filesize","text":"Designed used conjunction file.size() function base R. Presents kilobytes, megabytes gigabytes. Shows bytes 1 KB, kilobytes 1 MB, megabytes 1GB, show gigabytes anything larger. Rounds end result 2 decimal places. Using base 10 (decimal), 1024 bytes 1,024 KB.","code":""},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_filesize.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Pretty numbers into readable file size — pretty_filesize","text":"","code":"pretty_filesize(2) #> [1] \"2 bytes\" pretty_filesize(549302) #> [1] \"549.3 KB\" pretty_filesize(9872948939) #> [1] \"9.87 GB\" pretty_filesize(1) #> [1] \"1 byte\" pretty_filesize(1000) #> [1] \"1 KB\" pretty_filesize(1000^2) #> [1] \"1 MB\" pretty_filesize(10^9) #> [1] \"1 GB\""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_num.html","id":null,"dir":"Reference","previous_headings":"","what":"Prettify big numbers into a readable format — pretty_num","title":"Prettify big numbers into a readable format — pretty_num","text":"Uses .numeric() force numeric value formats prettily easy presentation console messages, reports, dashboards. rounds 0 decimal places default, adds comma separators. Expect commonly used adding pound symbol, percentage symbol, +/- prefixed based value. applying multiple unpredictable values want preserve non-numeric symbol \"x\" \"c\" data available, use ignore_na = TRUE argument return values unaffected. want customise NA values returned , use alt_na argument. function silences warning around NAs introduced coercion.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_num.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Prettify big numbers into a readable format — pretty_num","text":"","code":"pretty_num( value, prefix = \"\", gbp = FALSE, suffix = \"\", dp = 0, ignore_na = FALSE, alt_na = FALSE, nsmall = NULL )"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_num.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Prettify big numbers into a readable format — pretty_num","text":"value value prettified prefix prefix value, \"+/-\" automatically assign + - based value gbp whether add pound symbol , defaults suffix suffix value, e.g. \"%\" dp number decimal places round , 0 default. ignore_na whether skip function strings converted return original value alt_na alternative value return place NA, e.g. \"x\" nsmall minimum number digits right decimal point. NULL, value dp used. value dp less 0, nsmall automatically set 0.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_num.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Prettify big numbers into a readable format — pretty_num","text":"string featuring prettified value","code":""},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_num.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Prettify big numbers into a readable format — pretty_num","text":"","code":"# On individual values pretty_num(5789, gbp = TRUE) #> [1] \"£5,789\" pretty_num(564, prefix = \"+/-\") #> [1] \"+564\" pretty_num(567812343223, gbp = TRUE, prefix = \"+/-\") #> [1] \"+£568 billion\" pretty_num(11^9, gbp = TRUE, dp = 3) #> [1] \"£2.358 billion\" pretty_num(-11^8, gbp = TRUE, dp = -1) #> [1] \"-£210 million\" pretty_num(43.3, dp = 1, nsmall = 2) #> [1] \"43.30\" pretty_num(\"56.089\", suffix = \"%\") #> [1] \"56%\" pretty_num(\"x\") #> [1] NA pretty_num(\"x\", ignore_na = TRUE) #> [1] \"x\" pretty_num(\"nope\", alt_na = \"x\") #> [1] \"x\" # Applied over an example vector vector <- c(3998098008, -123421421, \"c\", \"x\") pretty_num(vector) #> [1] \"4 billion\" \"-123 million\" NA NA pretty_num(vector, prefix = \"+/-\", gbp = TRUE) #> [1] \"+£4 billion\" \"-£123 million\" NA NA # Return original values if NA pretty_num(vector, ignore_na = TRUE) #> [1] \"4 billion\" \"-123 million\" \"c\" \"x\" # Return alternative value in place of NA pretty_num(vector, alt_na = \"z\") #> [1] \"4 billion\" \"-123 million\" \"z\" \"z\""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_num_table.html","id":null,"dir":"Reference","previous_headings":"","what":"Format a data frame with dfeR::pretty_num(). — pretty_num_table","title":"Format a data frame with dfeR::pretty_num(). — pretty_num_table","text":"can format number character values data frame passing arguments dfeR::pretty_num(). Use parameters include_columns exclude_columns specify columns formatting.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_num_table.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Format a data frame with dfeR::pretty_num(). — pretty_num_table","text":"","code":"pretty_num_table(data, include_columns = NULL, exclude_columns = NULL, ...)"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_num_table.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Format a data frame with dfeR::pretty_num(). — pretty_num_table","text":"data data frame containing columns formatted. include_columns character vector specifying columns format. NULL (default), columns considered formatting. exclude_columns character vector specifying columns exclude formatting. NULL (default), columns excluded. include_columns exclude_columns provided , include_columns takes precedence. ... Additional arguments passed dfeR::pretty_num() , dp (decimal places) controlling number decimal points.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_num_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Format a data frame with dfeR::pretty_num(). — pretty_num_table","text":"data frame columns formatted using dfeR::pretty_num().","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_num_table.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Format a data frame with dfeR::pretty_num(). — pretty_num_table","text":"function first checks columns specified inclusion via include_columns. none provided, checks columns specified exclusion via exclude_columns. neither specified, columns data frame formatted.","code":""},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_num_table.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Format a data frame with dfeR::pretty_num(). — pretty_num_table","text":"","code":"# Example data frame df <- data.frame( a = c(1.234, 5.678, 9.1011), b = c(10.1112, 20.1314, 30.1516), c = c(\"A\", \"B\", \"C\") ) # Apply formatting to all columns pretty_num_table(df, dp = 2) #> a b c #> 1 1.23 10.11 NA #> 2 5.68 20.13 NA #> 3 9.10 30.15 NA # Apply formatting to only selected columns pretty_num_table(df, include_columns = c(\"a\"), dp = 2) #> a b c #> 1 1.23 10.1112 A #> 2 5.68 20.1314 B #> 3 9.10 30.1516 C # Apply formatting to all columns except specified ones pretty_num_table(df, exclude_columns = c(\"b\"), dp = 2) #> a b c #> 1 1.23 10.1112 NA #> 2 5.68 20.1314 NA #> 3 9.10 30.1516 NA # Apply formatting to all columns except specified ones and # provide alternative value for NAs pretty_num_table(df, alt_na = \"[z]\", exclude_columns = c(\"b\"), dp = 2) #> a b c #> 1 1.23 10.1112 [z] #> 2 5.68 20.1314 [z] #> 3 9.10 30.1516 [z]"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_time_taken.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate elapsed time between two points and present prettily — pretty_time_taken","title":"Calculate elapsed time between two points and present prettily — pretty_time_taken","text":"Converts start end value readable time format.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_time_taken.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate elapsed time between two points and present prettily — pretty_time_taken","text":"","code":"pretty_time_taken(start_time, end_time)"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_time_taken.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate elapsed time between two points and present prettily — pretty_time_taken","text":"start_time start time readable .POSIXct end_time end time readable .POSIXct","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_time_taken.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate elapsed time between two points and present prettily — pretty_time_taken","text":"string containing prettified elapsed time","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_time_taken.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Calculate elapsed time between two points and present prettily — pretty_time_taken","text":"Designed used Sys.time() tracking start end times. Shows seconds 119 seconds, minutes 119 minutes, hours anything larger. Input start end times must convertible POSIXct format.","code":""},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_time_taken.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate elapsed time between two points and present prettily — pretty_time_taken","text":"","code":"pretty_time_taken( \"2024-03-23 07:05:53 GMT\", \"2024-03-23 12:09:56 GMT\" ) #> [1] \"5 hours 4 minutes 3 seconds\" # Track the start and end time of a process start <- Sys.time() Sys.sleep(0.1) end <- Sys.time() # Use this function to present it prettily pretty_time_taken(start, end) #> [1] \"0.1 seconds\""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/regions.html","id":null,"dir":"Reference","previous_headings":"","what":"Lookup for valid region names and codes — regions","title":"Lookup for valid region names and codes — regions","text":"lookup ONS geography region names codes England. lookups Northern Ireland, Scotland Wales regions.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/regions.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Lookup for valid region names and codes — regions","text":"","code":"regions"},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/regions.html","id":"regions","dir":"Reference","previous_headings":"","what":"regions","title":"Lookup for valid region names and codes — regions","text":"data frame 16 rows 2 columns: region_name Region name region_code Region code","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/regions.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Lookup for valid region names and codes — regions","text":"curated explore.statistics@education.gov.uk, ONS codes sourced https://geoportal.statistics.gov.uk/search?q=NAC_RGN","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/regions.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Lookup for valid region names and codes — regions","text":"Also included inner outer London county split DfE frequently publish regions, well custom DfE names codes. used definitive list screening open data published DfE.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/round_five_up.html","id":null,"dir":"Reference","previous_headings":"","what":"Round five up — round_five_up","title":"Round five up — round_five_up","text":"Round number specified number places, 5's rounded .","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/round_five_up.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Round five up — round_five_up","text":"","code":"round_five_up(number, dp = 0)"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/round_five_up.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Round five up — round_five_up","text":"number number rounded dp number decimal places round , default 0","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/round_five_up.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Round five up — round_five_up","text":"Rounded number","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/round_five_up.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Round five up — round_five_up","text":"Rounds 0 decimal places default. can use negative value decimal places. example: -1 round nearest 10 -2 round nearest 100 . alternative round base R, uses bankers round. information see round() documentation.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/round_five_up.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Round five up — round_five_up","text":"","code":"# No dp set round_five_up(2485.85) #> [1] 2486 # With dp set round_five_up(2485.85, 2) #> [1] 2485.85 round_five_up(2485.85, 1) #> [1] 2485.9 round_five_up(2485.85, 0) #> [1] 2486 round_five_up(2485.85, -1) #> [1] 2490 round_five_up(2485.85, -2) #> [1] 2500"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/toggle_message.html","id":null,"dir":"Reference","previous_headings":"","what":"Controllable console messages — toggle_message","title":"Controllable console messages — toggle_message","text":"Quick expansion message() function aimed use functions easy addition global verbose TRUE / FALSE argument toggle messages ","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/toggle_message.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Controllable console messages — toggle_message","text":"","code":"toggle_message(..., verbose)"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/toggle_message.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Controllable console messages — toggle_message","text":"... message normally pass message(). See message details verbose logical, usually variable passed function using within","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/toggle_message.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Controllable console messages — toggle_message","text":"return value, called side effects","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/toggle_message.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Controllable console messages — toggle_message","text":"","code":"# Usually used in a function my_function <- function(count_fingers, verbose) { toggle_message(\"I have \", count_fingers, \" fingers\", verbose = verbose) fingers_thumbs <- count_fingers + 2 toggle_message(\"I have \", fingers_thumbs, \" digits\", verbose = verbose) } my_function(5, verbose = FALSE) my_function(5, verbose = TRUE) #> I have 5 fingers #> I have 7 digits # Can be used in isolation toggle_message(\"I want the world to read this!\", verbose = TRUE) #> I want the world to read this! toggle_message(\"I ain't gonna show this message!\", verbose = FALSE) count_fingers <- 5 toggle_message(\"I have \", count_fingers, \" fingers\", verbose = TRUE) #> I have 5 fingers"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/wd_pcon_lad_la_rgn_ctry.html","id":null,"dir":"Reference","previous_headings":"","what":"Ward to Constituency to LAD to LA to Region to Country lookup — wd_pcon_lad_la_rgn_ctry","title":"Ward to Constituency to LAD to LA to Region to Country lookup — wd_pcon_lad_la_rgn_ctry","text":"lookup showing hierarchy ward Westminster parliamentary constituency local authority district local authority region country years 2017, 2019, 2020, 2021, 2022, 2023 2024.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/wd_pcon_lad_la_rgn_ctry.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ward to Constituency to LAD to LA to Region to Country lookup — wd_pcon_lad_la_rgn_ctry","text":"","code":"wd_pcon_lad_la_rgn_ctry"},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/wd_pcon_lad_la_rgn_ctry.html","id":"wd-pcon-lad-la-rgn-ctry","dir":"Reference","previous_headings":"","what":"wd_pcon_lad_la_rgn_ctry","title":"Ward to Constituency to LAD to LA to Region to Country lookup — wd_pcon_lad_la_rgn_ctry","text":"data frame 24,629 rows 14 columns: first_available_year_included First year lookups see location most_recent_year_included Last year lookups see location ward_name Ward name pcon_name Parliamentary constituency name lad_name Local authority district name la_name Local authority name region_name Region name country_code Country name ward_code 9 digit ward code pcon_code 9 digit westminster constituency code lad_code 9 digit local authority district code new_la_code 9 digit local authority code region_code 9 digit region code country_code 9 digit country code","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/wd_pcon_lad_la_rgn_ctry.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Ward to Constituency to LAD to LA to Region to Country lookup — wd_pcon_lad_la_rgn_ctry","text":"https://geoportal.statistics.gov.uk/search?tags=lup_wd_pcon_lad_utla https://geoportal.statistics.gov.uk/search?q=lup_wd_lad_cty_rgn_gor_ctry","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/wd_pcon_lad_la_rgn_ctry.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Ward to Constituency to LAD to LA to Region to Country lookup — wd_pcon_lad_la_rgn_ctry","text":"Changes made original lookup: original lookup ONS uses Upper Tier Local Authority, update metropolitan local authority use local authority district local authority match DfE publish data local authorities. noticed 2017 version, Glasgow East constituency code S1400030 instead usual S14000030, assumed error change data Glasgow East S14000030 2017. joined regions using Ward LAD County Region file. joined countries based E / N / S / W start codes. Scotland published regions 2017, given rest years Scotland region, forced 2017 complete data set.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/z_replace.html","id":null,"dir":"Reference","previous_headings":"","what":"Replaces NA values in tables — z_replace","title":"Replaces NA values in tables — z_replace","text":"Replaces NA values tables except ones time geography columns must included DfE official statistics. Guidance Open Data Standards.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/z_replace.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Replaces NA values in tables — z_replace","text":"","code":"z_replace(data, replacement_alt = NULL, exclude_columns = NULL)"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/z_replace.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Replaces NA values in tables — z_replace","text":"data name table want replace NA values replacement_alt optional - want NA replacement value different \"z\" exclude_columns optional - additional columns exclude NA replacement. Column names match ones found dfeR::geog_time_identifiers always excluded missing data columns need explicit codes explain data available.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/z_replace.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Replaces NA values in tables — z_replace","text":"table \"z\" alternate replacement value instead NA values columns time geography.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/z_replace.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Replaces NA values in tables — z_replace","text":"Names geography time columns used function can found dfeR::geog_time_identifiers.","code":""},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/z_replace.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Replaces NA values in tables — z_replace","text":"","code":"# Create a table for the example df <- data.frame( time_period = c(2022, 2022, 2022), time_identifier = c(\"Calendar year\", \"Calendar year\", \"Calendar year\"), geographic_level = c(\"National\", \"Regional\", \"Regional\"), country_code = c(\"E92000001\", \"E92000001\", \"E92000001\"), country_name = c(\"England\", \"England\", \"England\"), region_code = c(NA, \"E12000001\", \"E12000002\"), region_name = c(NA, \"North East\", \"North West\"), mystery_count = c(42, 25, NA) ) z_replace(df) #> time_period time_identifier geographic_level country_code country_name #> 1 2022 Calendar year National E92000001 England #> 2 2022 Calendar year Regional E92000001 England #> 3 2022 Calendar year Regional E92000001 England #> region_code region_name mystery_count #> 1 42 #> 2 E12000001 North East 25 #> 3 E12000002 North West z # Use a different replacement value z_replace(df, replacement_alt = \"c\") #> time_period time_identifier geographic_level country_code country_name #> 1 2022 Calendar year National E92000001 England #> 2 2022 Calendar year Regional E92000001 England #> 3 2022 Calendar year Regional E92000001 England #> region_code region_name mystery_count #> 1 42 #> 2 E12000001 North East 25 #> 3 E12000002 North West c"},{"path":"https://dfe-analytical-services.github.io/dfeR/news/index.html","id":"dfer-101","dir":"Changelog","previous_headings":"","what":"dfeR 1.0.1","title":"dfeR 1.0.1","text":"Fix spacing printing z_replace() warning message, updating eesyapi URL README removed extraneous package tests.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/news/index.html","id":"dfer-100","dir":"Changelog","previous_headings":"","what":"dfeR 1.0.0","title":"dfeR 1.0.0","text":"CRAN release: 2025-01-13 Initial CRAN release. Added lookup data geog_time_identifiers. Added z_replace() replace NA values tables except ones geography time columns match ones geog_time_identifiers.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/news/index.html","id":"dfer-061","dir":"Changelog","previous_headings":"","what":"dfeR 0.6.1","title":"dfeR 0.6.1","text":"Patch update pretty_num() function dp argument’s default 0.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/news/index.html","id":"dfer-060","dir":"Changelog","previous_headings":"","what":"dfeR 0.6.0","title":"dfeR 0.6.0","text":"Update pretty_num : can take single multiple values. argument nsmall allows control number digits displayed rounding. Add pretty_num_table() uses pretty_num() format numbers readable format data frames. customization provided pretty_num.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/news/index.html","id":"dfer-051","dir":"Changelog","previous_headings":"","what":"dfeR 0.5.1","title":"dfeR 0.5.1","text":"Patch update get_clean_sql() function ignore lines starting ‘USE’.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/news/index.html","id":"dfer-050","dir":"Changelog","previous_headings":"","what":"dfeR 0.5.0","title":"dfeR 0.5.0","text":"Add following lookup data sets package: ons_geog_shorthands countries regions wd_pcon_lad_la_rgn_ctry Add following fetch_locations() functions: fetch_wards() fetch_pcons() fetch_lads() fetch_las() fetch_regions() fetch_countries() Add wrapper ONS Open Geography Portal API: get_ons_api_data() Add helper turning messages : toggle_message()","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/news/index.html","id":"dfer-041","dir":"Changelog","previous_headings":"","what":"dfeR 0.4.1","title":"dfeR 0.4.1","text":"Update comma_sep() function allow non-numeric values instead throwing error, now returns unchanged.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/news/index.html","id":"dfer-040","dir":"Changelog","previous_headings":"","what":"dfeR 0.4.0","title":"dfeR 0.4.0","text":"Add function creates DfE R project: create_project()","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/news/index.html","id":"dfer-031","dir":"Changelog","previous_headings":"","what":"dfeR 0.3.1","title":"dfeR 0.3.1","text":"Fix bug get_clean_sql() using additional settings lose original SQL statement.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/news/index.html","id":"dfer-030","dir":"Changelog","previous_headings":"","what":"dfeR 0.3.0","title":"dfeR 0.3.0","text":"Add pretty_* functions presenting pretty numbers: pretty_num() pretty_filesize() pretty_time_taken() Add helper function comma separating numbers: comma_sep()","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/news/index.html","id":"dfer-020","dir":"Changelog","previous_headings":"","what":"dfeR 0.2.0","title":"dfeR 0.2.0","text":"Add function formatting financial years: format_fy() Add reversing functions academic financial years: format_ay_reverse() format_fy_reverse() Add function grabbing cleaning SQL script, vignette connecting SQL. get_clean_sql()","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/news/index.html","id":"dfer-011","dir":"Changelog","previous_headings":"","what":"dfeR 0.1.1","title":"dfeR 0.1.1","text":"Add default value decimal place argument round_five_up() function.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/news/index.html","id":"dfer-010","dir":"Changelog","previous_headings":"","what":"dfeR 0.1.0","title":"dfeR 0.1.0","text":"Relaunch package two functions: format_ay() round_five_up()","code":""}]
+[{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement statistics.development@education.gov.uk. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired Mozilla’s code conduct enforcement ladder. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contributing to dfeR","title":"Contributing to dfeR","text":"Ideas dfeR first raised GitHub issue anyone free write code create pull request review. detailed discussion contributing R packages tidyverse, please see development contributing guide code review principles. Full knowledge isn’t needed, though awareness general principles may useful.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":"support","dir":"","previous_headings":"","what":"Support","title":"Contributing to dfeR","text":"’re keen anyone DfE able feel comfortable contributing package. questions, like support making changes, let Statistics Development Team know.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":"basics","dir":"","previous_headings":"","what":"Basics","title":"Contributing to dfeR","text":"contributing dfeR work new branch taken main. pull request must reviewed approved least one admin user can merged. ’ve found bug, please file issue illustrates bug minimal reprex example (also help write unit test, needed). See tidyverse guide create great issue advice.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":"fixing-typos","dir":"","previous_headings":"Basics","what":"Fixing typos","title":"Contributing to dfeR","text":"can fix typos, spelling mistakes, grammatical errors documentation directly using GitHub web interface, long changes made source file. generally means ’ll need edit roxygen2 comments .R, .Rd file. can find .R file generates .Rd reading comment first line.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":"bigger-changes","dir":"","previous_headings":"Basics","what":"Bigger changes","title":"Contributing to dfeR","text":"want make bigger change, ’s good idea first file issue make sure someone team agrees change. Packages worth installing aid development : possible, ’d recommend following Test Driven Development (TDD) approach. Though ’re new package development, already code specific function feel free start step 2, copy function package go back step 1 afterwards. Write tests using testthat behaviour want. Either edit existing test script, adding new function, create test script using: Feel free look /tests/test_that folder examples want see example tests practice. Write just enough code tests pass. , either edit existing function, add new R script using: Add documentation ’ve done. Follow roxygen2 pattern comments. can add standard skeleton using Code > Insert Roxygen Skeleton Ctrl+Shift+Alt+R R script. ’s example looks like basic add() function: Continue improve code keeping tests passing. Automatically style code using: Run full check package using following functions:","code":"install.packages(\"devtools\") install.packages(\"usethis\") install.packages(\"pkgdown\") install.packages(\"roxygen2\") install.packages(\"spelling\") install.packages(\"lintr\") install.packages(\"styler\") usethis::use_test(\"name_of_new_function\") usethis::use_r(\"name_of_new_function\") #' @description Add together two numbers #' #' @param x A number. #' @param y A number. #' @return A number. #' @examples #' add(1, 1) #' add(10, 1) add <- function(x, y) { x + y } styler::style_pkg() devtools::check() # General package check, can also use Ctrl-Shift-E lintr::lint_package() # Check formatting of code spelling::spell_check() # Check for spelling mistakes"},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":"handy-workflows","dir":"","previous_headings":"","what":"Handy workflows","title":"Contributing to dfeR","text":"Keyboard shortcuts devtools package use RStudio: recommend using usethis package possible consistency simplicity.","code":"load_all() # (Ctrl-Shift-L): Load code with dfeR package test() # (Ctrl-Shift-T): Run tests document() # (Ctrl-Shift-D): Rebuild docs and NAMESPACE check() # (Ctrl-Shift-E): Check complete package"},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":"adding-package-dependencies","dir":"","previous_headings":"","what":"Adding package dependencies","title":"Contributing to dfeR","text":"Add packages package users need : Add packages package developers may need :","code":"usethis::use_package(pkgname) usethis::use_package(pkgname, type = \"suggests\")"},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":"updating-the-readme","dir":"","previous_headings":"","what":"Updating the README","title":"Contributing to dfeR","text":"two README files linked pre-commit-hook ensure kept sync. Make changes README.Rmd file run following line rebuild:","code":"devtools::build_readme()"},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":"pkgdown-site","dir":"","previous_headings":"","what":"pkgdown site","title":"Contributing to dfeR","text":"pkgdown site automatically generated. theme set _pkgdown.yml file. Custom CSS can set pkgdown/extra.css file. make edits file need re-initialise site using following line: site hosted GitHub pages. build preview pkgdown site locally running:","code":"pkgdown::init_site() devtools::build_site()"},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":"updating-the-package-version","dir":"","previous_headings":"","what":"Updating the package version","title":"Contributing to dfeR","text":"general, ’ll working ‘development’ version (x.x.x.9000) package CRAN releases, happen every 1-2 months (CRAN recommendation). changes completed, reviewed ready use wild, review R packages guidance submitting new version CRAN. can increment package version using: unsure kind version increment, look lifecycle’s guidance release types. ’ve incremented version number, ’ll offer perform commit behalf. happens add update NEWS.md, acts changelog package. Make sure updated correctly push GitHub. version updated pushed, accepted working CRAN create new GitHub release version. case ’s useful, documented initial CRAN release process tweaks https://github.com/dfe-analytical-services/dfeR/pull/103.","code":"usethis::use_version()"},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":"lifecyles","dir":"","previous_headings":"Updating the package version","what":"Lifecyles","title":"Contributing to dfeR","text":"package lifecycle imported, follow guidance process around deprecating functions arguments.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":"code-style","dir":"","previous_headings":"","what":"Code style","title":"Contributing to dfeR","text":"New code follow tidyverse style guide. use lintr scan styling pull requests, automatically run add comments code failing standards ’d expect. happen, please proactively resolve unlikely approve pull requests styling issues. can use styler package apply styling using: check styling issues locally, use: styler fix linting issues, recommend using first, using lintr check places may need manually fix styling issues line length using snake_case.","code":"styler::style_pkg() lintr::lint_package()"},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":"folder-and-script-structure-conventions","dir":"","previous_headings":"","what":"Folder and script structure conventions","title":"Contributing to dfeR","text":"R package allowed sub directories R/ folder. possible : one script per function one script per function family function belongs family script share name function family. needed _utils.R script used internal functions relate specific family. Documentation data shipped packages kept R/datasets_documentation.R. Scripts used preparing data used package R folder, data-raw/ folder, helper functions can found R/datasets_utils.R folder, details maintaining data sets can found Package data header page. utils.R used hold cross-package helpers aren’t exported functions specific family. Every exported function data set gets test script, called test-.R test-data-.R data set.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":"testing","dir":"","previous_headings":"Folder and script structure conventions","what":"Testing","title":"Contributing to dfeR","text":"use testthat unit tests, expect new functions level test coverage. want see examples existing tests inspiration, take look inside tests/testthat/ folder.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":"test-coverage","dir":"","previous_headings":"Folder and script structure conventions","what":"Test coverage","title":"Contributing to dfeR","text":"GitHub Actions workflows check link package codecov.io, runs automatic scans check % lines functions testing. dfeR codecov pages can preview variation branch commit see impact changes made. need create account login using GitHub see pages. current % coverage shown badge package README GitHub. worth noting 100% coverage mean tests perfect, means lines ran tests, ’s measure quantity rather quality. Interesting see though, ’d recommend using spot potential elements complicated functions may forgotten test.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":"spelling","dir":"","previous_headings":"Folder and script structure conventions","what":"Spelling","title":"Contributing to dfeR","text":"spelling package used check spelling. custom word list exceptions package exists inst/ folder. messages devtools::check() output ’s potential spelling errors. Please review fix genuine errors. can run check using: automatically pick genuine new words package add list, use:","code":"spelling::spell_check_package() spelling::update_wordlist()"},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":"adding-vignettes","dir":"","previous_headings":"","what":"Adding vignettes","title":"Contributing to dfeR","text":"Vignettes can found vignettes/ folder .Rmd files. start new one use:","code":"usethis::use_vignette(\"name_of_vignette\")"},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":"package-data","dir":"","previous_headings":"","what":"Package data","title":"Contributing to dfeR","text":"general workflow data package : Make sure everything need installed package loaded devtools::load_all() Use relevant script data-raw/ generate save data set Document data set R/datasets_documentation.R Update relevant fetch_ functions use data appropriate Run usual package checks re-documenting package update general principle data created reproducible code, ’s custom data ’re defining, write code. ’re sourcing elsewhere, try make use API connections. saves unnecessary data storage bloat makes scripts nice reproducible without external dependencies worry . try keep data-raw/ scripts tidy possible, helper functions created R/datasets-utils.R. exported users package used scripts data-raw/ folder creation data exported package. Sometimes running scripts create new data sets might hit error: , try restarting R, making sure project open, package loaded using devtools::load_all() run . details maintaining data R package generally, see chapter 7 Data, R packages Hadley Wickham Jennifer Bryan.","code":"Error in `check_is_package()`: i use_data() is designed to work with packages X Project \"some letters and numbers\" is not an R package."},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":"geography-data-sets","dir":"","previous_headings":"Package data","what":"Geography data sets","title":"Contributing to dfeR","text":"package export number data sets derived ONS Open Geography portal easy reuse within DfE analysis. Whenever new data appears want make updates need manually.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":"source","dir":"","previous_headings":"Package data > Geography data sets","what":"Source","title":"Contributing to dfeR","text":"can, use API get data, completely reproducible pipelines (rather saving static files manually check updates made, worry file storage). ONS Open Geography portal, usually looking data published feature feature layer, ones made available via API connection. ’ll able preview data browser basic searching / filtering table want visualise . feature data option somewhere ‘want use data’ (something similar update website design) can get API explorer allows run basic query browser. can usually find dataset_id also parameters want use get data need. get_ons_api_data() function acts wrapper ONS API, things like converting readable parameters query string also handles batching multiple requests needed, get data one nice neat data frame (’s limit rows per single query API). Make use function first, though ’re looking expand function ’s anything get_ons_api_data() function doesn’t ’d like , check boundr package need, gives number methods extracting data portal well. neither existing function boundr package need, can look raising suggestion dfeR ’s DfE specific request, boundr ’s general request. way ONS publish varied first years publishing, top data set individual API connection every year boundaries. ’s link time ONS side helper functions defined R/datasets_utils.R wrap single neat time series bundle us. Given likelihood variations, don’t surprised adding new years data sets results errors first time around, manual fudgery often needed roll sleeves prepare get elbow deep murky depths R/datasets_utils.R file! also data just define code curate , like custom regions publish DfE lookup table shorthands used column names ONS.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":"workflow-for-updating-geography-data","dir":"","previous_headings":"Package data > Geography data sets","what":"Workflow for updating geography data","title":"Contributing to dfeR","text":"general workflow data package : Add new year relevant script data-raw/ script Run script create new data set Run package checks make sure data hasn’t gone funky Update fetch_ functions use data appropriate Document changes data set R/datasets_documentation.R appropriate data sets tests fail soon number rows columns change, provide reliable service users, also catch remind us maintain documentation row number column names defined R/datasets_documentation.R. tests fail, update relevant documentation, (!) update test expectations match new documentation. fetch_ family functions R/fetch.R act quick helpers pull data sets export, users can ees-ily grab say list Scottish Parliamentary Constituencies 2024, rather needing pull whole data frame process . Often adding new year data , need edit year variables set near start data-raw/ file also relevant fetch_ function @param year, well updating public documentation data set R/datasets_documentation.R.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/CONTRIBUTING.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Contributing to dfeR","text":"Please note dfeR project released Contributor Code Conduct. contributing project agree abide terms.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"GNU General Public License","title":"GNU General Public License","text":"Version 3, 29 June 2007Copyright © 2007 Free Software Foundation, Inc. Everyone permitted copy distribute verbatim copies license document, changing allowed.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/LICENSE.html","id":"preamble","dir":"","previous_headings":"","what":"Preamble","title":"GNU General Public License","text":"GNU General Public License free, copyleft license software kinds works. licenses software practical works designed take away freedom share change works. contrast, GNU General Public License intended guarantee freedom share change versions program–make sure remains free software users. , Free Software Foundation, use GNU General Public License software; applies also work released way authors. can apply programs, . speak free software, referring freedom, price. General Public Licenses designed make sure freedom distribute copies free software (charge wish), receive source code can get want , can change software use pieces new free programs, know can things. protect rights, need prevent others denying rights asking surrender rights. Therefore, certain responsibilities distribute copies software, modify : responsibilities respect freedom others. example, distribute copies program, whether gratis fee, must pass recipients freedoms received. must make sure , , receive can get source code. must show terms know rights. Developers use GNU GPL protect rights two steps: (1) assert copyright software, (2) offer License giving legal permission copy, distribute /modify . developers’ authors’ protection, GPL clearly explains warranty free software. users’ authors’ sake, GPL requires modified versions marked changed, problems attributed erroneously authors previous versions. devices designed deny users access install run modified versions software inside , although manufacturer can . fundamentally incompatible aim protecting users’ freedom change software. systematic pattern abuse occurs area products individuals use, precisely unacceptable. Therefore, designed version GPL prohibit practice products. problems arise substantially domains, stand ready extend provision domains future versions GPL, needed protect freedom users. Finally, every program threatened constantly software patents. States allow patents restrict development use software general-purpose computers, , wish avoid special danger patents applied free program make effectively proprietary. prevent , GPL assures patents used render program non-free. precise terms conditions copying, distribution modification follow.","code":""},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/LICENSE.html","id":"id_0-definitions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"0. Definitions","title":"GNU General Public License","text":"“License” refers version 3 GNU General Public License. “Copyright” also means copyright-like laws apply kinds works, semiconductor masks. “Program” refers copyrightable work licensed License. licensee addressed “”. “Licensees” “recipients” may individuals organizations. “modify” work means copy adapt part work fashion requiring copyright permission, making exact copy. resulting work called “modified version” earlier work work “based ” earlier work. “covered work” means either unmodified Program work based Program. “propagate” work means anything , without permission, make directly secondarily liable infringement applicable copyright law, except executing computer modifying private copy. Propagation includes copying, distribution (without modification), making available public, countries activities well. “convey” work means kind propagation enables parties make receive copies. Mere interaction user computer network, transfer copy, conveying. interactive user interface displays “Appropriate Legal Notices” extent includes convenient prominently visible feature (1) displays appropriate copyright notice, (2) tells user warranty work (except extent warranties provided), licensees may convey work License, view copy License. interface presents list user commands options, menu, prominent item list meets criterion.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/LICENSE.html","id":"id_1-source-code","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"1. Source Code","title":"GNU General Public License","text":"“source code” work means preferred form work making modifications . “Object code” means non-source form work. “Standard Interface” means interface either official standard defined recognized standards body, , case interfaces specified particular programming language, one widely used among developers working language. “System Libraries” executable work include anything, work whole, () included normal form packaging Major Component, part Major Component, (b) serves enable use work Major Component, implement Standard Interface implementation available public source code form. “Major Component”, context, means major essential component (kernel, window system, ) specific operating system () executable work runs, compiler used produce work, object code interpreter used run . “Corresponding Source” work object code form means source code needed generate, install, (executable work) run object code modify work, including scripts control activities. However, include work’s System Libraries, general-purpose tools generally available free programs used unmodified performing activities part work. example, Corresponding Source includes interface definition files associated source files work, source code shared libraries dynamically linked subprograms work specifically designed require, intimate data communication control flow subprograms parts work. Corresponding Source need include anything users can regenerate automatically parts Corresponding Source. Corresponding Source work source code form work.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/LICENSE.html","id":"id_2-basic-permissions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"2. Basic Permissions","title":"GNU General Public License","text":"rights granted License granted term copyright Program, irrevocable provided stated conditions met. License explicitly affirms unlimited permission run unmodified Program. output running covered work covered License output, given content, constitutes covered work. License acknowledges rights fair use equivalent, provided copyright law. may make, run propagate covered works convey, without conditions long license otherwise remains force. may convey covered works others sole purpose make modifications exclusively , provide facilities running works, provided comply terms License conveying material control copyright. thus making running covered works must exclusively behalf, direction control, terms prohibit making copies copyrighted material outside relationship . Conveying circumstances permitted solely conditions stated . Sublicensing allowed; section 10 makes unnecessary.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/LICENSE.html","id":"id_3-protecting-users-legal-rights-from-anti-circumvention-law","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"3. Protecting Users’ Legal Rights From Anti-Circumvention Law","title":"GNU General Public License","text":"covered work shall deemed part effective technological measure applicable law fulfilling obligations article 11 WIPO copyright treaty adopted 20 December 1996, similar laws prohibiting restricting circumvention measures. convey covered work, waive legal power forbid circumvention technological measures extent circumvention effected exercising rights License respect covered work, disclaim intention limit operation modification work means enforcing, work’s users, third parties’ legal rights forbid circumvention technological measures.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/LICENSE.html","id":"id_4-conveying-verbatim-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"4. Conveying Verbatim Copies","title":"GNU General Public License","text":"may convey verbatim copies Program’s source code receive , medium, provided conspicuously appropriately publish copy appropriate copyright notice; keep intact notices stating License non-permissive terms added accord section 7 apply code; keep intact notices absence warranty; give recipients copy License along Program. may charge price price copy convey, may offer support warranty protection fee.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/LICENSE.html","id":"id_5-conveying-modified-source-versions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"5. Conveying Modified Source Versions","title":"GNU General Public License","text":"may convey work based Program, modifications produce Program, form source code terms section 4, provided also meet conditions: ) work must carry prominent notices stating modified , giving relevant date. b) work must carry prominent notices stating released License conditions added section 7. requirement modifies requirement section 4 “keep intact notices”. c) must license entire work, whole, License anyone comes possession copy. License therefore apply, along applicable section 7 additional terms, whole work, parts, regardless packaged. License gives permission license work way, invalidate permission separately received . d) work interactive user interfaces, must display Appropriate Legal Notices; however, Program interactive interfaces display Appropriate Legal Notices, work need make . compilation covered work separate independent works, nature extensions covered work, combined form larger program, volume storage distribution medium, called “aggregate” compilation resulting copyright used limit access legal rights compilation’s users beyond individual works permit. Inclusion covered work aggregate cause License apply parts aggregate.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/LICENSE.html","id":"id_6-conveying-non-source-forms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"6. Conveying Non-Source Forms","title":"GNU General Public License","text":"may convey covered work object code form terms sections 4 5, provided also convey machine-readable Corresponding Source terms License, one ways: ) Convey object code , embodied , physical product (including physical distribution medium), accompanied Corresponding Source fixed durable physical medium customarily used software interchange. b) Convey object code , embodied , physical product (including physical distribution medium), accompanied written offer, valid least three years valid long offer spare parts customer support product model, give anyone possesses object code either (1) copy Corresponding Source software product covered License, durable physical medium customarily used software interchange, price reasonable cost physically performing conveying source, (2) access copy Corresponding Source network server charge. c) Convey individual copies object code copy written offer provide Corresponding Source. alternative allowed occasionally noncommercially, received object code offer, accord subsection 6b. d) Convey object code offering access designated place (gratis charge), offer equivalent access Corresponding Source way place charge. need require recipients copy Corresponding Source along object code. place copy object code network server, Corresponding Source may different server (operated third party) supports equivalent copying facilities, provided maintain clear directions next object code saying find Corresponding Source. Regardless server hosts Corresponding Source, remain obligated ensure available long needed satisfy requirements. e) Convey object code using peer--peer transmission, provided inform peers object code Corresponding Source work offered general public charge subsection 6d. separable portion object code, whose source code excluded Corresponding Source System Library, need included conveying object code work. “User Product” either (1) “consumer product”, means tangible personal property normally used personal, family, household purposes, (2) anything designed sold incorporation dwelling. determining whether product consumer product, doubtful cases shall resolved favor coverage. particular product received particular user, “normally used” refers typical common use class product, regardless status particular user way particular user actually uses, expects expected use, product. product consumer product regardless whether product substantial commercial, industrial non-consumer uses, unless uses represent significant mode use product. “Installation Information” User Product means methods, procedures, authorization keys, information required install execute modified versions covered work User Product modified version Corresponding Source. information must suffice ensure continued functioning modified object code case prevented interfered solely modification made. convey object code work section , , specifically use , User Product, conveying occurs part transaction right possession use User Product transferred recipient perpetuity fixed term (regardless transaction characterized), Corresponding Source conveyed section must accompanied Installation Information. requirement apply neither third party retains ability install modified object code User Product (example, work installed ROM). requirement provide Installation Information include requirement continue provide support service, warranty, updates work modified installed recipient, User Product modified installed. Access network may denied modification materially adversely affects operation network violates rules protocols communication across network. Corresponding Source conveyed, Installation Information provided, accord section must format publicly documented (implementation available public source code form), must require special password key unpacking, reading copying.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/LICENSE.html","id":"id_7-additional-terms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"7. Additional Terms","title":"GNU General Public License","text":"“Additional permissions” terms supplement terms License making exceptions one conditions. Additional permissions applicable entire Program shall treated though included License, extent valid applicable law. additional permissions apply part Program, part may used separately permissions, entire Program remains governed License without regard additional permissions. convey copy covered work, may option remove additional permissions copy, part . (Additional permissions may written require removal certain cases modify work.) may place additional permissions material, added covered work, can give appropriate copyright permission. Notwithstanding provision License, material add covered work, may (authorized copyright holders material) supplement terms License terms: ) Disclaiming warranty limiting liability differently terms sections 15 16 License; b) Requiring preservation specified reasonable legal notices author attributions material Appropriate Legal Notices displayed works containing ; c) Prohibiting misrepresentation origin material, requiring modified versions material marked reasonable ways different original version; d) Limiting use publicity purposes names licensors authors material; e) Declining grant rights trademark law use trade names, trademarks, service marks; f) Requiring indemnification licensors authors material anyone conveys material (modified versions ) contractual assumptions liability recipient, liability contractual assumptions directly impose licensors authors. non-permissive additional terms considered “restrictions” within meaning section 10. Program received , part , contains notice stating governed License along term restriction, may remove term. license document contains restriction permits relicensing conveying License, may add covered work material governed terms license document, provided restriction survive relicensing conveying. add terms covered work accord section, must place, relevant source files, statement additional terms apply files, notice indicating find applicable terms. Additional terms, permissive non-permissive, may stated form separately written license, stated exceptions; requirements apply either way.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/LICENSE.html","id":"id_8-termination","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"8. Termination","title":"GNU General Public License","text":"may propagate modify covered work except expressly provided License. attempt otherwise propagate modify void, automatically terminate rights License (including patent licenses granted third paragraph section 11). However, cease violation License, license particular copyright holder reinstated () provisionally, unless copyright holder explicitly finally terminates license, (b) permanently, copyright holder fails notify violation reasonable means prior 60 days cessation. Moreover, license particular copyright holder reinstated permanently copyright holder notifies violation reasonable means, first time received notice violation License (work) copyright holder, cure violation prior 30 days receipt notice. Termination rights section terminate licenses parties received copies rights License. rights terminated permanently reinstated, qualify receive new licenses material section 10.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/LICENSE.html","id":"id_9-acceptance-not-required-for-having-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"9. Acceptance Not Required for Having Copies","title":"GNU General Public License","text":"required accept License order receive run copy Program. Ancillary propagation covered work occurring solely consequence using peer--peer transmission receive copy likewise require acceptance. However, nothing License grants permission propagate modify covered work. actions infringe copyright accept License. Therefore, modifying propagating covered work, indicate acceptance License .","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/LICENSE.html","id":"id_10-automatic-licensing-of-downstream-recipients","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"10. Automatic Licensing of Downstream Recipients","title":"GNU General Public License","text":"time convey covered work, recipient automatically receives license original licensors, run, modify propagate work, subject License. responsible enforcing compliance third parties License. “entity transaction” transaction transferring control organization, substantially assets one, subdividing organization, merging organizations. propagation covered work results entity transaction, party transaction receives copy work also receives whatever licenses work party’s predecessor interest give previous paragraph, plus right possession Corresponding Source work predecessor interest, predecessor can get reasonable efforts. may impose restrictions exercise rights granted affirmed License. example, may impose license fee, royalty, charge exercise rights granted License, may initiate litigation (including cross-claim counterclaim lawsuit) alleging patent claim infringed making, using, selling, offering sale, importing Program portion .","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/LICENSE.html","id":"id_11-patents","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"11. Patents","title":"GNU General Public License","text":"“contributor” copyright holder authorizes use License Program work Program based. work thus licensed called contributor’s “contributor version”. contributor’s “essential patent claims” patent claims owned controlled contributor, whether already acquired hereafter acquired, infringed manner, permitted License, making, using, selling contributor version, include claims infringed consequence modification contributor version. purposes definition, “control” includes right grant patent sublicenses manner consistent requirements License. contributor grants non-exclusive, worldwide, royalty-free patent license contributor’s essential patent claims, make, use, sell, offer sale, import otherwise run, modify propagate contents contributor version. following three paragraphs, “patent license” express agreement commitment, however denominated, enforce patent (express permission practice patent covenant sue patent infringement). “grant” patent license party means make agreement commitment enforce patent party. convey covered work, knowingly relying patent license, Corresponding Source work available anyone copy, free charge terms License, publicly available network server readily accessible means, must either (1) cause Corresponding Source available, (2) arrange deprive benefit patent license particular work, (3) arrange, manner consistent requirements License, extend patent license downstream recipients. “Knowingly relying” means actual knowledge , patent license, conveying covered work country, recipient’s use covered work country, infringe one identifiable patents country reason believe valid. , pursuant connection single transaction arrangement, convey, propagate procuring conveyance , covered work, grant patent license parties receiving covered work authorizing use, propagate, modify convey specific copy covered work, patent license grant automatically extended recipients covered work works based . patent license “discriminatory” include within scope coverage, prohibits exercise , conditioned non-exercise one rights specifically granted License. may convey covered work party arrangement third party business distributing software, make payment third party based extent activity conveying work, third party grants, parties receive covered work , discriminatory patent license () connection copies covered work conveyed (copies made copies), (b) primarily connection specific products compilations contain covered work, unless entered arrangement, patent license granted, prior 28 March 2007. Nothing License shall construed excluding limiting implied license defenses infringement may otherwise available applicable patent law.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/LICENSE.html","id":"id_12-no-surrender-of-others-freedom","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"12. No Surrender of Others’ Freedom","title":"GNU General Public License","text":"conditions imposed (whether court order, agreement otherwise) contradict conditions License, excuse conditions License. convey covered work satisfy simultaneously obligations License pertinent obligations, consequence may convey . example, agree terms obligate collect royalty conveying convey Program, way satisfy terms License refrain entirely conveying Program.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/LICENSE.html","id":"id_13-use-with-the-gnu-affero-general-public-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"13. Use with the GNU Affero General Public License","title":"GNU General Public License","text":"Notwithstanding provision License, permission link combine covered work work licensed version 3 GNU Affero General Public License single combined work, convey resulting work. terms License continue apply part covered work, special requirements GNU Affero General Public License, section 13, concerning interaction network apply combination .","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/LICENSE.html","id":"id_14-revised-versions-of-this-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"14. Revised Versions of this License","title":"GNU General Public License","text":"Free Software Foundation may publish revised /new versions GNU General Public License time time. new versions similar spirit present version, may differ detail address new problems concerns. version given distinguishing version number. Program specifies certain numbered version GNU General Public License “later version” applies , option following terms conditions either numbered version later version published Free Software Foundation. Program specify version number GNU General Public License, may choose version ever published Free Software Foundation. Program specifies proxy can decide future versions GNU General Public License can used, proxy’s public statement acceptance version permanently authorizes choose version Program. Later license versions may give additional different permissions. However, additional obligations imposed author copyright holder result choosing follow later version.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/LICENSE.html","id":"id_15-disclaimer-of-warranty","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"15. Disclaimer of Warranty","title":"GNU General Public License","text":"WARRANTY PROGRAM, EXTENT PERMITTED APPLICABLE LAW. EXCEPT OTHERWISE STATED WRITING COPYRIGHT HOLDERS /PARTIES PROVIDE PROGRAM “” WITHOUT WARRANTY KIND, EITHER EXPRESSED IMPLIED, INCLUDING, LIMITED , IMPLIED WARRANTIES MERCHANTABILITY FITNESS PARTICULAR PURPOSE. ENTIRE RISK QUALITY PERFORMANCE PROGRAM . PROGRAM PROVE DEFECTIVE, ASSUME COST NECESSARY SERVICING, REPAIR CORRECTION.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/LICENSE.html","id":"id_16-limitation-of-liability","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"16. Limitation of Liability","title":"GNU General Public License","text":"EVENT UNLESS REQUIRED APPLICABLE LAW AGREED WRITING COPYRIGHT HOLDER, PARTY MODIFIES /CONVEYS PROGRAM PERMITTED , LIABLE DAMAGES, INCLUDING GENERAL, SPECIAL, INCIDENTAL CONSEQUENTIAL DAMAGES ARISING USE INABILITY USE PROGRAM (INCLUDING LIMITED LOSS DATA DATA RENDERED INACCURATE LOSSES SUSTAINED THIRD PARTIES FAILURE PROGRAM OPERATE PROGRAMS), EVEN HOLDER PARTY ADVISED POSSIBILITY DAMAGES.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/LICENSE.html","id":"id_17-interpretation-of-sections-15-and-16","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"17. Interpretation of Sections 15 and 16","title":"GNU General Public License","text":"disclaimer warranty limitation liability provided given local legal effect according terms, reviewing courts shall apply local law closely approximates absolute waiver civil liability connection Program, unless warranty assumption liability accompanies copy Program return fee. END TERMS CONDITIONS","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/LICENSE.html","id":"how-to-apply-these-terms-to-your-new-programs","dir":"","previous_headings":"","what":"How to Apply These Terms to Your New Programs","title":"GNU General Public License","text":"develop new program, want greatest possible use public, best way achieve make free software everyone can redistribute change terms. , attach following notices program. safest attach start source file effectively state exclusion warranty; file least “copyright” line pointer full notice found. Also add information contact electronic paper mail. program terminal interaction, make output short notice like starts interactive mode: hypothetical commands show w show c show appropriate parts General Public License. course, program’s commands might different; GUI interface, use “box”. also get employer (work programmer) school, , sign “copyright disclaimer” program, necessary. information , apply follow GNU GPL, see . GNU General Public License permit incorporating program proprietary programs. program subroutine library, may consider useful permit linking proprietary applications library. want , use GNU Lesser General Public License instead License. first, please read .","code":" Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free software, and you are welcome to redistribute it under certain conditions; type 'show c' for details."},{"path":"https://dfe-analytical-services.github.io/dfeR/PULL_REQUEST_TEMPLATE.html","id":null,"dir":"","previous_headings":"","what":"Brief overview of changes","title":"Brief overview of changes","text":"…","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/PULL_REQUEST_TEMPLATE.html","id":"why-are-these-changes-being-made","dir":"","previous_headings":"","what":"Why are these changes being made?","title":"Brief overview of changes","text":"…","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/PULL_REQUEST_TEMPLATE.html","id":"detailed-description-of-changes","dir":"","previous_headings":"","what":"Detailed description of changes","title":"Brief overview of changes","text":"…","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/PULL_REQUEST_TEMPLATE.html","id":"additional-information-for-reviewers","dir":"","previous_headings":"","what":"Additional information for reviewers","title":"Brief overview of changes","text":"…","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/PULL_REQUEST_TEMPLATE.html","id":"issue-ticket-numbers-and-link","dir":"","previous_headings":"","what":"Issue ticket number/s and link","title":"Brief overview of changes","text":"…","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/articles/connecting_to_sql.html","id":"pre-requisites","dir":"Articles","previous_headings":"","what":"Pre-requisites","title":"Connecting to SQL","text":"connect SQL need SQL drivers installed. come standard currently Microsoft SQL Server Management Studio downloads Department Education’s software center. Make sure downloaded latest version starting.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/articles/connecting_to_sql.html","id":"connecting-to-a-database","dir":"Articles","previous_headings":"","what":"Connecting to a database","title":"Connecting to SQL","text":"Usually DfE use combination odbc DBI connect SQL databases. connect vary depending whether ’re running R code laptop, part deployed R Shiny app. running code laptop can automatically use Windows login (trusted connection) grant access database, package can automatically detect user details. advice finding database details, connecting SQL database R Shiny app deployed server, please contact Statistics Development Team able advise setup steps required. Note server name may include backslashes, ’ll need make sure two backslashes R code due way special characters escaped. example, SQL Server Management Studio (SSMS) Azure Data Studio might call server T1PRANMSQL\\SQLPROD,60125, R adding server name ’d need call T1PRANMSQL\\\\SQLPROD,60125.","code":"# Library calls ==== library(odbc) library(DBI) # Database connection ==== con <- DBI::dbConnect(odbc::odbc(), Driver = \"ODBC Driver 17 for SQL Server\", Server = \"server_name\", Database = \"database_name\", UID = \"\", PWD = \"\", Trusted_Connection = \"Yes\" )"},{"path":"https://dfe-analytical-services.github.io/dfeR/articles/connecting_to_sql.html","id":"reading-a-sql-script-into-r","dir":"Articles","previous_headings":"","what":"Reading a SQL script into R","title":"Connecting to SQL","text":"number standard characters found SQL scripts can cause issues reading SQL script within R created get_clean_sql() function assist . Assume connected database assigned connection con variable, use following line read cleaned version SQL script R. get_clean_sql() ignore lines code start USE specify database, database already specified connection setup.","code":"sql_query <- dfeR::get_clean_sql(\"path_to_sql_file.sql\")"},{"path":"https://dfe-analytical-services.github.io/dfeR/articles/connecting_to_sql.html","id":"executing-the-sql-query","dir":"Articles","previous_headings":"","what":"Executing the SQL query","title":"Connecting to SQL","text":"Now SQL query saved variable R environment can pass function execute database. ’s number potential ways , though common way use dbGetQuery() DBI package, setting statement cleaned SQL query. ’s important note dbGetQuery() intended work ‘SELECT’ style queries . ’re something isn’t ‘SELECT’ query, writing back SQL, consider using dbExecute() dbSendQuery() functions DBI package instead. side note, SQL query short, write directly function :","code":"sql_query_result <- DBI::dbGetQuery(con, statement = sql_query) sql_query_result <- DBI::dbGetQuery( con, statement = \"SELECT * FROM [my_database_table]\" )"},{"path":"https://dfe-analytical-services.github.io/dfeR/articles/connecting_to_sql.html","id":"troubleshooting","dir":"Articles","previous_headings":"Executing the SQL query","what":"Troubleshooting","title":"Connecting to SQL","text":"first advice hit error, check SQL script runs SQL Server Management Studio (SSMS) Azure Data Studio valid SQL ‘SELECT’ query returns single output. Assuming runs fine SSMS, next thing try set additional settings cleaning SQL script. can additional_settings argument get_clean_sql() function. add additional settings start SQL query sometimes necessary odbc DBI connection correctly execute query. troubleshooting tips, please see Interacting SQL database section Analysts’ Guide, contact Statistics Development Team support.","code":"sql_query <- dfeR::get_clean_sql( \"path_to_sql_file.sql\", additional_settings = TRUE )"},{"path":"https://dfe-analytical-services.github.io/dfeR/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Cam Race. Author, maintainer. Department Education, England. Copyright holder. Laura Selby. Author. Adam Robinson. Author. Jen Machin. Contributor. Jake Tufts. Contributor. Rich Bielby. Contributor. Menna Zayed. Contributor. Lauren Snaathorst. Contributor.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Race C, Selby L, Robinson (2025). dfeR: Common Department Education Analysis Tasks. R package version 1.0.1.9000, https://github.com/dfe-analytical-services/dfeR, https://dfe-analytical-services.github.io/dfeR/.","code":"@Manual{, title = {dfeR: Common Department for Education Analysis Tasks}, author = {Cam Race and Laura Selby and Adam Robinson}, year = {2025}, note = {R package version 1.0.1.9000, https://github.com/dfe-analytical-services/dfeR}, url = {https://dfe-analytical-services.github.io/dfeR/}, }"},{"path":"https://dfe-analytical-services.github.io/dfeR/index.html","id":"dfer-","dir":"","previous_headings":"","what":"Common Department for Education Analysis Tasks","title":"Common Department for Education Analysis Tasks","text":"goal dfeR help standardise R programming across Department Education (DfE), facilitate sharing business specific functions, making code easier read write. Credit lauraselby logo featuring Frederick!","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/index.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Common Department for Education Analysis Tasks","text":"package open DfE anything think useful programmers analysts can contributed. Functionality dfeR expected focus around following: DfE specific formatting helper functions Working DfE databases Templates analytical projects API wrappers commonly needed DfE analysis (don’t separate package) Geography lookup files helper functions Documentation included package far pkgdown site.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/index.html","id":"relevant-other-packages","dir":"","previous_headings":"Scope","what":"Relevant other packages","title":"Common Department for Education Analysis Tasks","text":"also maintain dfeshiny package, expect functions specific R Shiny applications live . connecting data explore education statistics, building eesyapi package. giasr package, developed connecting data get information schools service. DfE specific data dfeR package taken Open Geography Portal. ’re looking getting new data portal also worth looking boundr package, gives functions directly extracting data .","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Common Department for Education Analysis Tasks","text":"dfeR available CRAN can install directly : can install development version GitHub. using renv project (recommended): Otherwise:","code":"install.packages(\"dfeR\") renv::install(\"dfe-analytical-services/dfeR\") # install.packages(\"devtools\") devtools::install_github(\"dfe-analytical-services/dfeR\")"},{"path":"https://dfe-analytical-services.github.io/dfeR/index.html","id":"proxy","dir":"","previous_headings":"","what":"Proxy","title":"Common Department for Education Analysis Tasks","text":"need setting proxy settings order able work R Git within DfE estate now ended. previously run proxy script previous versions dfeR package, contact Statistics Development Team assist cleaning system settings.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/index.html","id":"contributing","dir":"","previous_headings":"","what":"Contributing","title":"Common Department for Education Analysis Tasks","text":"Ideas dfeR first raised GitHub issue anyone free write code create pull request review. details contributing dfeR, see contributing guidelines.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/index.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Common Department for Education Analysis Tasks","text":"Please note dfeR project released Contributor Code Conduct. contributing project, agree abide terms.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/index.html","id":"examples","dir":"","previous_headings":"","what":"Examples","title":"Common Department for Education Analysis Tasks","text":"example functions within package: details functions available package, examples use , please see dfeR package reference documentation.","code":"library(dfeR) # Prettify large numbers pretty_num(111111111, gbp = TRUE) #> [1] \"£111 million\" pretty_num(-11^8, dp = -1) #> [1] \"-210 million\" # Convert bytes to readable size pretty_filesize(77777777) #> [1] \"77.78 MB\" # Calculate elapsed time and present prettily start <- Sys.time() end <- Sys.time() + 789890 pretty_time_taken(start, end) #> [1] \"219 hours 24 minutes 50 seconds\" # Round 5's up instead of bankers round used by round() in base R round_five_up(2.5) #> [1] 3 round(2.5) # base R #> [1] 2 # Custom formatting for academic and financial years format_ay(202425) #> [1] \"2024/25\" format_fy(202425) #> [1] \"2024-25\" format_ay_reverse(\"2024/25\") #> [1] \"202425\" format_fy_reverse(\"2024-25\") #> [1] \"202425\" # Get Ward to PCon to LAD to LA to Rgn to Ctry lookup file my_data <- dfeR::wd_pcon_lad_la_rgn_ctry head(my_data) # show first 5 rows in console #> first_available_year_included most_recent_year_included #> 1 2017 2017 #> 2 2017 2017 #> 3 2017 2020 #> 4 2017 2017 #> 5 2017 2020 #> 6 2017 2017 #> ward_name pcon_name lad_name la_name #> 1 Bastwell Blackburn Blackburn with Darwen Blackburn with Darwen #> 2 Ormesby Redcar Redcar and Cleveland Redcar and Cleveland #> 3 Burn Valley Hartlepool Hartlepool Hartlepool #> 4 Beardwood with Lammack Blackburn Blackburn with Darwen Blackburn with Darwen #> 5 De Bruce Hartlepool Hartlepool Hartlepool #> 6 St Germain's Redcar Redcar and Cleveland Redcar and Cleveland #> region_name country_name ward_code pcon_code lad_code new_la_code #> 1 North West England E05001621 E14000570 E06000008 E06000008 #> 2 North East England E05001518 E14000891 E06000003 E06000003 #> 3 North East England E05008942 E14000733 E06000001 E06000001 #> 4 North West England E05001622 E14000570 E06000008 E06000008 #> 5 North East England E05008943 E14000733 E06000001 E06000001 #> 6 North East England E05001519 E14000891 E06000003 E06000003 #> region_code country_code #> 1 E12000002 E92000001 #> 2 E12000001 E92000001 #> 3 E12000001 E92000001 #> 4 E12000002 E92000001 #> 5 E12000001 E92000001 #> 6 E12000001 E92000001 # Get all countries dfeR::countries #> country_code country_name #> 1 E92000001 England #> 2 K02000001 United Kingdom #> 3 K03000001 Great Britain #> 4 K04000001 England and Wales #> 5 N92000002 Northern Ireland #> 6 S92000003 Scotland #> 7 W92000004 Wales #> 8 z England, Wales and Northern Ireland #> 9 z Outside of England and unknown #> 10 z Outside of the United Kingdom and unknown # Get all PCon names and codes for 2024 fetch_pcons(2024) |> head() # show first 5 rows only #> pcon_code pcon_name #> 1 S14000045 Midlothian #> 2 S14000027 Na h-Eileanan an Iar #> 3 S14000021 East Renfrewshire #> 4 S14000048 North Ayrshire and Arran #> 5 S14000051 Orkney and Shetland #> 6 E14001440 Redcar # Get All LADs in Scotland in 2017 fetch_lads(2017, \"Scotland\") |> head() # show first 5 rows only #> lad_code lad_name #> 1 S12000019 Midlothian #> 2 S12000015 Fife #> 3 S12000014 Falkirk #> 4 S12000013 Na h-Eileanan Siar #> 5 S12000018 Inverclyde #> 6 S12000011 East Renfrewshire # Get all LAs in Scotland and Northern Ireland in 2022 fetch_las(2022, c(\"Scotland\", \"Northern Ireland\")) |> head() # show first 5 rows only #> new_la_code la_name #> 1 N09000003 Belfast #> 2 N09000004 Causeway Coast and Glens #> 3 N09000002 Armagh City, Banbridge and Craigavon #> 4 N09000005 Derry City and Strabane #> 5 N09000001 Antrim and Newtownabbey #> 6 N09000006 Fermanagh and Omagh # Get all Welsh wards for 2021 fetch_wards(2021, \"Wales\") |> head() # show first 5 rows only #> ward_code ward_name #> 1 W05000981 Aethwy #> 2 W05000982 Bro Aberffraw #> 3 W05000983 Bro Rhosyr #> 4 W05000107 Tregarth & Mynydd Llandygai #> 5 W05000984 Caergybi #> 6 W05000985 Canolbarth Môn # The following have no specific years available and return all values fetch_regions() #> region_code region_name #> 1 E12000001 North East #> 2 E12000002 North West #> 3 E12000003 Yorkshire and The Humber #> 4 E12000004 East Midlands #> 5 E12000005 West Midlands #> 6 E12000006 East of England #> 7 E12000007 London #> 8 E12000008 South East #> 9 E12000009 South West #> 10 E13000001 Inner London #> 11 E13000002 Outer London #> 12 z Outside of England and unknown #> 13 z Outside of the United Kingdom and unknown #> 14 z Outside of England #> 15 z Outside of United Kingdom #> 16 z Unknown fetch_countries() #> country_code country_name #> 1 E92000001 England #> 2 K02000001 United Kingdom #> 3 K03000001 Great Britain #> 4 K04000001 England and Wales #> 5 N92000002 Northern Ireland #> 6 S92000003 Scotland #> 7 W92000004 Wales #> 8 z England, Wales and Northern Ireland #> 9 z Outside of England and unknown #> 10 z Outside of the United Kingdom and unknown"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/comma_sep.html","id":null,"dir":"Reference","previous_headings":"","what":"Comma separate — comma_sep","title":"Comma separate — comma_sep","text":"Adds separating commas big numbers. value numeric return value unchanged string.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/comma_sep.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Comma separate — comma_sep","text":"","code":"comma_sep(number, nsmall = 0L)"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/comma_sep.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Comma separate — comma_sep","text":"number number comma separated nsmall minimum number digits right decimal point","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/comma_sep.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Comma separate — comma_sep","text":"string","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/comma_sep.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Comma separate — comma_sep","text":"","code":"comma_sep(100) #> [1] \"100\" comma_sep(1000) #> [1] \"1,000\" comma_sep(3567000) #> [1] \"3,567,000\""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/countries.html","id":null,"dir":"Reference","previous_headings":"","what":"Lookup for valid country names and codes — countries","title":"Lookup for valid country names and codes — countries","text":"lookup ONS geography country names codes, well custom DfE names codes. used definitive list screening open data published DfE.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/countries.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Lookup for valid country names and codes — countries","text":"","code":"countries"},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/countries.html","id":"countries","dir":"Reference","previous_headings":"","what":"countries","title":"Lookup for valid country names and codes — countries","text":"data frame 10 rows 2 columns: country_name Country name country_code Country code","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/countries.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Lookup for valid country names and codes — countries","text":"curated explore.statistics@education.gov.uk, ONS codes sourced https://geoportal.statistics.gov.uk/search?q=countries%20names%20and%20codes","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/create_project.html","id":null,"dir":"Reference","previous_headings":"","what":"Creates a pre-populated project for DfE R — create_project","title":"Creates a pre-populated project for DfE R — create_project","text":"Creates pre-populated project DfE R","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/create_project.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creates a pre-populated project for DfE R — create_project","text":"","code":"create_project( path, init_renv = TRUE, include_structure_for_pkg = FALSE, create_publication_proj = FALSE, include_github_gitignore, ... )"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/create_project.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creates a pre-populated project for DfE R — create_project","text":"path Path new project init_renv Boolean; initiate renv project. Default set true. include_structure_for_pkg Boolean; Additional folder structure package development. Default set false. create_publication_proj Boolean; folder structure publication project. Default set false. include_github_gitignore Boolean; strict .gitignore file GitHub created. ... Additional parameters, currently used","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/create_project.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creates a pre-populated project for DfE R — create_project","text":"return values, project contents created","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/create_project.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Creates a pre-populated project for DfE R — create_project","text":"function creates new project custom folder structure. sets R/ folder template function scripts, initializes {testthat} adds tests function scripts, builds core project structure, creates .gitignore file, creates readme, optionally initializes {renv}.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/create_project.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Creates a pre-populated project for DfE R — create_project","text":"","code":"if (FALSE) { # \\dontrun{ # Call the function to create a new project dfeR::create_project( path = \"C:/path/to/your/new/project\", init_renv = TRUE, include_structure_for_pkg = FALSE, create_publication_proj = FALSE, include_github_gitignore = TRUE ) } # }"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/dfeR-package.html","id":null,"dir":"Reference","previous_headings":"","what":"dfeR: Common Department for Education Analysis Tasks — dfeR-package","title":"dfeR: Common Department for Education Analysis Tasks — dfeR-package","text":"Preferred methods common analytical tasks undertaken across Department, including number formatting, project templates curated reference data.","code":""},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/dfeR-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"dfeR: Common Department for Education Analysis Tasks — dfeR-package","text":"Maintainer: Cam Race cameron.race@education.gov.uk Authors: Laura Selby laura.selby@education.gov.uk Adam Robinson contributors: Department Education, England statistics.development@education.gov.uk [copyright holder] Jen Machin jen.machin@education.gov.uk [contributor] Jake Tufts jake.tufts@education.gov.uk [contributor] Rich Bielby richard.bielby@education.gov.uk (ORCID) [contributor] Menna Zayed menna.zayed@education.gov.uk [contributor] Lauren Snaathorst lauren.snaathorst@education.gov.uk [contributor]","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch.html","id":null,"dir":"Reference","previous_headings":"","what":"Fetch Westminster parliamentary constituencies — fetch","title":"Fetch Westminster parliamentary constituencies — fetch","text":"Fetch data frame Westminster Parliamentary Constituencies given year country based dfeR::wd_pcon_lad_la_rgn_ctry file","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fetch Westminster parliamentary constituencies — fetch","text":"","code":"fetch_pcons(year = \"All\", countries = \"All\")"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fetch Westminster parliamentary constituencies — fetch","text":"year year filter locations , default \"\", options 2017, 2019, 2020, 2021, 2022\", 2023, 2024 countries vector desired countries filter locations , default \"\", can vector options \"England\", \"Scotland\", \"Wales\" \"Northern Ireland\"","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fetch Westminster parliamentary constituencies — fetch","text":"data frame unique location names codes","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fetch Westminster parliamentary constituencies — fetch","text":"","code":"# Using head() to show only top 5 rows for examples head(fetch_wards()) #> ward_code ward_name #> 1 E05001621 Bastwell #> 2 E05001518 Ormesby #> 3 E05008942 Burn Valley #> 4 E05001622 Beardwood with Lammack #> 5 E05008943 De Bruce #> 6 E05001519 St Germain's head(fetch_pcons()) #> pcon_code pcon_name #> 1 E14000570 Blackburn #> 2 E14000891 Redcar #> 3 E14000733 Hartlepool #> 4 E14000970 Stockton North #> 5 E14000819 Middlesbrough #> 6 E14000971 Stockton South head(fetch_pcons(2023)) #> pcon_code pcon_name #> 1 E14000570 Blackburn #> 2 E14000891 Redcar #> 3 E14000733 Hartlepool #> 4 E14000970 Stockton North #> 5 E14000819 Middlesbrough #> 6 E14000971 Stockton South head(fetch_pcons(countries = \"Scotland\")) #> pcon_code pcon_name #> 1 S14000045 Midlothian #> 2 S14000041 Kirkcaldy and Cowdenbeath #> 3 S14000028 Falkirk #> 4 S14000036 Glenrothes #> 5 S14000027 Na h-Eileanan an Iar #> 6 S14000038 Inverclyde head(fetch_pcons(year = 2023, countries = c(\"England\", \"Wales\"))) #> pcon_code pcon_name #> 1 E14000570 Blackburn #> 2 E14000891 Redcar #> 3 E14000733 Hartlepool #> 4 E14000970 Stockton North #> 5 E14000819 Middlesbrough #> 6 E14000971 Stockton South fetch_lads(2024, \"Wales\") #> lad_code lad_name #> 1 W06000001 Isle of Anglesey #> 2 W06000002 Gwynedd #> 3 W06000003 Conwy #> 4 W06000011 Swansea #> 5 W06000009 Pembrokeshire #> 6 W06000006 Wrexham #> 7 W06000004 Denbighshire #> 8 W06000005 Flintshire #> 9 W06000008 Ceredigion #> 10 W06000010 Carmarthenshire #> 11 W06000012 Neath Port Talbot #> 12 W06000014 Vale of Glamorgan #> 13 W06000022 Newport #> 14 W06000023 Powys #> 15 W06000020 Torfaen #> 16 W06000016 Rhondda Cynon Taf #> 17 W06000019 Blaenau Gwent #> 18 W06000018 Caerphilly #> 19 W06000021 Monmouthshire #> 20 W06000013 Bridgend #> 21 W06000015 Cardiff #> 22 W06000024 Merthyr Tydfil fetch_las(2022, \"Northern Ireland\") #> new_la_code la_name #> 1 N09000003 Belfast #> 2 N09000004 Causeway Coast and Glens #> 3 N09000002 Armagh City, Banbridge and Craigavon #> 4 N09000005 Derry City and Strabane #> 5 N09000001 Antrim and Newtownabbey #> 6 N09000006 Fermanagh and Omagh #> 7 N09000008 Mid and East Antrim #> 8 N09000010 Newry, Mourne and Down #> 9 N09000009 Mid Ulster #> 10 N09000011 Ards and North Down #> 11 N09000007 Lisburn and Castlereagh # The following have no specific years available and return all values fetch_regions() #> region_code region_name #> 1 E12000001 North East #> 2 E12000002 North West #> 3 E12000003 Yorkshire and The Humber #> 4 E12000004 East Midlands #> 5 E12000005 West Midlands #> 6 E12000006 East of England #> 7 E12000007 London #> 8 E12000008 South East #> 9 E12000009 South West #> 10 E13000001 Inner London #> 11 E13000002 Outer London #> 12 z Outside of England and unknown #> 13 z Outside of the United Kingdom and unknown #> 14 z Outside of England #> 15 z Outside of United Kingdom #> 16 z Unknown fetch_countries() #> country_code country_name #> 1 E92000001 England #> 2 K02000001 United Kingdom #> 3 K03000001 Great Britain #> 4 K04000001 England and Wales #> 5 N92000002 Northern Ireland #> 6 S92000003 Scotland #> 7 W92000004 Wales #> 8 z England, Wales and Northern Ireland #> 9 z Outside of England and unknown #> 10 z Outside of the United Kingdom and unknown"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_countries.html","id":null,"dir":"Reference","previous_headings":"","what":"Fetch countries — fetch_countries","title":"Fetch countries — fetch_countries","text":"Fetch countries","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_countries.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fetch countries — fetch_countries","text":"","code":"fetch_countries()"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_countries.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fetch countries — fetch_countries","text":"data frame unique location names codes","code":""},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_countries.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fetch countries — fetch_countries","text":"","code":"# Using head() to show only top 5 rows for examples head(fetch_wards()) #> ward_code ward_name #> 1 E05001621 Bastwell #> 2 E05001518 Ormesby #> 3 E05008942 Burn Valley #> 4 E05001622 Beardwood with Lammack #> 5 E05008943 De Bruce #> 6 E05001519 St Germain's head(fetch_pcons()) #> pcon_code pcon_name #> 1 E14000570 Blackburn #> 2 E14000891 Redcar #> 3 E14000733 Hartlepool #> 4 E14000970 Stockton North #> 5 E14000819 Middlesbrough #> 6 E14000971 Stockton South head(fetch_pcons(2023)) #> pcon_code pcon_name #> 1 E14000570 Blackburn #> 2 E14000891 Redcar #> 3 E14000733 Hartlepool #> 4 E14000970 Stockton North #> 5 E14000819 Middlesbrough #> 6 E14000971 Stockton South head(fetch_pcons(countries = \"Scotland\")) #> pcon_code pcon_name #> 1 S14000045 Midlothian #> 2 S14000041 Kirkcaldy and Cowdenbeath #> 3 S14000028 Falkirk #> 4 S14000036 Glenrothes #> 5 S14000027 Na h-Eileanan an Iar #> 6 S14000038 Inverclyde head(fetch_pcons(year = 2023, countries = c(\"England\", \"Wales\"))) #> pcon_code pcon_name #> 1 E14000570 Blackburn #> 2 E14000891 Redcar #> 3 E14000733 Hartlepool #> 4 E14000970 Stockton North #> 5 E14000819 Middlesbrough #> 6 E14000971 Stockton South fetch_lads(2024, \"Wales\") #> lad_code lad_name #> 1 W06000001 Isle of Anglesey #> 2 W06000002 Gwynedd #> 3 W06000003 Conwy #> 4 W06000011 Swansea #> 5 W06000009 Pembrokeshire #> 6 W06000006 Wrexham #> 7 W06000004 Denbighshire #> 8 W06000005 Flintshire #> 9 W06000008 Ceredigion #> 10 W06000010 Carmarthenshire #> 11 W06000012 Neath Port Talbot #> 12 W06000014 Vale of Glamorgan #> 13 W06000022 Newport #> 14 W06000023 Powys #> 15 W06000020 Torfaen #> 16 W06000016 Rhondda Cynon Taf #> 17 W06000019 Blaenau Gwent #> 18 W06000018 Caerphilly #> 19 W06000021 Monmouthshire #> 20 W06000013 Bridgend #> 21 W06000015 Cardiff #> 22 W06000024 Merthyr Tydfil fetch_las(2022, \"Northern Ireland\") #> new_la_code la_name #> 1 N09000003 Belfast #> 2 N09000004 Causeway Coast and Glens #> 3 N09000002 Armagh City, Banbridge and Craigavon #> 4 N09000005 Derry City and Strabane #> 5 N09000001 Antrim and Newtownabbey #> 6 N09000006 Fermanagh and Omagh #> 7 N09000008 Mid and East Antrim #> 8 N09000010 Newry, Mourne and Down #> 9 N09000009 Mid Ulster #> 10 N09000011 Ards and North Down #> 11 N09000007 Lisburn and Castlereagh # The following have no specific years available and return all values fetch_regions() #> region_code region_name #> 1 E12000001 North East #> 2 E12000002 North West #> 3 E12000003 Yorkshire and The Humber #> 4 E12000004 East Midlands #> 5 E12000005 West Midlands #> 6 E12000006 East of England #> 7 E12000007 London #> 8 E12000008 South East #> 9 E12000009 South West #> 10 E13000001 Inner London #> 11 E13000002 Outer London #> 12 z Outside of England and unknown #> 13 z Outside of the United Kingdom and unknown #> 14 z Outside of England #> 15 z Outside of United Kingdom #> 16 z Unknown fetch_countries() #> country_code country_name #> 1 E92000001 England #> 2 K02000001 United Kingdom #> 3 K03000001 Great Britain #> 4 K04000001 England and Wales #> 5 N92000002 Northern Ireland #> 6 S92000003 Scotland #> 7 W92000004 Wales #> 8 z England, Wales and Northern Ireland #> 9 z Outside of England and unknown #> 10 z Outside of the United Kingdom and unknown"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_lads.html","id":null,"dir":"Reference","previous_headings":"","what":"Fetch local authority districts — fetch_lads","title":"Fetch local authority districts — fetch_lads","text":"Fetch local authority districts","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_lads.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fetch local authority districts — fetch_lads","text":"","code":"fetch_lads(year = \"All\", countries = \"All\")"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_lads.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fetch local authority districts — fetch_lads","text":"year year filter locations , default \"\", options 2017, 2019, 2020, 2021, 2022\", 2023, 2024 countries vector desired countries filter locations , default \"\", can vector options \"England\", \"Scotland\", \"Wales\" \"Northern Ireland\"","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_lads.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fetch local authority districts — fetch_lads","text":"data frame unique location names codes","code":""},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_lads.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fetch local authority districts — fetch_lads","text":"","code":"# Using head() to show only top 5 rows for examples head(fetch_wards()) #> ward_code ward_name #> 1 E05001621 Bastwell #> 2 E05001518 Ormesby #> 3 E05008942 Burn Valley #> 4 E05001622 Beardwood with Lammack #> 5 E05008943 De Bruce #> 6 E05001519 St Germain's head(fetch_pcons()) #> pcon_code pcon_name #> 1 E14000570 Blackburn #> 2 E14000891 Redcar #> 3 E14000733 Hartlepool #> 4 E14000970 Stockton North #> 5 E14000819 Middlesbrough #> 6 E14000971 Stockton South head(fetch_pcons(2023)) #> pcon_code pcon_name #> 1 E14000570 Blackburn #> 2 E14000891 Redcar #> 3 E14000733 Hartlepool #> 4 E14000970 Stockton North #> 5 E14000819 Middlesbrough #> 6 E14000971 Stockton South head(fetch_pcons(countries = \"Scotland\")) #> pcon_code pcon_name #> 1 S14000045 Midlothian #> 2 S14000041 Kirkcaldy and Cowdenbeath #> 3 S14000028 Falkirk #> 4 S14000036 Glenrothes #> 5 S14000027 Na h-Eileanan an Iar #> 6 S14000038 Inverclyde head(fetch_pcons(year = 2023, countries = c(\"England\", \"Wales\"))) #> pcon_code pcon_name #> 1 E14000570 Blackburn #> 2 E14000891 Redcar #> 3 E14000733 Hartlepool #> 4 E14000970 Stockton North #> 5 E14000819 Middlesbrough #> 6 E14000971 Stockton South fetch_lads(2024, \"Wales\") #> lad_code lad_name #> 1 W06000001 Isle of Anglesey #> 2 W06000002 Gwynedd #> 3 W06000003 Conwy #> 4 W06000011 Swansea #> 5 W06000009 Pembrokeshire #> 6 W06000006 Wrexham #> 7 W06000004 Denbighshire #> 8 W06000005 Flintshire #> 9 W06000008 Ceredigion #> 10 W06000010 Carmarthenshire #> 11 W06000012 Neath Port Talbot #> 12 W06000014 Vale of Glamorgan #> 13 W06000022 Newport #> 14 W06000023 Powys #> 15 W06000020 Torfaen #> 16 W06000016 Rhondda Cynon Taf #> 17 W06000019 Blaenau Gwent #> 18 W06000018 Caerphilly #> 19 W06000021 Monmouthshire #> 20 W06000013 Bridgend #> 21 W06000015 Cardiff #> 22 W06000024 Merthyr Tydfil fetch_las(2022, \"Northern Ireland\") #> new_la_code la_name #> 1 N09000003 Belfast #> 2 N09000004 Causeway Coast and Glens #> 3 N09000002 Armagh City, Banbridge and Craigavon #> 4 N09000005 Derry City and Strabane #> 5 N09000001 Antrim and Newtownabbey #> 6 N09000006 Fermanagh and Omagh #> 7 N09000008 Mid and East Antrim #> 8 N09000010 Newry, Mourne and Down #> 9 N09000009 Mid Ulster #> 10 N09000011 Ards and North Down #> 11 N09000007 Lisburn and Castlereagh # The following have no specific years available and return all values fetch_regions() #> region_code region_name #> 1 E12000001 North East #> 2 E12000002 North West #> 3 E12000003 Yorkshire and The Humber #> 4 E12000004 East Midlands #> 5 E12000005 West Midlands #> 6 E12000006 East of England #> 7 E12000007 London #> 8 E12000008 South East #> 9 E12000009 South West #> 10 E13000001 Inner London #> 11 E13000002 Outer London #> 12 z Outside of England and unknown #> 13 z Outside of the United Kingdom and unknown #> 14 z Outside of England #> 15 z Outside of United Kingdom #> 16 z Unknown fetch_countries() #> country_code country_name #> 1 E92000001 England #> 2 K02000001 United Kingdom #> 3 K03000001 Great Britain #> 4 K04000001 England and Wales #> 5 N92000002 Northern Ireland #> 6 S92000003 Scotland #> 7 W92000004 Wales #> 8 z England, Wales and Northern Ireland #> 9 z Outside of England and unknown #> 10 z Outside of the United Kingdom and unknown"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_las.html","id":null,"dir":"Reference","previous_headings":"","what":"Fetch local authorities — fetch_las","title":"Fetch local authorities — fetch_las","text":"Fetch local authorities","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_las.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fetch local authorities — fetch_las","text":"","code":"fetch_las(year = \"All\", countries = \"All\")"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_las.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fetch local authorities — fetch_las","text":"year year filter locations , default \"\", options 2017, 2019, 2020, 2021, 2022\", 2023, 2024 countries vector desired countries filter locations , default \"\", can vector options \"England\", \"Scotland\", \"Wales\" \"Northern Ireland\"","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_las.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fetch local authorities — fetch_las","text":"data frame unique location names codes","code":""},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_las.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fetch local authorities — fetch_las","text":"","code":"# Using head() to show only top 5 rows for examples head(fetch_wards()) #> ward_code ward_name #> 1 E05001621 Bastwell #> 2 E05001518 Ormesby #> 3 E05008942 Burn Valley #> 4 E05001622 Beardwood with Lammack #> 5 E05008943 De Bruce #> 6 E05001519 St Germain's head(fetch_pcons()) #> pcon_code pcon_name #> 1 E14000570 Blackburn #> 2 E14000891 Redcar #> 3 E14000733 Hartlepool #> 4 E14000970 Stockton North #> 5 E14000819 Middlesbrough #> 6 E14000971 Stockton South head(fetch_pcons(2023)) #> pcon_code pcon_name #> 1 E14000570 Blackburn #> 2 E14000891 Redcar #> 3 E14000733 Hartlepool #> 4 E14000970 Stockton North #> 5 E14000819 Middlesbrough #> 6 E14000971 Stockton South head(fetch_pcons(countries = \"Scotland\")) #> pcon_code pcon_name #> 1 S14000045 Midlothian #> 2 S14000041 Kirkcaldy and Cowdenbeath #> 3 S14000028 Falkirk #> 4 S14000036 Glenrothes #> 5 S14000027 Na h-Eileanan an Iar #> 6 S14000038 Inverclyde head(fetch_pcons(year = 2023, countries = c(\"England\", \"Wales\"))) #> pcon_code pcon_name #> 1 E14000570 Blackburn #> 2 E14000891 Redcar #> 3 E14000733 Hartlepool #> 4 E14000970 Stockton North #> 5 E14000819 Middlesbrough #> 6 E14000971 Stockton South fetch_lads(2024, \"Wales\") #> lad_code lad_name #> 1 W06000001 Isle of Anglesey #> 2 W06000002 Gwynedd #> 3 W06000003 Conwy #> 4 W06000011 Swansea #> 5 W06000009 Pembrokeshire #> 6 W06000006 Wrexham #> 7 W06000004 Denbighshire #> 8 W06000005 Flintshire #> 9 W06000008 Ceredigion #> 10 W06000010 Carmarthenshire #> 11 W06000012 Neath Port Talbot #> 12 W06000014 Vale of Glamorgan #> 13 W06000022 Newport #> 14 W06000023 Powys #> 15 W06000020 Torfaen #> 16 W06000016 Rhondda Cynon Taf #> 17 W06000019 Blaenau Gwent #> 18 W06000018 Caerphilly #> 19 W06000021 Monmouthshire #> 20 W06000013 Bridgend #> 21 W06000015 Cardiff #> 22 W06000024 Merthyr Tydfil fetch_las(2022, \"Northern Ireland\") #> new_la_code la_name #> 1 N09000003 Belfast #> 2 N09000004 Causeway Coast and Glens #> 3 N09000002 Armagh City, Banbridge and Craigavon #> 4 N09000005 Derry City and Strabane #> 5 N09000001 Antrim and Newtownabbey #> 6 N09000006 Fermanagh and Omagh #> 7 N09000008 Mid and East Antrim #> 8 N09000010 Newry, Mourne and Down #> 9 N09000009 Mid Ulster #> 10 N09000011 Ards and North Down #> 11 N09000007 Lisburn and Castlereagh # The following have no specific years available and return all values fetch_regions() #> region_code region_name #> 1 E12000001 North East #> 2 E12000002 North West #> 3 E12000003 Yorkshire and The Humber #> 4 E12000004 East Midlands #> 5 E12000005 West Midlands #> 6 E12000006 East of England #> 7 E12000007 London #> 8 E12000008 South East #> 9 E12000009 South West #> 10 E13000001 Inner London #> 11 E13000002 Outer London #> 12 z Outside of England and unknown #> 13 z Outside of the United Kingdom and unknown #> 14 z Outside of England #> 15 z Outside of United Kingdom #> 16 z Unknown fetch_countries() #> country_code country_name #> 1 E92000001 England #> 2 K02000001 United Kingdom #> 3 K03000001 Great Britain #> 4 K04000001 England and Wales #> 5 N92000002 Northern Ireland #> 6 S92000003 Scotland #> 7 W92000004 Wales #> 8 z England, Wales and Northern Ireland #> 9 z Outside of England and unknown #> 10 z Outside of the United Kingdom and unknown"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_regions.html","id":null,"dir":"Reference","previous_headings":"","what":"Fetch regions — fetch_regions","title":"Fetch regions — fetch_regions","text":"Fetch regions","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_regions.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fetch regions — fetch_regions","text":"","code":"fetch_regions()"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_regions.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fetch regions — fetch_regions","text":"data frame unique location names codes","code":""},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_regions.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fetch regions — fetch_regions","text":"","code":"# Using head() to show only top 5 rows for examples head(fetch_wards()) #> ward_code ward_name #> 1 E05001621 Bastwell #> 2 E05001518 Ormesby #> 3 E05008942 Burn Valley #> 4 E05001622 Beardwood with Lammack #> 5 E05008943 De Bruce #> 6 E05001519 St Germain's head(fetch_pcons()) #> pcon_code pcon_name #> 1 E14000570 Blackburn #> 2 E14000891 Redcar #> 3 E14000733 Hartlepool #> 4 E14000970 Stockton North #> 5 E14000819 Middlesbrough #> 6 E14000971 Stockton South head(fetch_pcons(2023)) #> pcon_code pcon_name #> 1 E14000570 Blackburn #> 2 E14000891 Redcar #> 3 E14000733 Hartlepool #> 4 E14000970 Stockton North #> 5 E14000819 Middlesbrough #> 6 E14000971 Stockton South head(fetch_pcons(countries = \"Scotland\")) #> pcon_code pcon_name #> 1 S14000045 Midlothian #> 2 S14000041 Kirkcaldy and Cowdenbeath #> 3 S14000028 Falkirk #> 4 S14000036 Glenrothes #> 5 S14000027 Na h-Eileanan an Iar #> 6 S14000038 Inverclyde head(fetch_pcons(year = 2023, countries = c(\"England\", \"Wales\"))) #> pcon_code pcon_name #> 1 E14000570 Blackburn #> 2 E14000891 Redcar #> 3 E14000733 Hartlepool #> 4 E14000970 Stockton North #> 5 E14000819 Middlesbrough #> 6 E14000971 Stockton South fetch_lads(2024, \"Wales\") #> lad_code lad_name #> 1 W06000001 Isle of Anglesey #> 2 W06000002 Gwynedd #> 3 W06000003 Conwy #> 4 W06000011 Swansea #> 5 W06000009 Pembrokeshire #> 6 W06000006 Wrexham #> 7 W06000004 Denbighshire #> 8 W06000005 Flintshire #> 9 W06000008 Ceredigion #> 10 W06000010 Carmarthenshire #> 11 W06000012 Neath Port Talbot #> 12 W06000014 Vale of Glamorgan #> 13 W06000022 Newport #> 14 W06000023 Powys #> 15 W06000020 Torfaen #> 16 W06000016 Rhondda Cynon Taf #> 17 W06000019 Blaenau Gwent #> 18 W06000018 Caerphilly #> 19 W06000021 Monmouthshire #> 20 W06000013 Bridgend #> 21 W06000015 Cardiff #> 22 W06000024 Merthyr Tydfil fetch_las(2022, \"Northern Ireland\") #> new_la_code la_name #> 1 N09000003 Belfast #> 2 N09000004 Causeway Coast and Glens #> 3 N09000002 Armagh City, Banbridge and Craigavon #> 4 N09000005 Derry City and Strabane #> 5 N09000001 Antrim and Newtownabbey #> 6 N09000006 Fermanagh and Omagh #> 7 N09000008 Mid and East Antrim #> 8 N09000010 Newry, Mourne and Down #> 9 N09000009 Mid Ulster #> 10 N09000011 Ards and North Down #> 11 N09000007 Lisburn and Castlereagh # The following have no specific years available and return all values fetch_regions() #> region_code region_name #> 1 E12000001 North East #> 2 E12000002 North West #> 3 E12000003 Yorkshire and The Humber #> 4 E12000004 East Midlands #> 5 E12000005 West Midlands #> 6 E12000006 East of England #> 7 E12000007 London #> 8 E12000008 South East #> 9 E12000009 South West #> 10 E13000001 Inner London #> 11 E13000002 Outer London #> 12 z Outside of England and unknown #> 13 z Outside of the United Kingdom and unknown #> 14 z Outside of England #> 15 z Outside of United Kingdom #> 16 z Unknown fetch_countries() #> country_code country_name #> 1 E92000001 England #> 2 K02000001 United Kingdom #> 3 K03000001 Great Britain #> 4 K04000001 England and Wales #> 5 N92000002 Northern Ireland #> 6 S92000003 Scotland #> 7 W92000004 Wales #> 8 z England, Wales and Northern Ireland #> 9 z Outside of England and unknown #> 10 z Outside of the United Kingdom and unknown"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_wards.html","id":null,"dir":"Reference","previous_headings":"","what":"Fetch wards — fetch_wards","title":"Fetch wards — fetch_wards","text":"Fetch wards","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_wards.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fetch wards — fetch_wards","text":"","code":"fetch_wards(year = \"All\", countries = \"All\")"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_wards.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fetch wards — fetch_wards","text":"year year filter locations , default \"\", options 2017, 2019, 2020, 2021, 2022\", 2023, 2024 countries vector desired countries filter locations , default \"\", can vector options \"England\", \"Scotland\", \"Wales\" \"Northern Ireland\"","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_wards.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fetch wards — fetch_wards","text":"data frame unique location names codes","code":""},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/fetch_wards.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fetch wards — fetch_wards","text":"","code":"# Using head() to show only top 5 rows for examples head(fetch_wards()) #> ward_code ward_name #> 1 E05001621 Bastwell #> 2 E05001518 Ormesby #> 3 E05008942 Burn Valley #> 4 E05001622 Beardwood with Lammack #> 5 E05008943 De Bruce #> 6 E05001519 St Germain's head(fetch_pcons()) #> pcon_code pcon_name #> 1 E14000570 Blackburn #> 2 E14000891 Redcar #> 3 E14000733 Hartlepool #> 4 E14000970 Stockton North #> 5 E14000819 Middlesbrough #> 6 E14000971 Stockton South head(fetch_pcons(2023)) #> pcon_code pcon_name #> 1 E14000570 Blackburn #> 2 E14000891 Redcar #> 3 E14000733 Hartlepool #> 4 E14000970 Stockton North #> 5 E14000819 Middlesbrough #> 6 E14000971 Stockton South head(fetch_pcons(countries = \"Scotland\")) #> pcon_code pcon_name #> 1 S14000045 Midlothian #> 2 S14000041 Kirkcaldy and Cowdenbeath #> 3 S14000028 Falkirk #> 4 S14000036 Glenrothes #> 5 S14000027 Na h-Eileanan an Iar #> 6 S14000038 Inverclyde head(fetch_pcons(year = 2023, countries = c(\"England\", \"Wales\"))) #> pcon_code pcon_name #> 1 E14000570 Blackburn #> 2 E14000891 Redcar #> 3 E14000733 Hartlepool #> 4 E14000970 Stockton North #> 5 E14000819 Middlesbrough #> 6 E14000971 Stockton South fetch_lads(2024, \"Wales\") #> lad_code lad_name #> 1 W06000001 Isle of Anglesey #> 2 W06000002 Gwynedd #> 3 W06000003 Conwy #> 4 W06000011 Swansea #> 5 W06000009 Pembrokeshire #> 6 W06000006 Wrexham #> 7 W06000004 Denbighshire #> 8 W06000005 Flintshire #> 9 W06000008 Ceredigion #> 10 W06000010 Carmarthenshire #> 11 W06000012 Neath Port Talbot #> 12 W06000014 Vale of Glamorgan #> 13 W06000022 Newport #> 14 W06000023 Powys #> 15 W06000020 Torfaen #> 16 W06000016 Rhondda Cynon Taf #> 17 W06000019 Blaenau Gwent #> 18 W06000018 Caerphilly #> 19 W06000021 Monmouthshire #> 20 W06000013 Bridgend #> 21 W06000015 Cardiff #> 22 W06000024 Merthyr Tydfil fetch_las(2022, \"Northern Ireland\") #> new_la_code la_name #> 1 N09000003 Belfast #> 2 N09000004 Causeway Coast and Glens #> 3 N09000002 Armagh City, Banbridge and Craigavon #> 4 N09000005 Derry City and Strabane #> 5 N09000001 Antrim and Newtownabbey #> 6 N09000006 Fermanagh and Omagh #> 7 N09000008 Mid and East Antrim #> 8 N09000010 Newry, Mourne and Down #> 9 N09000009 Mid Ulster #> 10 N09000011 Ards and North Down #> 11 N09000007 Lisburn and Castlereagh # The following have no specific years available and return all values fetch_regions() #> region_code region_name #> 1 E12000001 North East #> 2 E12000002 North West #> 3 E12000003 Yorkshire and The Humber #> 4 E12000004 East Midlands #> 5 E12000005 West Midlands #> 6 E12000006 East of England #> 7 E12000007 London #> 8 E12000008 South East #> 9 E12000009 South West #> 10 E13000001 Inner London #> 11 E13000002 Outer London #> 12 z Outside of England and unknown #> 13 z Outside of the United Kingdom and unknown #> 14 z Outside of England #> 15 z Outside of United Kingdom #> 16 z Unknown fetch_countries() #> country_code country_name #> 1 E92000001 England #> 2 K02000001 United Kingdom #> 3 K03000001 Great Britain #> 4 K04000001 England and Wales #> 5 N92000002 Northern Ireland #> 6 S92000003 Scotland #> 7 W92000004 Wales #> 8 z England, Wales and Northern Ireland #> 9 z Outside of England and unknown #> 10 z Outside of the United Kingdom and unknown"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_ay.html","id":null,"dir":"Reference","previous_headings":"","what":"Format academic year — format_ay","title":"Format academic year — format_ay","text":"function formats academic year variables reporting purposes. convert academic year input 201516 format 2015/16 format.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_ay.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Format academic year — format_ay","text":"","code":"format_ay(year)"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_ay.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Format academic year — format_ay","text":"year Academic year","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_ay.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Format academic year — format_ay","text":"Character vector formatted academic year","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_ay.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Format academic year — format_ay","text":"accepts numerical character arguments.","code":""},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_ay.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Format academic year — format_ay","text":"","code":"format_ay(201617) #> [1] \"2016/17\" format_ay(\"201617\") #> [1] \"2016/17\""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_ay_reverse.html","id":null,"dir":"Reference","previous_headings":"","what":"Undo academic year formatting — format_ay_reverse","title":"Undo academic year formatting — format_ay_reverse","text":"function converts academic year variables back 201617 format.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_ay_reverse.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Undo academic year formatting — format_ay_reverse","text":"","code":"format_ay_reverse(year)"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_ay_reverse.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Undo academic year formatting — format_ay_reverse","text":"year Academic year","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_ay_reverse.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Undo academic year formatting — format_ay_reverse","text":"Unformatted 6 digit year string","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_ay_reverse.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Undo academic year formatting — format_ay_reverse","text":"accepts character arguments.","code":""},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_ay_reverse.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Undo academic year formatting — format_ay_reverse","text":"","code":"format_ay_reverse(\"2016/17\") #> [1] \"201617\""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_fy.html","id":null,"dir":"Reference","previous_headings":"","what":"Format financial year — format_fy","title":"Format financial year — format_fy","text":"function formats financial year variables reporting purposes. convert year input 201516 format 2015-16 format.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_fy.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Format financial year — format_fy","text":"","code":"format_fy(year)"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_fy.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Format financial year — format_fy","text":"year Financial year","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_fy.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Format financial year — format_fy","text":"Character vector formatted financial year","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_fy.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Format financial year — format_fy","text":"accepts numerical character arguments.","code":""},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_fy.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Format financial year — format_fy","text":"","code":"format_fy(201617) #> [1] \"2016-17\" format_fy(\"201617\") #> [1] \"2016-17\""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_fy_reverse.html","id":null,"dir":"Reference","previous_headings":"","what":"Undo financial year formatting — format_fy_reverse","title":"Undo financial year formatting — format_fy_reverse","text":"function converts financial year variables back 201617 format.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_fy_reverse.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Undo financial year formatting — format_fy_reverse","text":"","code":"format_fy_reverse(year)"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_fy_reverse.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Undo financial year formatting — format_fy_reverse","text":"year Financial year","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_fy_reverse.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Undo financial year formatting — format_fy_reverse","text":"Unformatted 6 digit year string","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_fy_reverse.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Undo financial year formatting — format_fy_reverse","text":"accepts character arguments.","code":""},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/format_fy_reverse.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Undo financial year formatting — format_fy_reverse","text":"","code":"format_fy_reverse(\"2016-17\") #> [1] \"201617\""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/geog_time_identifiers.html","id":null,"dir":"Reference","previous_headings":"","what":"Potential names for geography and time columns — geog_time_identifiers","title":"Potential names for geography and time columns — geog_time_identifiers","text":"Potential names geography time columns line ones used explore education statistics data screener.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/geog_time_identifiers.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Potential names for geography and time columns — geog_time_identifiers","text":"","code":"geog_time_identifiers"},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/geog_time_identifiers.html","id":"geog-time-identifiers","dir":"Reference","previous_headings":"","what":"geog_time_identifiers","title":"Potential names for geography and time columns — geog_time_identifiers","text":"character vector 38 potential column names snake case format.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/geog_time_identifiers.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Potential names for geography and time columns — geog_time_identifiers","text":"curated explore.statistics@education.gov.uk. Guidance time geography data.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/get_clean_sql.html","id":null,"dir":"Reference","previous_headings":"","what":"Get a cleaned SQL script into R — get_clean_sql","title":"Get a cleaned SQL script into R — get_clean_sql","text":"function cleans SQL script, ready using within R DfE.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/get_clean_sql.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get a cleaned SQL script into R — get_clean_sql","text":"","code":"get_clean_sql(filepath, additional_settings = FALSE)"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/get_clean_sql.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get a cleaned SQL script into R — get_clean_sql","text":"filepath path SQL script additional_settings TRUE FALSE boolean addition settings start SQL script","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/get_clean_sql.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get a cleaned SQL script into R — get_clean_sql","text":"Cleaned string containing SQL query","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/get_clean_sql.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get a cleaned SQL script into R — get_clean_sql","text":"","code":"# This assumes you have already set up a database connection # and that the filepath for the function exists # For more details see the vignette on connecting to SQL # Pull a cleaned version of the SQL file into R if (file.exists(\"your_script.sql\")) { sql_query <- get_clean_sql(\"your_script.sql\") }"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/get_ons_api_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Fetch ONS Open Geography API data — get_ons_api_data","title":"Fetch ONS Open Geography API data — get_ons_api_data","text":"Helper function takes data set id parameters query parse data ONS Open Geography API. Technically uses POST request rather GET request.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/get_ons_api_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fetch ONS Open Geography API data — get_ons_api_data","text":"","code":"get_ons_api_data( data_id, query_params = list(where = \"1=1\", outFields = \"*\", outSR = \"4326\", f = \"json\"), batch_size = 200, verbose = TRUE )"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/get_ons_api_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fetch ONS Open Geography API data — get_ons_api_data","text":"data_id id data set query, can found Open Geography Portal query_params query parameters pass API, see ESRI documentation information query parameters - ESRI Query (Feature Service/Layer) batch_size number rows per query. 250 default, hit errors try lowering . API limit 1000 2000 rows per query, truth, actual limit method lower every ObjectId queried pasted query URL every row included batch, especial Id's go 1,000s 10,000s increase size URL risk hitting limit. verbose TRUE FALSE boolean. TRUE default. FALSE turn messages console update function ","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/get_ons_api_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fetch ONS Open Geography API data — get_ons_api_data","text":"parsed data.frame geographic names codes","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/get_ons_api_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Fetch ONS Open Geography API data — get_ons_api_data","text":"pre-query understand ObjectIds query want, query retrieve Ids directly batches stacking whole thing back together work around row limits single query. Open Geography Portal, find data set interested use query explorer find information query. function mostly developed ease use dfeR maintainers interested getting data Open Geography Portal widely also look boundr package.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/get_ons_api_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fetch ONS Open Geography API data — get_ons_api_data","text":"","code":"# Fetch everything from a data set dfeR::get_ons_api_data(data_id = \"LAD23_RGN23_EN_LU\") #> Checking total number of objects... #> 296 objects found for the query #> Created 2 batches of objects to query #> Querying API to get objects... #> ...fetching batch 1: objects 1 to 200... #> ...success! There are now 200 rows in your table... #> ...fetching batch 2: objects 201 to 296... #> ...success! There are now 296 rows in your table... #> ...data frame batched, stacked and delivered! #> attributes.LAD23CD attributes.LAD23NM attributes.RGN23CD #> 1 E06000001 Hartlepool E12000001 #> 2 E06000002 Middlesbrough E12000001 #> 3 E06000003 Redcar and Cleveland E12000001 #> 4 E06000004 Stockton-on-Tees E12000001 #> 5 E06000005 Darlington E12000001 #> 6 E06000006 Halton E12000002 #> 7 E06000007 Warrington E12000002 #> 8 E06000008 Blackburn with Darwen E12000002 #> 9 E06000009 Blackpool E12000002 #> 10 E06000010 Kingston upon Hull, City of E12000003 #> 11 E06000011 East Riding of Yorkshire E12000003 #> 12 E06000012 North East Lincolnshire E12000003 #> 13 E06000013 North Lincolnshire E12000003 #> 14 E06000014 York E12000003 #> 15 E06000015 Derby E12000004 #> 16 E06000016 Leicester E12000004 #> 17 E06000017 Rutland E12000004 #> 18 E06000018 Nottingham E12000004 #> 19 E06000019 Herefordshire, County of E12000005 #> 20 E06000020 Telford and Wrekin E12000005 #> 21 E06000021 Stoke-on-Trent E12000005 #> 22 E06000022 Bath and North East Somerset E12000009 #> 23 E06000023 Bristol, City of E12000009 #> 24 E06000024 North Somerset E12000009 #> 25 E06000025 South Gloucestershire E12000009 #> 26 E06000026 Plymouth E12000009 #> 27 E06000027 Torbay E12000009 #> 28 E06000030 Swindon E12000009 #> 29 E06000031 Peterborough E12000006 #> 30 E06000032 Luton E12000006 #> 31 E06000033 Southend-on-Sea E12000006 #> 32 E06000034 Thurrock E12000006 #> 33 E06000035 Medway E12000008 #> 34 E06000036 Bracknell Forest E12000008 #> 35 E06000037 West Berkshire E12000008 #> 36 E06000038 Reading E12000008 #> 37 E06000039 Slough E12000008 #> 38 E06000040 Windsor and Maidenhead E12000008 #> 39 E06000041 Wokingham E12000008 #> 40 E06000042 Milton Keynes E12000008 #> 41 E06000043 Brighton and Hove E12000008 #> 42 E06000044 Portsmouth E12000008 #> 43 E06000045 Southampton E12000008 #> 44 E06000046 Isle of Wight E12000008 #> 45 E06000047 County Durham E12000001 #> 46 E06000049 Cheshire East E12000002 #> 47 E06000050 Cheshire West and Chester E12000002 #> 48 E06000051 Shropshire E12000005 #> 49 E06000052 Cornwall E12000009 #> 50 E06000053 Isles of Scilly E12000009 #> 51 E06000054 Wiltshire E12000009 #> 52 E06000055 Bedford E12000006 #> 53 E06000056 Central Bedfordshire E12000006 #> 54 E06000057 Northumberland E12000001 #> 55 E06000058 Bournemouth, Christchurch and Poole E12000009 #> 56 E06000059 Dorset E12000009 #> 57 E06000060 Buckinghamshire E12000008 #> 58 E06000061 North Northamptonshire E12000004 #> 59 E06000062 West Northamptonshire E12000004 #> 60 E06000063 Cumberland E12000002 #> 61 E07000181 West Oxfordshire E12000008 #> 62 E07000192 Cannock Chase E12000005 #> 63 E07000193 East Staffordshire E12000005 #> 64 E07000194 Lichfield E12000005 #> 65 E07000195 Newcastle-under-Lyme E12000005 #> 66 E07000196 South Staffordshire E12000005 #> 67 E07000197 Stafford E12000005 #> 68 E07000198 Staffordshire Moorlands E12000005 #> 69 E07000199 Tamworth E12000005 #> 70 E07000200 Babergh E12000006 #> 71 E07000202 Ipswich E12000006 #> 72 E07000203 Mid Suffolk E12000006 #> 73 E07000207 Elmbridge E12000008 #> 74 E07000208 Epsom and Ewell E12000008 #> 75 E07000209 Guildford E12000008 #> 76 E07000210 Mole Valley E12000008 #> 77 E07000211 Reigate and Banstead E12000008 #> 78 E07000212 Runnymede E12000008 #> 79 E07000213 Spelthorne E12000008 #> 80 E07000214 Surrey Heath E12000008 #> 81 E07000215 Tandridge E12000008 #> 82 E07000216 Waverley E12000008 #> 83 E07000217 Woking E12000008 #> 84 E07000218 North Warwickshire E12000005 #> 85 E07000219 Nuneaton and Bedworth E12000005 #> 86 E07000220 Rugby E12000005 #> 87 E07000221 Stratford-on-Avon E12000005 #> 88 E07000222 Warwick E12000005 #> 89 E07000223 Adur E12000008 #> 90 E07000224 Arun E12000008 #> 91 E07000225 Chichester E12000008 #> 92 E07000226 Crawley E12000008 #> 93 E07000227 Horsham E12000008 #> 94 E07000228 Mid Sussex E12000008 #> 95 E07000229 Worthing E12000008 #> 96 E07000234 Bromsgrove E12000005 #> 97 E07000235 Malvern Hills E12000005 #> 98 E07000236 Redditch E12000005 #> 99 E07000237 Worcester E12000005 #> 100 E07000238 Wychavon E12000005 #> 101 E07000239 Wyre Forest E12000005 #> 102 E07000240 St Albans E12000006 #> 103 E07000241 Welwyn Hatfield E12000006 #> 104 E07000242 East Hertfordshire E12000006 #> 105 E07000243 Stevenage E12000006 #> 106 E07000244 East Suffolk E12000006 #> 107 E07000245 West Suffolk E12000006 #> 108 E08000001 Bolton E12000002 #> 109 E08000002 Bury E12000002 #> 110 E08000003 Manchester E12000002 #> 111 E08000004 Oldham E12000002 #> 112 E08000005 Rochdale E12000002 #> 113 E08000006 Salford E12000002 #> 114 E08000007 Stockport E12000002 #> 115 E08000008 Tameside E12000002 #> 116 E08000009 Trafford E12000002 #> 117 E08000010 Wigan E12000002 #> 118 E08000011 Knowsley E12000002 #> 119 E08000012 Liverpool E12000002 #> 120 E08000013 St. Helens E12000002 #> 121 E07000098 Hertsmere E12000006 #> 122 E07000099 North Hertfordshire E12000006 #> 123 E07000102 Three Rivers E12000006 #> 124 E07000103 Watford E12000006 #> 125 E07000105 Ashford E12000008 #> 126 E07000106 Canterbury E12000008 #> 127 E07000107 Dartford E12000008 #> 128 E07000108 Dover E12000008 #> 129 E07000109 Gravesham E12000008 #> 130 E07000110 Maidstone E12000008 #> 131 E07000111 Sevenoaks E12000008 #> 132 E07000112 Folkestone and Hythe E12000008 #> 133 E07000113 Swale E12000008 #> 134 E07000114 Thanet E12000008 #> 135 E07000115 Tonbridge and Malling E12000008 #> 136 E07000116 Tunbridge Wells E12000008 #> 137 E07000117 Burnley E12000002 #> 138 E07000118 Chorley E12000002 #> 139 E07000119 Fylde E12000002 #> 140 E07000120 Hyndburn E12000002 #> 141 E07000121 Lancaster E12000002 #> 142 E07000122 Pendle E12000002 #> 143 E07000123 Preston E12000002 #> 144 E07000124 Ribble Valley E12000002 #> 145 E07000125 Rossendale E12000002 #> 146 E07000126 South Ribble E12000002 #> 147 E07000127 West Lancashire E12000002 #> 148 E07000128 Wyre E12000002 #> 149 E07000129 Blaby E12000004 #> 150 E07000130 Charnwood E12000004 #> 151 E07000131 Harborough E12000004 #> 152 E07000132 Hinckley and Bosworth E12000004 #> 153 E07000133 Melton E12000004 #> 154 E07000134 North West Leicestershire E12000004 #> 155 E07000135 Oadby and Wigston E12000004 #> 156 E07000136 Boston E12000004 #> 157 E07000137 East Lindsey E12000004 #> 158 E07000138 Lincoln E12000004 #> 159 E07000139 North Kesteven E12000004 #> 160 E07000140 South Holland E12000004 #> 161 E07000141 South Kesteven E12000004 #> 162 E07000142 West Lindsey E12000004 #> 163 E07000143 Breckland E12000006 #> 164 E07000144 Broadland E12000006 #> 165 E07000145 Great Yarmouth E12000006 #> 166 E07000146 King's Lynn and West Norfolk E12000006 #> 167 E07000147 North Norfolk E12000006 #> 168 E07000148 Norwich E12000006 #> 169 E07000149 South Norfolk E12000006 #> 170 E07000170 Ashfield E12000004 #> 171 E07000171 Bassetlaw E12000004 #> 172 E07000172 Broxtowe E12000004 #> 173 E07000173 Gedling E12000004 #> 174 E07000174 Mansfield E12000004 #> 175 E07000175 Newark and Sherwood E12000004 #> 176 E07000176 Rushcliffe E12000004 #> 177 E07000177 Cherwell E12000008 #> 178 E07000178 Oxford E12000008 #> 179 E07000179 South Oxfordshire E12000008 #> 180 E07000180 Vale of White Horse E12000008 #> 181 E08000014 Sefton E12000002 #> 182 E08000015 Wirral E12000002 #> 183 E08000016 Barnsley E12000003 #> 184 E08000017 Doncaster E12000003 #> 185 E08000018 Rotherham E12000003 #> 186 E08000019 Sheffield E12000003 #> 187 E08000021 Newcastle upon Tyne E12000001 #> 188 E08000022 North Tyneside E12000001 #> 189 E08000023 South Tyneside E12000001 #> 190 E08000024 Sunderland E12000001 #> 191 E08000025 Birmingham E12000005 #> 192 E08000026 Coventry E12000005 #> 193 E08000027 Dudley E12000005 #> 194 E08000028 Sandwell E12000005 #> 195 E08000029 Solihull E12000005 #> 196 E08000030 Walsall E12000005 #> 197 E08000031 Wolverhampton E12000005 #> 198 E08000032 Bradford E12000003 #> 199 E08000033 Calderdale E12000003 #> 200 E08000034 Kirklees E12000003 #> 201 E06000064 Westmorland and Furness E12000002 #> 202 E08000035 Leeds E12000003 #> 203 E08000036 Wakefield E12000003 #> 204 E08000037 Gateshead E12000001 #> 205 E09000001 City of London E12000007 #> 206 E09000002 Barking and Dagenham E12000007 #> 207 E09000003 Barnet E12000007 #> 208 E09000004 Bexley E12000007 #> 209 E09000005 Brent E12000007 #> 210 E09000006 Bromley E12000007 #> 211 E09000007 Camden E12000007 #> 212 E09000008 Croydon E12000007 #> 213 E09000009 Ealing E12000007 #> 214 E09000010 Enfield E12000007 #> 215 E09000011 Greenwich E12000007 #> 216 E09000012 Hackney E12000007 #> 217 E09000013 Hammersmith and Fulham E12000007 #> 218 E09000014 Haringey E12000007 #> 219 E09000015 Harrow E12000007 #> 220 E09000016 Havering E12000007 #> 221 E09000017 Hillingdon E12000007 #> 222 E09000018 Hounslow E12000007 #> 223 E09000019 Islington E12000007 #> 224 E09000020 Kensington and Chelsea E12000007 #> 225 E09000021 Kingston upon Thames E12000007 #> 226 E09000022 Lambeth E12000007 #> 227 E09000023 Lewisham E12000007 #> 228 E09000024 Merton E12000007 #> 229 E09000025 Newham E12000007 #> 230 E09000026 Redbridge E12000007 #> 231 E09000027 Richmond upon Thames E12000007 #> 232 E09000028 Southwark E12000007 #> 233 E09000029 Sutton E12000007 #> 234 E09000030 Tower Hamlets E12000007 #> 235 E09000031 Waltham Forest E12000007 #> 236 E09000032 Wandsworth E12000007 #> 237 E09000033 Westminster E12000007 #> 238 E06000065 North Yorkshire E12000003 #> 239 E06000066 Somerset E12000009 #> 240 E07000008 Cambridge E12000006 #> 241 E07000009 East Cambridgeshire E12000006 #> 242 E07000010 Fenland E12000006 #> 243 E07000011 Huntingdonshire E12000006 #> 244 E07000012 South Cambridgeshire E12000006 #> 245 E07000032 Amber Valley E12000004 #> 246 E07000033 Bolsover E12000004 #> 247 E07000034 Chesterfield E12000004 #> 248 E07000035 Derbyshire Dales E12000004 #> 249 E07000036 Erewash E12000004 #> 250 E07000037 High Peak E12000004 #> 251 E07000038 North East Derbyshire E12000004 #> 252 E07000039 South Derbyshire E12000004 #> 253 E07000040 East Devon E12000009 #> 254 E07000041 Exeter E12000009 #> 255 E07000042 Mid Devon E12000009 #> 256 E07000043 North Devon E12000009 #> 257 E07000044 South Hams E12000009 #> 258 E07000045 Teignbridge E12000009 #> 259 E07000046 Torridge E12000009 #> 260 E07000047 West Devon E12000009 #> 261 E07000061 Eastbourne E12000008 #> 262 E07000062 Hastings E12000008 #> 263 E07000063 Lewes E12000008 #> 264 E07000064 Rother E12000008 #> 265 E07000065 Wealden E12000008 #> 266 E07000066 Basildon E12000006 #> 267 E07000067 Braintree E12000006 #> 268 E07000068 Brentwood E12000006 #> 269 E07000069 Castle Point E12000006 #> 270 E07000070 Chelmsford E12000006 #> 271 E07000071 Colchester E12000006 #> 272 E07000072 Epping Forest E12000006 #> 273 E07000073 Harlow E12000006 #> 274 E07000074 Maldon E12000006 #> 275 E07000075 Rochford E12000006 #> 276 E07000076 Tendring E12000006 #> 277 E07000077 Uttlesford E12000006 #> 278 E07000078 Cheltenham E12000009 #> 279 E07000079 Cotswold E12000009 #> 280 E07000080 Forest of Dean E12000009 #> 281 E07000081 Gloucester E12000009 #> 282 E07000082 Stroud E12000009 #> 283 E07000083 Tewkesbury E12000009 #> 284 E07000084 Basingstoke and Deane E12000008 #> 285 E07000085 East Hampshire E12000008 #> 286 E07000086 Eastleigh E12000008 #> 287 E07000087 Fareham E12000008 #> 288 E07000088 Gosport E12000008 #> 289 E07000089 Hart E12000008 #> 290 E07000090 Havant E12000008 #> 291 E07000091 New Forest E12000008 #> 292 E07000092 Rushmoor E12000008 #> 293 E07000093 Test Valley E12000008 #> 294 E07000094 Winchester E12000008 #> 295 E07000095 Broxbourne E12000006 #> 296 E07000096 Dacorum E12000006 #> attributes.RGN23NM attributes.ObjectId #> 1 North East 1 #> 2 North East 2 #> 3 North East 3 #> 4 North East 4 #> 5 North East 5 #> 6 North West 6 #> 7 North West 7 #> 8 North West 8 #> 9 North West 9 #> 10 Yorkshire and The Humber 10 #> 11 Yorkshire and The Humber 11 #> 12 Yorkshire and The Humber 12 #> 13 Yorkshire and The Humber 13 #> 14 Yorkshire and The Humber 14 #> 15 East Midlands 15 #> 16 East Midlands 16 #> 17 East Midlands 17 #> 18 East Midlands 18 #> 19 West Midlands 19 #> 20 West Midlands 20 #> 21 West Midlands 21 #> 22 South West 22 #> 23 South West 23 #> 24 South West 24 #> 25 South West 25 #> 26 South West 26 #> 27 South West 27 #> 28 South West 28 #> 29 East of England 29 #> 30 East of England 30 #> 31 East of England 31 #> 32 East of England 32 #> 33 South East 33 #> 34 South East 34 #> 35 South East 35 #> 36 South East 36 #> 37 South East 37 #> 38 South East 38 #> 39 South East 39 #> 40 South East 40 #> 41 South East 41 #> 42 South East 42 #> 43 South East 43 #> 44 South East 44 #> 45 North East 45 #> 46 North West 46 #> 47 North West 47 #> 48 West Midlands 48 #> 49 South West 49 #> 50 South West 50 #> 51 South West 51 #> 52 East of England 52 #> 53 East of England 53 #> 54 North East 54 #> 55 South West 55 #> 56 South West 56 #> 57 South East 57 #> 58 East Midlands 58 #> 59 East Midlands 59 #> 60 North West 60 #> 61 South East 61 #> 62 West Midlands 62 #> 63 West Midlands 63 #> 64 West Midlands 64 #> 65 West Midlands 65 #> 66 West Midlands 66 #> 67 West Midlands 67 #> 68 West Midlands 68 #> 69 West Midlands 69 #> 70 East of England 70 #> 71 East of England 71 #> 72 East of England 72 #> 73 South East 73 #> 74 South East 74 #> 75 South East 75 #> 76 South East 76 #> 77 South East 77 #> 78 South East 78 #> 79 South East 79 #> 80 South East 80 #> 81 South East 81 #> 82 South East 82 #> 83 South East 83 #> 84 West Midlands 84 #> 85 West Midlands 85 #> 86 West Midlands 86 #> 87 West Midlands 87 #> 88 West Midlands 88 #> 89 South East 89 #> 90 South East 90 #> 91 South East 91 #> 92 South East 92 #> 93 South East 93 #> 94 South East 94 #> 95 South East 95 #> 96 West Midlands 96 #> 97 West Midlands 97 #> 98 West Midlands 98 #> 99 West Midlands 99 #> 100 West Midlands 100 #> 101 West Midlands 101 #> 102 East of England 102 #> 103 East of England 103 #> 104 East of England 104 #> 105 East of England 105 #> 106 East of England 106 #> 107 East of England 107 #> 108 North West 108 #> 109 North West 109 #> 110 North West 110 #> 111 North West 111 #> 112 North West 112 #> 113 North West 113 #> 114 North West 114 #> 115 North West 115 #> 116 North West 116 #> 117 North West 117 #> 118 North West 118 #> 119 North West 119 #> 120 North West 120 #> 121 East of England 121 #> 122 East of England 122 #> 123 East of England 123 #> 124 East of England 124 #> 125 South East 125 #> 126 South East 126 #> 127 South East 127 #> 128 South East 128 #> 129 South East 129 #> 130 South East 130 #> 131 South East 131 #> 132 South East 132 #> 133 South East 133 #> 134 South East 134 #> 135 South East 135 #> 136 South East 136 #> 137 North West 137 #> 138 North West 138 #> 139 North West 139 #> 140 North West 140 #> 141 North West 141 #> 142 North West 142 #> 143 North West 143 #> 144 North West 144 #> 145 North West 145 #> 146 North West 146 #> 147 North West 147 #> 148 North West 148 #> 149 East Midlands 149 #> 150 East Midlands 150 #> 151 East Midlands 151 #> 152 East Midlands 152 #> 153 East Midlands 153 #> 154 East Midlands 154 #> 155 East Midlands 155 #> 156 East Midlands 156 #> 157 East Midlands 157 #> 158 East Midlands 158 #> 159 East Midlands 159 #> 160 East Midlands 160 #> 161 East Midlands 161 #> 162 East Midlands 162 #> 163 East of England 163 #> 164 East of England 164 #> 165 East of England 165 #> 166 East of England 166 #> 167 East of England 167 #> 168 East of England 168 #> 169 East of England 169 #> 170 East Midlands 170 #> 171 East Midlands 171 #> 172 East Midlands 172 #> 173 East Midlands 173 #> 174 East Midlands 174 #> 175 East Midlands 175 #> 176 East Midlands 176 #> 177 South East 177 #> 178 South East 178 #> 179 South East 179 #> 180 South East 180 #> 181 North West 181 #> 182 North West 182 #> 183 Yorkshire and The Humber 183 #> 184 Yorkshire and The Humber 184 #> 185 Yorkshire and The Humber 185 #> 186 Yorkshire and The Humber 186 #> 187 North East 187 #> 188 North East 188 #> 189 North East 189 #> 190 North East 190 #> 191 West Midlands 191 #> 192 West Midlands 192 #> 193 West Midlands 193 #> 194 West Midlands 194 #> 195 West Midlands 195 #> 196 West Midlands 196 #> 197 West Midlands 197 #> 198 Yorkshire and The Humber 198 #> 199 Yorkshire and The Humber 199 #> 200 Yorkshire and The Humber 200 #> 201 North West 201 #> 202 Yorkshire and The Humber 202 #> 203 Yorkshire and The Humber 203 #> 204 North East 204 #> 205 London 205 #> 206 London 206 #> 207 London 207 #> 208 London 208 #> 209 London 209 #> 210 London 210 #> 211 London 211 #> 212 London 212 #> 213 London 213 #> 214 London 214 #> 215 London 215 #> 216 London 216 #> 217 London 217 #> 218 London 218 #> 219 London 219 #> 220 London 220 #> 221 London 221 #> 222 London 222 #> 223 London 223 #> 224 London 224 #> 225 London 225 #> 226 London 226 #> 227 London 227 #> 228 London 228 #> 229 London 229 #> 230 London 230 #> 231 London 231 #> 232 London 232 #> 233 London 233 #> 234 London 234 #> 235 London 235 #> 236 London 236 #> 237 London 237 #> 238 Yorkshire and The Humber 238 #> 239 South West 239 #> 240 East of England 240 #> 241 East of England 241 #> 242 East of England 242 #> 243 East of England 243 #> 244 East of England 244 #> 245 East Midlands 245 #> 246 East Midlands 246 #> 247 East Midlands 247 #> 248 East Midlands 248 #> 249 East Midlands 249 #> 250 East Midlands 250 #> 251 East Midlands 251 #> 252 East Midlands 252 #> 253 South West 253 #> 254 South West 254 #> 255 South West 255 #> 256 South West 256 #> 257 South West 257 #> 258 South West 258 #> 259 South West 259 #> 260 South West 260 #> 261 South East 261 #> 262 South East 262 #> 263 South East 263 #> 264 South East 264 #> 265 South East 265 #> 266 East of England 266 #> 267 East of England 267 #> 268 East of England 268 #> 269 East of England 269 #> 270 East of England 270 #> 271 East of England 271 #> 272 East of England 272 #> 273 East of England 273 #> 274 East of England 274 #> 275 East of England 275 #> 276 East of England 276 #> 277 East of England 277 #> 278 South West 278 #> 279 South West 279 #> 280 South West 280 #> 281 South West 281 #> 282 South West 282 #> 283 South West 283 #> 284 South East 284 #> 285 South East 285 #> 286 South East 286 #> 287 South East 287 #> 288 South East 288 #> 289 South East 289 #> 290 South East 290 #> 291 South East 291 #> 292 South East 292 #> 293 South East 293 #> 294 South East 294 #> 295 East of England 295 #> 296 East of England 296 # Specify the columns you want dfeR::get_ons_api_data( \"RGN_DEC_2023_EN_NC\", query_params = list( where = \"1=1\", outFields = \"RGN23CD,RGN23NM\", outSR = 4326, f = \"json\" ) ) #> Checking total number of objects... #> 9 objects found for the query #> Created 1 batches of objects to query #> Querying API to get objects... #> ...fetching batch 1: objects 1 to 9... #> ...success! There are now 9 rows in your table... #> ...data frame batched, stacked and delivered! #> attributes.RGN23CD attributes.RGN23NM #> 1 E12000001 North East #> 2 E12000002 North West #> 3 E12000003 Yorkshire and The Humber #> 4 E12000004 East Midlands #> 5 E12000005 West Midlands #> 6 E12000006 East of England #> 7 E12000007 London #> 8 E12000008 South East #> 9 E12000009 South West"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/ons_geog_shorthands.html","id":null,"dir":"Reference","previous_headings":"","what":"Lookup for ONS geography columns shorthands — ons_geog_shorthands","title":"Lookup for ONS geography columns shorthands — ons_geog_shorthands","text":"lookup ONS geography shorthands respective column names line DfE open data standards.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/ons_geog_shorthands.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Lookup for ONS geography columns shorthands — ons_geog_shorthands","text":"","code":"ons_geog_shorthands"},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/ons_geog_shorthands.html","id":"ons-geog-shorthands","dir":"Reference","previous_headings":"","what":"ons_geog_shorthands","title":"Lookup for ONS geography columns shorthands — ons_geog_shorthands","text":"data frame 7 rows 3 columns: ons_level_shorthands ONS shorthands used lookup files name_column DfE names geography name columns code_column DfE names geography code columns","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/ons_geog_shorthands.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Lookup for ONS geography columns shorthands — ons_geog_shorthands","text":"curated explore.statistics@education.gov.uk","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/ons_geog_shorthands.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Lookup for ONS geography columns shorthands — ons_geog_shorthands","text":"GOR (Government Office Region) predecessor RGN.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_filesize.html","id":null,"dir":"Reference","previous_headings":"","what":"Pretty numbers into readable file size — pretty_filesize","title":"Pretty numbers into readable file size — pretty_filesize","text":"Converts raw file size bytes readable format.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_filesize.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Pretty numbers into readable file size — pretty_filesize","text":"","code":"pretty_filesize(filesize)"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_filesize.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Pretty numbers into readable file size — pretty_filesize","text":"filesize file size bytes","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_filesize.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Pretty numbers into readable file size — pretty_filesize","text":"string containing prettified file size","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_filesize.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Pretty numbers into readable file size — pretty_filesize","text":"Designed used conjunction file.size() function base R. Presents kilobytes, megabytes gigabytes. Shows bytes 1 KB, kilobytes 1 MB, megabytes 1GB, show gigabytes anything larger. Rounds end result 2 decimal places. Using base 10 (decimal), 1024 bytes 1,024 KB.","code":""},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_filesize.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Pretty numbers into readable file size — pretty_filesize","text":"","code":"pretty_filesize(2) #> [1] \"2 bytes\" pretty_filesize(549302) #> [1] \"549.3 KB\" pretty_filesize(9872948939) #> [1] \"9.87 GB\" pretty_filesize(1) #> [1] \"1 byte\" pretty_filesize(1000) #> [1] \"1 KB\" pretty_filesize(1000^2) #> [1] \"1 MB\" pretty_filesize(10^9) #> [1] \"1 GB\""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_num.html","id":null,"dir":"Reference","previous_headings":"","what":"Prettify big numbers into a readable format — pretty_num","title":"Prettify big numbers into a readable format — pretty_num","text":"Uses .numeric() force numeric value formats prettily easy presentation console messages, reports, dashboards. rounds 0 decimal places default, adds comma separators. Expect commonly used adding pound symbol, percentage symbol, +/- prefixed based value. applying multiple unpredictable values want preserve non-numeric symbol \"x\" \"c\" data available, use ignore_na = TRUE argument return values unaffected. want customise NA values returned , use alt_na argument. function silences warning around NAs introduced coercion.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_num.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Prettify big numbers into a readable format — pretty_num","text":"","code":"pretty_num( value, prefix = \"\", gbp = FALSE, suffix = \"\", dp = 0, ignore_na = FALSE, alt_na = FALSE, nsmall = NULL )"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_num.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Prettify big numbers into a readable format — pretty_num","text":"value value prettified prefix prefix value, \"+/-\" automatically assign + - based value gbp whether add pound symbol , defaults suffix suffix value, e.g. \"%\" dp number decimal places round , 0 default. ignore_na whether skip function strings converted return original value alt_na alternative value return place NA, e.g. \"x\" nsmall minimum number digits right decimal point. NULL, value dp used. value dp less 0, nsmall automatically set 0.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_num.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Prettify big numbers into a readable format — pretty_num","text":"string featuring prettified value","code":""},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_num.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Prettify big numbers into a readable format — pretty_num","text":"","code":"# On individual values pretty_num(5789, gbp = TRUE) #> [1] \"£5,789\" pretty_num(564, prefix = \"+/-\") #> [1] \"+564\" pretty_num(567812343223, gbp = TRUE, prefix = \"+/-\") #> [1] \"+£568 billion\" pretty_num(11^9, gbp = TRUE, dp = 3) #> [1] \"£2.358 billion\" pretty_num(-11^8, gbp = TRUE, dp = -1) #> [1] \"-£210 million\" pretty_num(43.3, dp = 1, nsmall = 2) #> [1] \"43.30\" pretty_num(\"56.089\", suffix = \"%\") #> [1] \"56%\" pretty_num(\"x\") #> [1] NA pretty_num(\"x\", ignore_na = TRUE) #> [1] \"x\" pretty_num(\"nope\", alt_na = \"x\") #> [1] \"x\" # Applied over an example vector vector <- c(3998098008, -123421421, \"c\", \"x\") pretty_num(vector) #> [1] \"4 billion\" \"-123 million\" NA NA pretty_num(vector, prefix = \"+/-\", gbp = TRUE) #> [1] \"+£4 billion\" \"-£123 million\" NA NA # Return original values if NA pretty_num(vector, ignore_na = TRUE) #> [1] \"4 billion\" \"-123 million\" \"c\" \"x\" # Return alternative value in place of NA pretty_num(vector, alt_na = \"z\") #> [1] \"4 billion\" \"-123 million\" \"z\" \"z\""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_num_table.html","id":null,"dir":"Reference","previous_headings":"","what":"Format a data frame with dfeR::pretty_num(). — pretty_num_table","title":"Format a data frame with dfeR::pretty_num(). — pretty_num_table","text":"can format number character values data frame passing arguments dfeR::pretty_num(). Use parameters include_columns exclude_columns specify columns formatting.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_num_table.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Format a data frame with dfeR::pretty_num(). — pretty_num_table","text":"","code":"pretty_num_table(data, include_columns = NULL, exclude_columns = NULL, ...)"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_num_table.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Format a data frame with dfeR::pretty_num(). — pretty_num_table","text":"data data frame containing columns formatted. include_columns character vector specifying columns format. NULL (default), columns considered formatting. exclude_columns character vector specifying columns exclude formatting. NULL (default), columns excluded. include_columns exclude_columns provided , include_columns takes precedence. ... Additional arguments passed dfeR::pretty_num() , dp (decimal places) controlling number decimal points.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_num_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Format a data frame with dfeR::pretty_num(). — pretty_num_table","text":"data frame columns formatted using dfeR::pretty_num().","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_num_table.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Format a data frame with dfeR::pretty_num(). — pretty_num_table","text":"function first checks columns specified inclusion via include_columns. none provided, checks columns specified exclusion via exclude_columns. neither specified, columns data frame formatted.","code":""},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_num_table.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Format a data frame with dfeR::pretty_num(). — pretty_num_table","text":"","code":"# Example data frame df <- data.frame( a = c(1.234, 5.678, 9.1011), b = c(10.1112, 20.1314, 30.1516), c = c(\"A\", \"B\", \"C\") ) # Apply formatting to all columns pretty_num_table(df, dp = 2) #> a b c #> 1 1.23 10.11 NA #> 2 5.68 20.13 NA #> 3 9.10 30.15 NA # Apply formatting to only selected columns pretty_num_table(df, include_columns = c(\"a\"), dp = 2) #> a b c #> 1 1.23 10.1112 A #> 2 5.68 20.1314 B #> 3 9.10 30.1516 C # Apply formatting to all columns except specified ones pretty_num_table(df, exclude_columns = c(\"b\"), dp = 2) #> a b c #> 1 1.23 10.1112 NA #> 2 5.68 20.1314 NA #> 3 9.10 30.1516 NA # Apply formatting to all columns except specified ones and # provide alternative value for NAs pretty_num_table(df, alt_na = \"[z]\", exclude_columns = c(\"b\"), dp = 2) #> a b c #> 1 1.23 10.1112 [z] #> 2 5.68 20.1314 [z] #> 3 9.10 30.1516 [z]"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_time_taken.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate elapsed time between two points and present prettily — pretty_time_taken","title":"Calculate elapsed time between two points and present prettily — pretty_time_taken","text":"Converts start end value readable time format.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_time_taken.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate elapsed time between two points and present prettily — pretty_time_taken","text":"","code":"pretty_time_taken(start_time, end_time)"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_time_taken.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate elapsed time between two points and present prettily — pretty_time_taken","text":"start_time start time readable .POSIXct end_time end time readable .POSIXct","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_time_taken.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate elapsed time between two points and present prettily — pretty_time_taken","text":"string containing prettified elapsed time","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_time_taken.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Calculate elapsed time between two points and present prettily — pretty_time_taken","text":"Designed used Sys.time() tracking start end times. Shows seconds 119 seconds, minutes 119 minutes, hours anything larger. Input start end times must convertible POSIXct format.","code":""},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/pretty_time_taken.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate elapsed time between two points and present prettily — pretty_time_taken","text":"","code":"pretty_time_taken( \"2024-03-23 07:05:53 GMT\", \"2024-03-23 12:09:56 GMT\" ) #> [1] \"5 hours 4 minutes 3 seconds\" # Track the start and end time of a process start <- Sys.time() Sys.sleep(0.1) end <- Sys.time() # Use this function to present it prettily pretty_time_taken(start, end) #> [1] \"0.1 seconds\""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/regions.html","id":null,"dir":"Reference","previous_headings":"","what":"Lookup for valid region names and codes — regions","title":"Lookup for valid region names and codes — regions","text":"lookup ONS geography region names codes England. lookups Northern Ireland, Scotland Wales regions.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/regions.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Lookup for valid region names and codes — regions","text":"","code":"regions"},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/regions.html","id":"regions","dir":"Reference","previous_headings":"","what":"regions","title":"Lookup for valid region names and codes — regions","text":"data frame 16 rows 2 columns: region_name Region name region_code Region code","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/regions.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Lookup for valid region names and codes — regions","text":"curated explore.statistics@education.gov.uk, ONS codes sourced https://geoportal.statistics.gov.uk/search?q=NAC_RGN","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/regions.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Lookup for valid region names and codes — regions","text":"Also included inner outer London county split DfE frequently publish regions, well custom DfE names codes. used definitive list screening open data published DfE.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/round_five_up.html","id":null,"dir":"Reference","previous_headings":"","what":"Round five up — round_five_up","title":"Round five up — round_five_up","text":"Round number specified number places, 5's rounded .","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/round_five_up.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Round five up — round_five_up","text":"","code":"round_five_up(number, dp = 0)"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/round_five_up.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Round five up — round_five_up","text":"number number rounded dp number decimal places round , default 0","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/round_five_up.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Round five up — round_five_up","text":"Rounded number","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/round_five_up.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Round five up — round_five_up","text":"Rounds 0 decimal places default. can use negative value decimal places. example: -1 round nearest 10 -2 round nearest 100 . alternative round base R, uses bankers round. information see round() documentation.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/round_five_up.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Round five up — round_five_up","text":"","code":"# No dp set round_five_up(2485.85) #> [1] 2486 # With dp set round_five_up(2485.85, 2) #> [1] 2485.85 round_five_up(2485.85, 1) #> [1] 2485.9 round_five_up(2485.85, 0) #> [1] 2486 round_five_up(2485.85, -1) #> [1] 2490 round_five_up(2485.85, -2) #> [1] 2500"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/toggle_message.html","id":null,"dir":"Reference","previous_headings":"","what":"Controllable console messages — toggle_message","title":"Controllable console messages — toggle_message","text":"Quick expansion message() function aimed use functions easy addition global verbose TRUE / FALSE argument toggle messages ","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/toggle_message.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Controllable console messages — toggle_message","text":"","code":"toggle_message(..., verbose)"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/toggle_message.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Controllable console messages — toggle_message","text":"... message normally pass message(). See message details verbose logical, usually variable passed function using within","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/toggle_message.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Controllable console messages — toggle_message","text":"return value, called side effects","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/toggle_message.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Controllable console messages — toggle_message","text":"","code":"# Usually used in a function my_function <- function(count_fingers, verbose) { toggle_message(\"I have \", count_fingers, \" fingers\", verbose = verbose) fingers_thumbs <- count_fingers + 2 toggle_message(\"I have \", fingers_thumbs, \" digits\", verbose = verbose) } my_function(5, verbose = FALSE) my_function(5, verbose = TRUE) #> I have 5 fingers #> I have 7 digits # Can be used in isolation toggle_message(\"I want the world to read this!\", verbose = TRUE) #> I want the world to read this! toggle_message(\"I ain't gonna show this message!\", verbose = FALSE) count_fingers <- 5 toggle_message(\"I have \", count_fingers, \" fingers\", verbose = TRUE) #> I have 5 fingers"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/wd_pcon_lad_la_rgn_ctry.html","id":null,"dir":"Reference","previous_headings":"","what":"Ward to Constituency to LAD to LA to Region to Country lookup — wd_pcon_lad_la_rgn_ctry","title":"Ward to Constituency to LAD to LA to Region to Country lookup — wd_pcon_lad_la_rgn_ctry","text":"lookup showing hierarchy ward Westminster parliamentary constituency local authority district local authority region country years 2017, 2019, 2020, 2021, 2022, 2023 2024.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/wd_pcon_lad_la_rgn_ctry.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ward to Constituency to LAD to LA to Region to Country lookup — wd_pcon_lad_la_rgn_ctry","text":"","code":"wd_pcon_lad_la_rgn_ctry"},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/wd_pcon_lad_la_rgn_ctry.html","id":"wd-pcon-lad-la-rgn-ctry","dir":"Reference","previous_headings":"","what":"wd_pcon_lad_la_rgn_ctry","title":"Ward to Constituency to LAD to LA to Region to Country lookup — wd_pcon_lad_la_rgn_ctry","text":"data frame 24,629 rows 14 columns: first_available_year_included First year lookups see location most_recent_year_included Last year lookups see location ward_name Ward name pcon_name Parliamentary constituency name lad_name Local authority district name la_name Local authority name region_name Region name country_code Country name ward_code 9 digit ward code pcon_code 9 digit westminster constituency code lad_code 9 digit local authority district code new_la_code 9 digit local authority code region_code 9 digit region code country_code 9 digit country code","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/wd_pcon_lad_la_rgn_ctry.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Ward to Constituency to LAD to LA to Region to Country lookup — wd_pcon_lad_la_rgn_ctry","text":"https://geoportal.statistics.gov.uk/search?tags=lup_wd_pcon_lad_utla https://geoportal.statistics.gov.uk/search?q=lup_wd_lad_cty_rgn_gor_ctry","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/wd_pcon_lad_la_rgn_ctry.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Ward to Constituency to LAD to LA to Region to Country lookup — wd_pcon_lad_la_rgn_ctry","text":"Changes made original lookup: original lookup ONS uses Upper Tier Local Authority, update metropolitan local authority use local authority district local authority match DfE publish data local authorities. noticed 2017 version, Glasgow East constituency code S1400030 instead usual S14000030, assumed error change data Glasgow East S14000030 2017. joined regions using Ward LAD County Region file. joined countries based E / N / S / W start codes. Scotland published regions 2017, given rest years Scotland region, forced 2017 complete data set.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/z_replace.html","id":null,"dir":"Reference","previous_headings":"","what":"Replaces NA values in tables — z_replace","title":"Replaces NA values in tables — z_replace","text":"Replaces NA values tables except ones time geography columns must included DfE official statistics. Guidance Open Data Standards.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/z_replace.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Replaces NA values in tables — z_replace","text":"","code":"z_replace(data, replacement_alt = NULL, exclude_columns = NULL)"},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/z_replace.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Replaces NA values in tables — z_replace","text":"data name table want replace NA values replacement_alt optional - want NA replacement value different \"z\" exclude_columns optional - additional columns exclude NA replacement. Column names match ones found dfeR::geog_time_identifiers always excluded missing data columns need explicit codes explain data available.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/z_replace.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Replaces NA values in tables — z_replace","text":"table \"z\" alternate replacement value instead NA values columns time geography.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/z_replace.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Replaces NA values in tables — z_replace","text":"Names geography time columns used function can found dfeR::geog_time_identifiers.","code":""},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/reference/z_replace.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Replaces NA values in tables — z_replace","text":"","code":"# Create a table for the example df <- data.frame( time_period = c(2022, 2022, 2022), time_identifier = c(\"Calendar year\", \"Calendar year\", \"Calendar year\"), geographic_level = c(\"National\", \"Regional\", \"Regional\"), country_code = c(\"E92000001\", \"E92000001\", \"E92000001\"), country_name = c(\"England\", \"England\", \"England\"), region_code = c(NA, \"E12000001\", \"E12000002\"), region_name = c(NA, \"North East\", \"North West\"), mystery_count = c(42, 25, NA) ) z_replace(df) #> time_period time_identifier geographic_level country_code country_name #> 1 2022 Calendar year National E92000001 England #> 2 2022 Calendar year Regional E92000001 England #> 3 2022 Calendar year Regional E92000001 England #> region_code region_name mystery_count #> 1 42 #> 2 E12000001 North East 25 #> 3 E12000002 North West z # Use a different replacement value z_replace(df, replacement_alt = \"c\") #> time_period time_identifier geographic_level country_code country_name #> 1 2022 Calendar year National E92000001 England #> 2 2022 Calendar year Regional E92000001 England #> 3 2022 Calendar year Regional E92000001 England #> region_code region_name mystery_count #> 1 42 #> 2 E12000001 North East 25 #> 3 E12000002 North West c"},{"path":[]},{"path":"https://dfe-analytical-services.github.io/dfeR/news/index.html","id":"dfer-101","dir":"Changelog","previous_headings":"","what":"dfeR 1.0.1","title":"dfeR 1.0.1","text":"Fix spacing printing z_replace() warning message, updating eesyapi URL README removed extraneous package tests.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/news/index.html","id":"dfer-100","dir":"Changelog","previous_headings":"","what":"dfeR 1.0.0","title":"dfeR 1.0.0","text":"CRAN release: 2025-01-13 Initial CRAN release. Added lookup data geog_time_identifiers. Added z_replace() replace NA values tables except ones geography time columns match ones geog_time_identifiers.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/news/index.html","id":"dfer-061","dir":"Changelog","previous_headings":"","what":"dfeR 0.6.1","title":"dfeR 0.6.1","text":"Patch update pretty_num() function dp argument’s default 0.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/news/index.html","id":"dfer-060","dir":"Changelog","previous_headings":"","what":"dfeR 0.6.0","title":"dfeR 0.6.0","text":"Update pretty_num : can take single multiple values. argument nsmall allows control number digits displayed rounding. Add pretty_num_table() uses pretty_num() format numbers readable format data frames. customization provided pretty_num.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/news/index.html","id":"dfer-051","dir":"Changelog","previous_headings":"","what":"dfeR 0.5.1","title":"dfeR 0.5.1","text":"Patch update get_clean_sql() function ignore lines starting ‘USE’.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/news/index.html","id":"dfer-050","dir":"Changelog","previous_headings":"","what":"dfeR 0.5.0","title":"dfeR 0.5.0","text":"Add following lookup data sets package: ons_geog_shorthands countries regions wd_pcon_lad_la_rgn_ctry Add following fetch_locations() functions: fetch_wards() fetch_pcons() fetch_lads() fetch_las() fetch_regions() fetch_countries() Add wrapper ONS Open Geography Portal API: get_ons_api_data() Add helper turning messages : toggle_message()","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/news/index.html","id":"dfer-041","dir":"Changelog","previous_headings":"","what":"dfeR 0.4.1","title":"dfeR 0.4.1","text":"Update comma_sep() function allow non-numeric values instead throwing error, now returns unchanged.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/news/index.html","id":"dfer-040","dir":"Changelog","previous_headings":"","what":"dfeR 0.4.0","title":"dfeR 0.4.0","text":"Add function creates DfE R project: create_project()","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/news/index.html","id":"dfer-031","dir":"Changelog","previous_headings":"","what":"dfeR 0.3.1","title":"dfeR 0.3.1","text":"Fix bug get_clean_sql() using additional settings lose original SQL statement.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/news/index.html","id":"dfer-030","dir":"Changelog","previous_headings":"","what":"dfeR 0.3.0","title":"dfeR 0.3.0","text":"Add pretty_* functions presenting pretty numbers: pretty_num() pretty_filesize() pretty_time_taken() Add helper function comma separating numbers: comma_sep()","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/news/index.html","id":"dfer-020","dir":"Changelog","previous_headings":"","what":"dfeR 0.2.0","title":"dfeR 0.2.0","text":"Add function formatting financial years: format_fy() Add reversing functions academic financial years: format_ay_reverse() format_fy_reverse() Add function grabbing cleaning SQL script, vignette connecting SQL. get_clean_sql()","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/news/index.html","id":"dfer-011","dir":"Changelog","previous_headings":"","what":"dfeR 0.1.1","title":"dfeR 0.1.1","text":"Add default value decimal place argument round_five_up() function.","code":""},{"path":"https://dfe-analytical-services.github.io/dfeR/news/index.html","id":"dfer-010","dir":"Changelog","previous_headings":"","what":"dfeR 0.1.0","title":"dfeR 0.1.0","text":"Relaunch package two functions: format_ay() round_five_up()","code":""}]