Skip to main content

No project description provided

Project description

spatial_access: Compute travel times and spatial access metrics at scale

Compute travel times and spatial access measures at scale (millions of origin-destination pairs in minutes). Travel times for three modes: walking, biking, driving. Spatial access measures: provider-to-people ratio, avg. time to nearest provider, count/attribute sum of nearby providers, weighted access scores and floating catchment areas.

Latest Release latest release
Build Status travis build status
Documentation read the docs
Tested Operating Systems Ubuntu, macOS

Components of spatial_access :

spatial_access has two submodules:

  • p2p: Generate many to many matrices with travel times for sets of coordinates. Use walk ,bike or drive network types (import transit from other sources), or get the distance in meters.
  • Models: Contains a suite of models for calculating spatial accessibility to amenities.

To use this service as a ReST API, see: https://github.com/GeoDaCenter/spatial_access_api

If you are a Windows user, instructions for installing Ubuntu on a virtual machine are at the bottom of the Readme.

Installation

  1. A modern compiler like gcc or clang.

  2. Dependencies

    • MacOS:

      brew install spatialindex

    • Ubuntu:

      sudo apt-get install libspatialindex-dev

      sudo apt-get install python-tk

  3. Package

    pip3 install spatial_access

Usage

See the iPython notebooks in docs/ for example usage, or https://readthedocs.org/projects/spatial-acccess/ for technical documentation.

Instructions for building locally (only for developers):

  • If updating Cython or C++ code (anything in spatial_access/src/) you must install cython
  • To regenerate .pyx files, run: bash cythonize_extension.sh (TravisCI will do this automatically on deployment)
  • To install locally, run: sudo python3 setup.py install
  • Unit tests require the pytest package. From package root directory, run python3 -m pytest tests/ to run all unit tests.

PyPi Maintenance

The package lives at: https://pypi.org/project/spatial-access/

When a branch is pulled into Master and builds/passes all unit tests, Travis CI will automatically deploy the build to PyPi.

To update PyPi access credentials, see .travis.yml and follow the instructions at https://docs.travis-ci.com/user/deployment/pypi/ to generate a new encrypted password.

Overwriting default configuration values

p2p provides default configuration values for edge weights and node impedence (see spatial_access/configs.py). You can overwrite these as follows:

from spatial_access.p2p import TransitMatrix
from spatial_access.Configs import Configs
custom_config = Configs()
# set fields of custom_cofig
tm = TransitMatrix(..., configs=custom_config)
# continue with computation 

Installing Ubuntu 18 LTS with dependencies from scratch (recommended for Windows users)

  1. Follow the instructions at this link: https://linus.nci.nih.gov/bdge/installUbuntu.html to set up a virtual machine
  2. sudo apt-get update
  3. sudo add-apt-repository universe
  4. sudo apt-get -y install python3-pip
  5. Continue with Installation Instructions (above)

Questions/Feedback?

lnoel@uchicago.edu or spatial@uchicago.edu

Acknowledgments

Developed by Logan Noel at the University of Chicago's Center for Spatial Data Science (CSDS) with support from the Public Health National Center for Innovations (PHNCI), the University of Chicago, and CSDS.

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

spatial_access-0.1.10.tar.gz (115.6 kB view details)

Uploaded Source

Built Distribution

spatial_access-0.1.10-py3.6-linux-x86_64.egg (311.3 kB view details)

Uploaded Egg

File details

Details for the file spatial_access-0.1.10.tar.gz.

File metadata

  • Download URL: spatial_access-0.1.10.tar.gz
  • Upload date:
  • Size: 115.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

File hashes

Hashes for spatial_access-0.1.10.tar.gz
Algorithm Hash digest
SHA256 9dae815f702775adbd3a6690017f0c72e374018c6515b99450ac29fac138b7de
MD5 61f821407f1c46368e76487eb4985111
BLAKE2b-256 156e5f8267430cdd812c8f075702e8ff4d21d666c60cf1ec3204429c6b401fa8

See more details on using hashes here.

File details

Details for the file spatial_access-0.1.10-py3.6-linux-x86_64.egg.

File metadata

  • Download URL: spatial_access-0.1.10-py3.6-linux-x86_64.egg
  • Upload date:
  • Size: 311.3 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

File hashes

Hashes for spatial_access-0.1.10-py3.6-linux-x86_64.egg
Algorithm Hash digest
SHA256 146690a1b0999ef3a164e2a1ae80f3b8f668cf43b63ab15d0b1ad0e5fb250204
MD5 9682ecc84c87d9a3c94b43fe3345b8cb
BLAKE2b-256 f5506350b9ec03eb502d6e4f77b40cfdc0adf1e3a914c90e1d8b9b362523a8e1

See more details on using hashes here.

Supported by

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