https://github.com/alan-turing-institute/spatial-inequality
Science Score: 23.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
1 of 3 committers (33.3%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.5%) to scientific vocabulary
Keywords
Repository
Basic Info
Statistics
- Stars: 9
- Watchers: 4
- Forks: 2
- Open Issues: 32
- Releases: 4
Topics
Metadata Files
README.md
spatial-inequality
Repository for the Spatial Inequality in the Smart City project.
Papers and Publications
If you're looking for the scripts used to generate the figures in the paper "Optimising for equity: Sensor coverage, networks and the responsive city", please go to the OptimisingForEquity directory.
Pre-requisites
Setup
Clone the repo:
shell git clone https://github.com/alan-turing-institute/spatial-inequality.gitChange to the
spatial-inequalitydirectory:shell cd spatial-inequalityCreate the conda environment:
conda env createActivate the environment:
conda activate spatial-inequality
API
Start the API
bash
docker-compose up
Should then be available on 0.0.0.0:5000
Command to force a rebuild if something hasn't udpated correctly:
bash
docker-compose up --build --force-recreate
Submitting Optimisation Jobs with SocketIO
Generate a pseudo-optimised network of sensors with a greedy algorithm. See scripts/client.py for an example.
Submit an optimisation job:
- Client emits event
submitJobwith data{"n_sensors": 10, "theta": 500} - Server emits event
jobwith job data. - On job completion, server emits
jobFinishedwith job_id and result. - Optionally can give the following parameters with
submitJob: min_age: Minimum age to include for population coverage (default: 0)max_age: Maximum age to include for population coverage (default: 90)population_weight: Weight for population coverage (default: 1)workplace_weight: Weight for place of work coverage (default: 0)
- Client emits event
Retrieve the result/status of a job:
- Client emits event
getJobwith data<the_job_id> - Server emits event
jobwith job data.
- Client emits event
Get a list of available job IDs:
- Client emits event
getQueue - Server emits event
queuewith queue data.
- Client emits event
Remove a job from the queue:
- Client emits event
deleteJobwith data<the_job_id> - Server emits event
messagewith deletion result.
- Client emits event
Remove all jobs from the queue:
- Client emits event
deleteQueue - Server emits event
messagewith deletion result.
- Client emits event
Coverage Endpoint
The /coverage endpoint computes coverage for a user-defined network (set of sensors placed at output area centroids), and takes a JSON with the following format:
json
{
"sensors": ["E00042671","E00042803"],
"theta": 500,
"lad20cd": "E08000021"
}
where theta and lad20cd are optional and take the values above by default, but sensors must be defined and takes a list of oa11cd codes that have sensors in them.
It should return a JSON with this structure:
json
{
"oa_coverage":[
{"coverage":0.6431659719289781,"oa11cd":"E00042665"},
...,
],
"total_coverage": {
"pop_children":0.0396946631327479,
"pop_elderly":0.024591629984248815,
"pop_total":0.059299090984356984,
"workplace":0.0947448314996531
}
}
Dependencies
The dockerised version of the code used for the API uses only pip and the packages in requirements.txt. This doesn't include some plotting and optimisation libraries included in the conda environment.
Owner
- Name: The Alan Turing Institute
- Login: alan-turing-institute
- Kind: organization
- Email: info@turing.ac.uk
- Website: https://turing.ac.uk
- Repositories: 477
- Profile: https://github.com/alan-turing-institute
The UK's national institute for data science and artificial intelligence.
GitHub Events
Total
Last Year
Committers
Last synced: over 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| Jack Roberts | j****s@t****k | 183 |
| David Herbert | 4****2 | 2 |
| HackMD | n****y@h****o | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: over 1 year ago
All Time
- Total issues: 37
- Total pull requests: 20
- Average time to close issues: 3 months
- Average time to close pull requests: 12 days
- Total issue authors: 3
- Total pull request authors: 3
- Average comments per issue: 0.41
- Average comments per pull request: 0.6
- Merged pull requests: 13
- Bot issues: 0
- Bot pull requests: 4
Past Year
- Issues: 0
- Pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- jack89roberts (35)
- davidherbert2 (1)
- lukasbeuster (1)
Pull Request Authors
- jack89roberts (16)
- dependabot[bot] (4)
- davidherbert2 (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- mambaorg/micromamba latest build
- redis latest
- alpine 3.8 build
- 156 dependencies