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.2.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.2-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

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

Hashes for gla_data-0.1.2.tar.gz
Algorithm Hash digest
SHA256 f797b1235b220fe8a43af9e71f9f097d430dcb215d4c8fb4b3c42aed737c6b87
MD5 55d2fca00b26f613772f59486c481a92
BLAKE2b-256 541c95487eaed397c47405331dc9f36af3e8de179f3072696ac81253fa463e55

See more details on using hashes here.

Provenance

The following attestation bundles were made for gla_data-0.1.2.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.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

Hashes for gla_data-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c3dfe3900b0a9536e5c9831b8cb4db34cc7d5077ae2327727adb2804ced99e59
MD5 6bd772c45795e2352168cb74f5b564f7
BLAKE2b-256 2dfe83c7c1dcbe8b3e9294825fbf9caf247b82ae2910150fb77bf45033cc9eef

See more details on using hashes here.

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

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

0.1.3

2 files

This release

0.1.2 This release

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