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.2.1.tar.gz (186.8 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.2.1-py3-none-any.whl (35.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gla_data-0.2.1.tar.gz
  • Upload date:
  • Size: 186.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for gla_data-0.2.1.tar.gz
Algorithm Hash digest
SHA256 ad66c8a18b798564d706874a9308d9da13b746a1a383a9f4b112d9a45179eab6
MD5 212f17bdf46d14cf033692c4d4ff4e45
BLAKE2b-256 735c51d48e22c22d0750c71badf320dc2da0a5bcc61661b1ae73bb6713fea0e5

See more details on using hashes here.

Provenance

The following attestation bundles were made for gla_data-0.2.1.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.2.1-py3-none-any.whl.

File metadata

  • Download URL: gla_data-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 35.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for gla_data-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 88999f9a64aac2781539ffb1e9d88100603d64cfc13fc4b692e2bcd05c1901dd
MD5 b3c056fd7aa14408c95e6f5a4ca2f8f7
BLAKE2b-256 3dc28823492b68247a44fbf13d0078888e9c00538ab227086a0edf3e4f5de412

See more details on using hashes here.

Provenance

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

This release

0.2.1 This release

2 files

0.1.3

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