Skip to main content

Mapping the annual UK Scout Census to local geographies

Project description

Incognita

Python Versions Status PyPI Latest Release Conda Latest Release License Code style: black

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!

Where to get it

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:

Installing geopandas on Windows:

We strongly recommended using conda to install Incognita.

However, to install geopandas using pip on Windows, please follow these instructions.

Dependencies

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
  • dash - for simple web-apps

JavaScript dependencies are:

Getting Started:

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

Generating the data file

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.

Directory Structure:

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

Resources:

Postcode Directory:

API endpoints:

To find API endpoints, find a geography from the below resources and click on the API Explorer tab. ``

Shapefiles:

Administrative/Electoral Geographies:

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

Census Geographies:

England and Wales:
Scotland:
Northern Ireland:

Single year of age profiles:

Westminster Parliamentary Constituencies:

Other useful data sources

Guide:

The Beginner's Guide to UK Geography can be useful as an introduction for those new to GIS.

Branches

The heroku branch is specifically for the heroku application: http://scout-mapping.herokuapp.com. It contains a cut down requirements file to ensure that it loads into heroku correctly.

License

Incognita is naturally open source and is licensed under the MIT license.

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

incognita-0.28.0.tar.gz (38.5 kB view details)

Uploaded Source

Built Distribution

incognita-0.28.0-py3-none-any.whl (43.0 kB view details)

Uploaded Python 3

File details

Details for the file incognita-0.28.0.tar.gz.

File metadata

  • Download URL: incognita-0.28.0.tar.gz
  • Upload date:
  • Size: 38.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.3.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for incognita-0.28.0.tar.gz
Algorithm Hash digest
SHA256 fdff6d46108ff630449336e4d3134f883a687cdc426383bca202284c1eb04ed2
MD5 b526a393a95030863acb72cb4a843573
BLAKE2b-256 a7db1c28a3432d9da98254ca67afbda6b4919ba04f3b1f722f582dc1909dc942

See more details on using hashes here.

File details

Details for the file incognita-0.28.0-py3-none-any.whl.

File metadata

  • Download URL: incognita-0.28.0-py3-none-any.whl
  • Upload date:
  • Size: 43.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.3.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for incognita-0.28.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2ecdbebaf3d70213ec6644078014961ec89dbc02ecc688ac4c37719786856d03
MD5 a5f45110411c29b0c36eface2583037f
BLAKE2b-256 c2a05c77a555b1094bdc7de2f5bd8f51ccddf8bdbbdff7eea761d23b1c7fe1c2

See more details on using hashes here.

Supported by

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