wd_pcon_lad_la_rgn_ctry dataset and its startup
message. Use geo_hierarchy instead, which has all the same columns plus more, and is kept up to
date (it includes 2025, wd_pcon_lad_la_rgn_ctry stopped at 2024).diagnostic_test() and a set of check_* helpers to diagnose and (optionally) fix common
DfE laptop R-setup issues — proxy settings, Git SSL verification, GITHUB_PAT, renv download
methods, RTools toolchain, global .gitconfig location, and .Renviron/.Rprofile location.fetch_mp_lookup() to fetch the Westminster constituency to sitting MP lookup maintained at
https://github.com/dfe-analytical-services/mp-lookup, giving one row per constituency with the MP's
name, party, member ID and email alongside the geography the constituency maps to. It errors
with an informative message if the upstream file is missing any expected columns.air_install() now checks the installed Air version and automatically reinstalls it if it is
older than the minimum version required by air_style() (currently 0.10.0, when Air's default
assignment-style changed to "arrow"). It also gains a force argument to always reinstall.
If the install does not leave a supported version of Air in place, it now warns rather than
failing silently.format_ay(), format_fy(), format_ay_reverse() and format_fy_reverse() now accept vectors
of years, e.g. format_ay(c(201617, 201718)). Previously they failed given more than one value.get_ons_api_data() ignoring any where filter in query_params; filtered queries could
return extra rows. It also now gives informative errors when a query matches nothing, the API
can't be reached, or the API rejects the request (for example an unknown data_id).air_style() failing when the target path contains spaces (for example a OneDrive path
under "OneDrive - Department for Education").check_databricks_odbc() failing for users who don't have stringr installed.geo_hierarchy and the output of fetch_mayoral(), the cauth_name and
cauth_code columns are renamed to english_devolved_area_name and
english_devolved_area_code, and the Greater London Authority is now included as the mayoral
authority for London boroughs.air_install() and air_style() to install and run the Air formatter on R code.write_df_to_delta() to write a data frame to a Delta table in Databricks, with an
accompanying vignette. It accepts DATABRICKS_HOST with or without a scheme; bare hosts have
https:// prepended automatically, http:// is upgraded to https://, and any trailing slash
is stripped. An unset or empty DATABRICKS_HOST gives a clear error.lsip_lad which is a lookup table for Local Skills Improvement Plan (LSIP) areas
and the function fetch_lsips() to fetch LSIP data.geo_hierarchy, and associated fetch_* functions with latest 2025 lookups.pretty_num() to add an abbreviate argument giving the option to avoid displaying large
numbers in millions/billions, and a dynamic_dp_value argument that adds decimal places only when
a value in millions/billions isn't a whole number.fetch_*() functions now give an error when given a year that their lookup does not cover,
where previously they returned an empty data frame.geo_hierarchy, which supersedes wd_pcon_lad_la_rgn_ctry and adds 2025 along with mayoral columns.fetch_mayoral().check_databricks_odbc().wd_pcon_lad_la_rgn_ctry by adding three digit local authority codes (also known as old_la_codes) to the data.wd_pcon_lad_la_rgn_ctry.fetch_las() so that old_la_codes are included in the output.Fix the spacing and printing of the z_replace() warning message, updating the eesyapi URL in the README and removed extraneous package tests.
Initial CRAN release. Added lookup data geog_time_identifiers. Added z_replace() to replace NA values in tables except for ones in geography and time columns that match ones in geog_time_identifiers.
Patch to update the pretty_num() function so that the dp argument's default is 0.
Update pretty_num so that:
nsmall that allows control over the number of digits displayed after rounding.Add pretty_num_table() which uses pretty_num() to format numbers in a readable format in data frames. It has all the customization provided by pretty_num.
Patch to update the get_clean_sql() function to ignore lines starting with 'USE'.
Add the following lookup data sets into the package:
Add the following fetch_locations() functions:
Add wrapper for ONS Open Geography Portal API:
Add helper for turning messages on or off:
Update comma_sep() function to allow non-numeric values instead of throwing an error, now returns them unchanged.
Add function which creates a DfE R project:
Fix bug in get_clean_sql() where using the additional settings would lose the original SQL statement.
Add pretty_* functions for presenting pretty numbers:
Add helper function for comma separating numbers:
Add function for formatting financial years:
Add reversing functions for academic and financial years:
Add function for grabbing and cleaning a SQL script, and vignette for connecting to SQL.
Add default value to decimal place argument of round_five_up() function.
Relaunch of the package with two functions: