{"id":13856984,"url":"https://github.com/GeoDaCenter/spatial_access","last_synced_at":"2025-07-13T19:34:09.468Z","repository":{"id":45069637,"uuid":"139459919","full_name":"GeoDaCenter/spatial_access","owner":"GeoDaCenter","description":null,"archived":false,"fork":false,"pushed_at":"2022-01-11T06:02:58.000Z","size":126749,"stargazers_count":37,"open_issues_count":16,"forks_count":11,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-07-10T18:49:58.276Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://spatial.uchicago.edu","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GeoDaCenter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-02T15:15:37.000Z","updated_at":"2024-04-24T16:11:53.000Z","dependencies_parsed_at":"2022-09-04T00:40:09.449Z","dependency_job_id":null,"html_url":"https://github.com/GeoDaCenter/spatial_access","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeoDaCenter%2Fspatial_access","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeoDaCenter%2Fspatial_access/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeoDaCenter%2Fspatial_access/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeoDaCenter%2Fspatial_access/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GeoDaCenter","download_url":"https://codeload.github.com/GeoDaCenter/spatial_access/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":213988301,"owners_count":15666958,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-05T03:01:21.400Z","updated_at":"2024-08-05T03:02:35.052Z","avatar_url":"https://github.com/GeoDaCenter.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"\n\n# spatial_access: Compute travel times and spatial access metrics at scale\nCompute travel times and spatial access measures at scale (millions of origin-destination pairs in minutes).\nTravel times for three modes: walking, biking, driving.\nSpatial access measures: provider-to-people ratio, avg. time to nearest provider, count/attribute sum of nearby providers, weighted access scores and floating catchment areas.\n\u003ctable\u003e\n\u003ctr\u003e\n  \u003ctd\u003eLatest Release\u003c/td\u003e\n  \u003ctd\u003e\n    \u003ca href=\"https://pypi.org/project/spatial-access/\"\u003e\n    \u003cimg src=\"https://img.shields.io/pypi/v/spatial-access.svg\" alt=\"latest release\" /\u003e\n    \u003c/a\u003e\n  \u003c/td\u003e\n\u003c/tr\u003e    \n\u003ctr\u003e\n  \u003ctd\u003eBuild Status\u003c/td\u003e\n  \u003ctd\u003e\n    \u003ca href=\"https://travis-ci.org/GeoDaCenter/spatial_access\"\u003e\n    \u003cimg src=\"https://travis-ci.org/GeoDaCenter/spatial_access.svg?branch=master\" alt=\"travis build status\" /\u003e\n  \u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n  \u003ctd\u003eDocumentation\u003c/td\u003e\n  \u003ctd\u003e\n      \u003ca href=\"https://readthedocs.org/projects/spatial-acccess\"\u003e\n    \u003cimg src=\"https://readthedocs.org/projects/spatial-acccess/badge\" alt=\"read the docs\" /\u003e\n  \u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n  \u003ctd\u003eTested Operating Systems\u003c/td\u003e\n  \u003ctd\u003e\n       Ubuntu, macOS\n  \u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n\nComponents of spatial_access :\n----\nspatial_access has two submodules:\n- 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.\n- Models: Contains a suite of models for calculating spatial accessibility to amenities.\n\nTo use this service as a ReST API, see: https://github.com/GeoDaCenter/spatial_access_api\n\nIf you are a Windows user, instructions for installing Ubuntu on a virtual machine are at the bottom of the Readme.\n\n\nInstallation\n----\n0. A modern compiler like `gcc` or `clang`.\n\n1. Dependencies\n\n    - MacOS:\n\n        `brew install spatialindex`\n\n    - Ubuntu:\n\n        `sudo apt-get install libspatialindex-dev`\n\n        `sudo apt-get install python-tk`\n\n2. Package\n\n    `pip3 install spatial_access`\n\n**More detailed instructions for installing in [0_Reqs_Install.ipynb](./docs/notebooks/0_Reqs_Install.ipynb)**\n\nUsage\n---\nSee the iPython notebooks in `docs/` for example usage, The first two notebooks contain installation instructions and run through a simple demo to make sure you have the setup successfully installed:\n\n* [0_Reqs_Install.ipynb](https://github.com/GeoDaCenter/spatial_access/tree/master/docs/notebooks/0_Reqs_Install.ipynb): Installation requirements to run the notebook demos  \n* [1_Simple_Test_Demo](https://github.com/GeoDaCenter/spatial_access/tree/master/docs/notebooks/1_Simple_Test_Demo.ipynb): Simple demo to test your setup installation works   \n\n\nThe remaining notebooks walk through how to run the travel time matrix and spatial access metrics, including main functions and parameters:  \n\n* [2_Methods](https://github.com/GeoDaCenter/spatial_access/tree/master/docs/notebooks/2_Methods.ipynb): Purpose and structure of the package + methodology for estimating travel time matrices and spatial access metrics  \n* [3_Travel_Time_Matrix.ipynb](https://github.com/GeoDaCenter/spatial_access/tree/master/docs/notebooks/3_Travel_Time_Matrix.ipynb): How to run the travel time matrices using [p2p.py](https://github.com/GeoDaCenter/spatial_access/blob/master/spatial_access/p2p.py)\n* [4_Access_Metrics.ipynb](https://github.com/GeoDaCenter/spatial_access/tree/master/docs/notebooks/4_Access_Metrics.ipynb): How to run the access metrics (origin-based) using  [Models.py](https://github.com/GeoDaCenter/spatial_access/blob/master/spatial_access/Models.py)  \n* [5_Coverage_Metrics.ipynb](https://github.com/GeoDaCenter/spatial_access/tree/master/docs/notebooks/5_Coverage_Metrics.ipynb): How to run the coverage metrics (destination-based) using [Models.py](https://github.com/GeoDaCenter/spatial_access/blob/master/spatial_access/Models.py)\n* [6_TSFCA.ipynb](https://github.com/GeoDaCenter/spatial_access/tree/master/docs/notebooks/6_TSFCA.ipynb): How to run a two-stage floating catchment area model (origin-based) using [Models.py](https://github.com/GeoDaCenter/spatial_access/blob/master/spatial_access/Models.py)\n\n\nThe **data** folder contains the input_data needed to estimate the metrics under **sources** (for origins) and **destinations** (for destinations).  \nIn output_data, the **matrices** folder stores the estimated symmetric and asymmetric matrices.  \nThe **models** folder contains the results of the models' analyses.  \nFinally, **figures** stores the results of maps and plots calculated during the process.\n\nYou can also download all of the notebooks in one PDF file [here](https://github.com/GeoDaCenter/spatial_access/tree/master/docs/notebooks/spatial_access_documentation081219.pdf).\n\n### Overwriting default configuration values\np2p provides default configuration values for edge weights and node impedance (see spatial_access/configs.py).\nYou can overwrite these as follows:\n```\nfrom spatial_access.p2p import TransitMatrix\nfrom spatial_access.Configs import Configs\ncustom_config = Configs()\n# set fields of custom_cofig\ntm = TransitMatrix(..., configs=custom_config)\n# continue with computation\n```\n\nMaintainance\n---\n\n### Instructions for building locally (only for developers):\n\n- Additional requirements: `cython` and `jinja2`\n- To regenerate .pyx files, run: `bash cythonize_extension.sh` (TravisCI will do this automatically on deployment)\n- To install locally, run: `sudo python3 setup.py install ` from spatial_access root directory\n- Unit tests require the `pytest` package. From package root directory, run `python3 -m pytest tests/` to run all unit tests.\n\n### PyPi Maintenance\nThe package lives at: `https://pypi.org/project/spatial-access/`\n\nWhen a branch is pulled into Master and builds/passes all unit tests,\nTravis CI will automatically deploy the build to PyPi.\n\n\nTo update PyPi access credentials, see .travis.yml and follow the instructions at https://docs.travis-ci.com/user/deployment/pypi/\nto generate a new encrypted password.\n\n\n### Installing Ubuntu 18 LTS with dependencies from scratch (recommended for Windows users)\n\n1. Follow the instructions at this link: https://linus.nci.nih.gov/bdge/installUbuntu.html to set up a virtual machine\n2. `sudo apt-get update`\n3. `sudo add-apt-repository universe`\n4. `sudo apt-get -y install python3-pip`\n5. Continue with Installation Instructions (above)\n\n### Questions/Feedback?\n\nspatial@uchicago.edu\n\n### Acknowledgments\n\nDeveloped 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.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGeoDaCenter%2Fspatial_access","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FGeoDaCenter%2Fspatial_access","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGeoDaCenter%2Fspatial_access/lists"}