Skip to main content

Floating catchment area spatial accessibility (2SFCA, E2SFCA, and variants)

Project description

sdc-catchment

Floating catchment area (FCA) spatial-accessibility metrics — 2SFCA, E2SFCA, KD2SFCA, 3SFCA, modified-2SFCA, balanced FCA, and commute-based FCA, all as parameter variations of a single catchment_ratio().

Part of the Social Data Commons toolkit. Extracted from sdc_core.catchment; the Python replacement for the R catchment package.

Install

uv add sdc-catchment   # or: pip install sdc-catchment

Quickstart

Access of three consumers to two providers, under a gaussian distance-decay:

import numpy as np
import pandas as pd
from sdc_catchment import catchment_ratio, euclidean_cost

consumers = pd.DataFrame({"geoid": ["c1", "c2", "c3"], "value": [100.0, 100.0, 100.0]})
providers = pd.DataFrame({"geoid": ["p1", "p2"], "value": [10.0, 10.0]})
cost = euclidean_cost(np.array([[0, 0], [1, 0], [2, 0]]), np.array([[0, 0], [2, 0]]))

access = catchment_ratio(consumers, providers, cost, weight="gaussian", scale=1.0)
print(access.to_string())
# c1    0.065179
# c2    0.069641
# c3    0.065179

The central consumer (c2) has the highest access; decay weights each provider by distance.

Public API

  • catchment_ratio — accessibility ratio under a chosen FCA variant.
  • catchment_weight — distance-decay weight matrix builder.
  • catchment_connections / catchment_network — provider/consumer connectivity.
  • euclidean_cost — pairwise Euclidean cost matrix.
  • KERNELS, WeightSpec — kernel registry and weight-spec type.

Documentation

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sdc_catchment-0.1.1.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

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

sdc_catchment-0.1.1-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file sdc_catchment-0.1.1.tar.gz.

File metadata

  • Download URL: sdc_catchment-0.1.1.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sdc_catchment-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8fc8cc9ee19f7ce946f4a0c1831d63cc763d9bf3b8410ffdb2d9601082b90b98
MD5 eea651db93a6cb5b5836405362475dc5
BLAKE2b-256 813cd52d4b9503b5330f1dddd03413e3809ba175c7a6788d726200c2a7444872

See more details on using hashes here.

Provenance

The following attestation bundles were made for sdc_catchment-0.1.1.tar.gz:

Publisher: publish-catchment.yml on dads2busy/Social-Data-Commons

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

File details

Details for the file sdc_catchment-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: sdc_catchment-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sdc_catchment-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 44c82a6f79c07067f10a8b36b1144336be5ff8ea8908138b4b14a7398e395a4c
MD5 31f686027aab7c2d3ff98574dd0dde18
BLAKE2b-256 4d1b208fec287427724a850b3b417545edc0401566cb63ec80c9bf0b43f2010f

See more details on using hashes here.

Provenance

The following attestation bundles were made for sdc_catchment-0.1.1-py3-none-any.whl:

Publisher: publish-catchment.yml on dads2busy/Social-Data-Commons

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

Supported by

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