gla-data
Shared tools for loading, transforming, and visualising the GLA datasets used in City Data analysis.
Installation
Global install (CLI)
To install gla-data globally so the gla-data CLI is available anywhere in your terminal, use uv tool:
uv tool install gla-data
Normally pixi global install would be the preferred approach, but it does not yet support PyPI packages — so uv tool is the right choice for now.
If you don't have uv installed, you can install it via pixi:
pixi global install uv
pip
pip install gla-data
pixi
pixi add gla-data
Pixi pulls geospatial dependencies (geopandas, pyproj, etc.) from conda-forge, which provides reliable pre-built binaries across all platforms and Python versions.
Usage
Python API
import gla_data
# Load 2021 LSOA boundaries for London
lsoa_gdf = gla_data.load_boundaries(geography='lsoa', year=2021)
# Load census dwelling counts
dwellings_2021 = gla_data.load_census_dwellings(year=2021)
dwellings_2011 = gla_data.load_census_dwellings(year=2011)
# Crosswalk 2011 dwelling counts onto 2021 LSOA boundaries
dwellings_2011_xw = gla_data.crosswalk(
dwellings_2011,
from_year=2011,
to_year=2021,
value_cols=['dwellings_total'],
)
# Load an OA → LSOA geography lookup
lookup = gla_data.load_geography_lookup(year=2021, smallest_geography='oa')
# Aggregate OA-level data up to LSOA level
lsoa_totals = gla_data.aggregate(
df,
from_geography='oa',
to_geography='lsoa',
value_cols=['count'],
year=2021,
)
CLI
The package installs a gla-data command. Run catalogue to list all available datasets:
gla-data catalogue
This prints a table of every dataset, the function used to load it, a description, and its access tier (public/S3).
Development
git clone <repo-url>
cd gla-data
pixi install
pixi run test # run tests
pixi run lint # check code style
pixi run format # auto-format
pixi run typecheck # type checking
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gla_data-0.1.2.tar.gz.
File metadata
- Download URL: gla_data-0.1.2.tar.gz
- Upload date:
- Size: 141.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f797b1235b220fe8a43af9e71f9f097d430dcb215d4c8fb4b3c42aed737c6b87
|
|
| MD5 |
55d2fca00b26f613772f59486c481a92
|
|
| BLAKE2b-256 |
541c95487eaed397c47405331dc9f36af3e8de179f3072696ac81253fa463e55
|
Provenance
The following attestation bundles were made for gla_data-0.1.2.tar.gz:
Publisher:
publish.yml on Greater-London-Authority/gla-data
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gla_data-0.1.2.tar.gz -
Subject digest:
f797b1235b220fe8a43af9e71f9f097d430dcb215d4c8fb4b3c42aed737c6b87 - Sigstore transparency entry: 2084766134
- Sigstore integration time:
-
Permalink:
Greater-London-Authority/gla-data@a70fc819e7f5438945efc58597add0b1f09ce048 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/Greater-London-Authority
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a70fc819e7f5438945efc58597add0b1f09ce048 -
Trigger Event:
push
-
Statement type:
File details
Details for the file gla_data-0.1.2-py3-none-any.whl.
File metadata
- Download URL: gla_data-0.1.2-py3-none-any.whl
- Upload date:
- Size: 17.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3dfe3900b0a9536e5c9831b8cb4db34cc7d5077ae2327727adb2804ced99e59
|
|
| MD5 |
6bd772c45795e2352168cb74f5b564f7
|
|
| BLAKE2b-256 |
2dfe83c7c1dcbe8b3e9294825fbf9caf247b82ae2910150fb77bf45033cc9eef
|
Provenance
The following attestation bundles were made for gla_data-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on Greater-London-Authority/gla-data
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gla_data-0.1.2-py3-none-any.whl -
Subject digest:
c3dfe3900b0a9536e5c9831b8cb4db34cc7d5077ae2327727adb2804ced99e59 - Sigstore transparency entry: 2084766145
- Sigstore integration time:
-
Permalink:
Greater-London-Authority/gla-data@a70fc819e7f5438945efc58597add0b1f09ce048 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/Greater-London-Authority
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a70fc819e7f5438945efc58597add0b1f09ce048 -
Trigger Event:
push
-
Statement type: