Incognita is a tool to map UK Scout data and enable geospatial analysis.
We use ONS open data to link scout areas (Groups, Districts, etc.) to UK administrative geographies.
Incognita comes from Terra Incognita, or Parts Unknown - solving the known unknowns!
The source code for the project is hosted on GitHub at the-scouts/incognita
We strongly recommended using conda
to install Incognita, however pip
can be used with a number of manual installation steps as below.
To install Incognita with Conda, run the following commands in the terminal
# conda
conda env create -n incognita_env
conda activate incognita_env
conda install --channel conda-forge geopandas
# or PyPI
pip install incognita
If installing with pip
, you will need to manually install geopandas and its
dependencies. Please follow below:
We strongly recommended using conda
to install Incognita.
However, to install geopandas using pip on Windows, please follow these instructions.
This project is written and tested in Python 3.9, and depends on:
- geopandas, pandas - for (geospatial) data transformation and arrangement
- shapely, pygeos - for manipulation and analysis of geometric objects
JavaScript dependencies are:
- Leaflet.js - for slippy maps
- chroma.js - for choropleth colour scales
You will need to obtain the latest version of the ONS Postcode Directory. Note that this has some open licences attached to it.
If this is not May 2018, then you will need to create another child class of
ONSPostcodeDirectory in ONS_data.py
You will need to populate the settings.json file with the appropriate file paths
To generate the datafile needed for most operations, run setup_data_file.py
with clean prototype extract.
You may also run setup_reduce_onspd.py
to produce a smaller ONS Postcode
Directory file to speed up lookup operations and reduce memory consumption.
To run Incognita locally, you will need to create a data folder as below, and populate it with the ONS Postcode Directory files and a copy of the Scout Census extract.
- data/
- ONS_PD_DATE/
- Scout Census Data/
- Census Extract Files
- Latest ONS Postcode Directory
To find API endpoints, find a geography from the below resources and click on
the API Explorer
tab.
``
Use the same boundary resolution for each of the following (BFE, BFC, BGC, BUC)
BFE: Full Extent of the Realm; BFC: Full Extent Clipped; BGC: Generalised Clipped; BSC: Super Generalised Clipped
- Local Authority Districts Boundaries UK BGC
- Counties and Unitary Authorities Boundaries UK BGC
- Wards Generalised Clipped Boundaries UK
- Westminster Parliamentary Constituencies UK BGC
- Data Zones
- Intermediate Geographies
The Beginner's Guide to UK Geography can be useful as an introduction for those new to GIS.
Incognita is naturally open source and is licensed under the MIT license.