API Reference
KindTech provides four modules for accessing UK public data, and analyses that put them to work on your own data. Datasets lists every published dataset they load.
Modules
Geographic Data — uk_open_data.geo
Load UK geographic boundary data from the ONS ArcGIS Geoportal. Returns GeoJSON.
from uk_open_data.geo import load_geodata
# Load Local Authority Districts
boundaries = load_geodata(geography_type="LAD", coverage="UK")
ONS Statistics — uk_open_data.ons
Load statistical data from the ONS NOMIS API. Returns pandas or polars DataFrames.
from uk_open_data.ons import load_ons
# Load Jobseeker's Allowance data
df = load_ons("NM_1_1", geography="TYPE480", time="latest")
Postcodes — uk_open_data.postcodes
Resolve UK postcodes (and outcodes) to ONS geography codes via postcodes.io, so address data joins to boundaries and statistics. Returns pandas or polars DataFrames.
from uk_open_data.postcodes import postcodes_to_geography
# Postcodes -> LSOA, ready to join on `geography_code`
located = postcodes_to_geography(["SE13 7HX", "SE6 4RU"], geography_type="LSOA")
Deprivation (IMD) — uk_open_data.imd
Load UK Indices of Multiple Deprivation, keyed on geography codes. A single
nation returns its official index (England IoD 2025/2019 with all domains,
or WIMD/SIMD/NIMDM); nation="UK" returns the mySociety composite for
cross-nation comparison. Returns pandas or polars DataFrames.
from uk_open_data.imd import load_imd
imd = load_imd(nation="England") # official IoD 2025; join on `geography_code`
Transport connectivity — uk_open_data.connectivity
Load the Department for Transport's connectivity scores for every neighbourhood in England and Wales: how easily people there can reach work, education, healthcare and shops, by walking, cycling, public transport and driving.
from uk_open_data.connectivity import load_connectivity
scores = load_connectivity() # join on `geography_code`
Homelessness — uk_open_data.homelessness
Load the latest quarter of MHCLG's statutory homelessness figures for every council in England: households owed a prevention or relief duty, and households in temporary accommodation.
from uk_open_data.homelessness import load_homelessness
councils = load_homelessness() # join on `geography_code`
Fuel poverty — uk_open_data.fuel_poverty
Load DESNZ's estimates of the households in fuel poverty in every council in England: modelled figures for one year, published as Official Statistics in Development.
from uk_open_data.fuel_poverty import load_fuel_poverty
councils = load_fuel_poverty() # join on `geography_code`
Education statistics — uk_open_data.education
Load the Department for Education's figures through its statistics API: pupil absence, attainment, special educational needs and more, for each council and other areas in England.
from uk_open_data.education import list_publications, load_education
list_publications() # then list_data_sets(publication) to find a data set
absence = load_education("019d209c-08dc-74b6-9edb-52d521406fcf") # by council
Children in low income families — uk_open_data.low_income
Load the latest year of DWP's children in low income families statistics for every council in the United Kingdom: children under 16 in relative low income families, before and after housing costs.
from uk_open_data.low_income import load_low_income
councils = load_low_income() # join on `geography_code`
Childhood vaccinations — uk_open_data.vaccinations
Load the latest year of UKHSA's childhood vaccination (COVER) statistics for every upper-tier council in England: the children who reached 12 months, 24 months and 5 years, and those vaccinated with each routine vaccine by then.
from uk_open_data.vaccinations import load_vaccinations
table = load_vaccinations() # a row per council, age and vaccine
Police recorded crime — uk_open_data.crime
Load the latest year of police recorded crime for every community safety partnership in England and Wales, from ONS: the offences of each kind.
from uk_open_data.crime import load_crime
partnerships = load_crime() # join on `geography_code`
Council codes and areas — uk_open_data.areas
Bring a council code from any year to today's, so figures from sources made in different years line up. Councils that merged add up. Find each council's county, community safety partnership and police force area, with the share of residents in each.
from uk_open_data.areas import current_code
current_code("E08000019") # 'E08000039', Sheffield's code since April 2025
Analyses — uk_open_data.analyses
Ask a question of your own data. An analysis joins your table to open data and returns figures with their sources, the working, the choices made and the checks a person should do. Results hold totals only, never rows.
from uk_open_data.analyses import run_analysis
result = run_analysis(
"reach-deprivation", clients, columns={"postcode": "Client postcode"}
)
Design principles
- Flat functions — no classes to instantiate, just call
load_geodata()orload_ons() - String or enum — pass
"LAD"orGeographyType.LAD, both work - Bring your own DataFrame — narwhals returns whatever backend you have installed
- Bundled catalogs — small CSV reference tables ship with the package (136KB total) so you can browse available datasets offline
- Live data — actual geographic/statistical data is always fetched fresh from the source APIs