Skip to main content

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

gla_data-0.1.3.tar.gz (141.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gla_data-0.1.3-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

Details for the file gla_data-0.1.3.tar.gz.

File metadata

  • Download URL: gla_data-0.1.3.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

Hashes for gla_data-0.1.3.tar.gz
Algorithm Hash digest
SHA256 fbe08d15c46b038673d32307d23fe0525bec413796c720e01c21d364d162891e
MD5 3aa863e7066da07aeef40322ae7eed16
BLAKE2b-256 06b580d910aee75a7c6b3159f5083aee2f12fef20ffd5e57eb17a7e496b532fc

See more details on using hashes here.

Provenance

The following attestation bundles were made for gla_data-0.1.3.tar.gz:

Publisher: publish.yml on Greater-London-Authority/gla-data

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gla_data-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: gla_data-0.1.3-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

Hashes for gla_data-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 41e4038248b07134d214b746cbd2ff6309d154dabfb2bd17f956673f8914b4cb
MD5 081cb72935d21fe2fa8c497b107195ca
BLAKE2b-256 730bc6fd41d4d14101dbe948f720f29a8a17d22055f0ee397916347c30152a59

See more details on using hashes here.

Provenance

The following attestation bundles were made for gla_data-0.1.3-py3-none-any.whl:

Publisher: publish.yml on Greater-London-Authority/gla-data

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.2.2

2 files

0.2.1

2 files

This release

0.1.3 This release

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page