Skip to content

Commit

Permalink
readme from blog
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrewwango committed Jun 24, 2024
1 parent e3f4444 commit c9cbd22
Showing 1 changed file with 57 additions and 23 deletions.
80 changes: 57 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,56 +1,90 @@
# Land access research: reclaiming public rights of way using public data
A land access research project to automatically analyse all footpaths in England and Wales to reclaim public rights of way (PRoW) using analysis of public GPX traces.

The code in this repository performs analysis of public GPX data and rights of way in England and Wales. See the outputs of the analysis here:
Check out the [online map here](https://andrewwango.github.io/prow-map/), which shows GPS activity recorded by the public in Bedford and Central Bedfordshire up to 2013.

- Article published on earth.org: [Why Improving UK Land Access Rights Is Important For A More Sustainable Outdoors](https://earth.org/data_visualization/uk-land-access-rights/).
- Blog post: [Land access research: discovering lost rights of way using public data](https://andrewwango.github.io/prow_ml/)
- [Interactive web-app](https://andrewwango.github.io/prow-web-app)
[![](https://img.shields.io/badge/🗺️-Online%20map-blue)](https://andrewwango.github.io/prow-map/)
[![](https://img.shields.io/badge/GitHub-Code-green?logo=GitHub)](https://github.com/Andrewwango/prow-map)
[![](https://img.shields.io/badge/🌐-Published%20article-blue)](https://earth.org/data_visualization/uk-land-access-rights/)

To run your own analysis, see the [demo notebook](demo.ipynb).

## Problem statement
## Background

> The majority of the English countryside is out of bounds for most of its population. 92% of the countryside and 97% of rivers are off limits to the public.
_From [Right to Roam](https://www.righttoroam.org.uk/)._

The aim of this project is to produce a map highlighting private paths which have public recorded GPS activity in England and Wales. This will involve comparing public rights of way (PRoW) with public recorded GPS activity data automatically and comprehensively. This data can be used to support applications to reclaim or create new public rights of way which are currently based on manually collected historical and anecdotal data.
We need to reclaim paths for the public, by identifying paths that should be rights of way. Why?

For further background read my blog post [Land access research: discovering lost rights of way using public data](https://andrewwango.github.io/prow_ml/).
> A 'Right of Way', often called a highway, exists if there is 'a public right to to pass and re-pass along a defined route'. It is a legal term for land that is accessible for the public even if it crosses private land.
> The 2000 Countryside and Rights of Way Act, states that Surveying Authorities (an authority in charge of a Definitive Map and Statement of Public Rights of Way) will no longer be able to accept applications to register historical routes after the 31st December 2025. There are many footpaths, bridleways and byways that remain unregistered: some estimates suggest 1000s of kilometers of footpath are at risk. The race is on to record the nation’s unregistered routes before the 1st of January 2026. After this date, unregistered Public Rights of Way will be lost forever.
## Caveats
_From [Right of Way Research](https://rowresearch.coventry.domains/). See [examples](https://rowresearch.coventry.domains/blog-2/)._

1. Roadside cycleways and pavements are included as non-rights of way, but should be accepted as public. _Note that this means that not all highlighted paths actually represent "trespass"_
2. All paths in open access land and other public land should be accepted as public.
5. All analysed paths are limited to paths which appear on the OSM network.
The Ramblers are tackling this by creating a [map of public rights of way that may have been lost](https://dontloseyourway.ramblers.org.uk/):

> We've searched all of England and Wales and found over 49,000 miles of paths that could be lost forever, unless we come together to save them.
> Our paths are one of our most precious assets, hidden in plain sight, and often taken for granted, they allow everyone to enjoy the countryside, both on our doorstep and across Britain’s iconic landscapes.
> With the help of thousands of volunteers we searched all of England and Wales and found over 49,000 miles of paths which could be lost forever. Time is running out, with only five years left to collect the historical, documentary evidence needed to build and submit applications to restore the most important paths for future generations.
_From [Ramblers](https://www.ramblers.org.uk/get-involved/campaign-with-us/dont-lose-your-way-2026.aspx). Watch [this talk](https://www.youtube.com/watch?v=N0oSG4iEy0Q&list=PLJsLOysi1d5Ebb_Gxvk1Kuck5dYD6P0HW) for an excellent explanation of the injustice and their work._

## Reclaiming public rights of way using public data

A more systematic data-driven approach is to use data of publicly-recorded GPS traces, for example from walking, running or cycling, which can expose potential paths of interest. We disregard any legal or historical information: **if the public are using the path, it should be a right of way**. This approach is desirable, since it is:

- Centered around how the public are interacting with paths.
- Automated and comprehensive: it is extremely easy to scale to analysing the whole country.

It also can complement the [aims of the Ramblers project](https://www.ramblers.org.uk/get-involved/campaign-with-us/dont-lose-your-way-2026/how-the-ramblers-are-working-to-save-lost-paths.aspx):
- To prioritise those paths which add the most benefit for people by highlighting high-activity areas.
- Supplement historical evidence with data about how well-used the paths actually are.

Additionally, this can also achieve the exact inverse of the main aim: to find paths that are currently rights of way but are not being used by the public: overgrown paths and barbed wire.

## Datasets

- **Public data**: A good source of public GPS activity (e.g. walking, cycling, driving) is provided by the OpenStreetMap (OSM) [API](https://wiki.openstreetmap.org/wiki/API_v0.6#GPS_traces), which delivers anonymised tracks in a given region. We use an [agglomerated dump of this data](http://zverik.openstreetmap.ru/gps/files/extracts/europe/great_britain/index.html) from 2013 to speed up data download. In future it would be nice to use a more modern source such as [Strava Metro](https://metro.strava.com/).
- **Public data**: A good source of public GPS activity (e.g. walking, cycling, driving) is provided by the OpenStreetMap (OSM) [API](https://wiki.openstreetmap.org/wiki/API_v0.6#GPS_traces), which delivers anonymised tracks in a given region. We use an [agglomerated dump of this data](http://zverik.openstreetmap.ru/gps/files/extracts/europe/great_britain/index.html) from 2013 to speed up data download.

- **Right of Way data**: A dataset of public rights of way from the definitive maps of each authority is kindly shared [here](https://www.rowmaps.com/) in one convenient API. Currently data for 121 authorities in England and Wales is available, see [here](https://www.rowmaps.com/gpxs/).

- **Base path network**: A comprehensive path network, onto which the above datasets are overlaid, is available from OSM. This includes all public and private paths that have made it onto [OSM](openstreetmap.org/). A dataset containing only paths (and not roads) is downloaded using [OSMNX](https://osmnx.readthedocs.io).
- **Base path network**: A comprehensive (private and public) path network, onto which the above datasets are overlaid, is available from [OpenStreetMap](openstreetmap.org/).

## Algorithm

The aim here is to combine the data detailing public usage of paths with the PRoW data into a single geodataset of paths to be displayed. The algorithm is easily run for all regions of England and Wales.

1. Map-match public GPS dataset and PRoW dataset to OSM path network using `osmnx`, to remove traces that are spurious or on highways.
2. Join path datasets using `geopandas`. Label paths with measure of "activity".
1. Map-match public GPS dataset and PRoW dataset to OSM path network using [`osmnx`](https://osmnx.readthedocs.io), to remove traces that are spurious or on highways.
2. Join path datasets using `geopandas`. Label paths with agglomerated measure of "activity".
3. Filter and smooth using `networkx`.
4. Query paths with non-zero activity but are not RoW from geodataset. Render colour-coded paths over an OSM map using `folium`.
4. Query paths with non-zero activity but are not RoW from geodataset. Render colour-coded paths over an OSM map using `leaflet.js`.

Find the code on [GitHub](https://github.com/Andrewwango/prow-map) and try running your own analysis with the [demo notebook](https://github.com/Andrewwango/prow-map/demo.ipynb).

## Limitations and extensions

1. Roadside high-activity paths should be removed.
2. Paths on open access land should be removed.
3. Close path segments should be linked.
4. A newer source of data should be used, such as [Strava Metro](https://metro.strava.com/).
5. All analysed paths are limited to paths which appear on the OSM network.
6. Anonymised data means it's harder to track how and when the public are using the paths.
7. Further geospatial analysis or machine learning using features from OSM IDs.

## Ethical considerations
All input public data is anonymised and untraceable as per the OSM API.



## Repo folder structure
```
data
|____osmnx (data download folder for OSM base path network)
|____public (data download folder for public GPS data)
|____row (data download folder for rights of way data)
docs (online map website folder)
|____geojsons (outputs for plotting on map website)
output (output graphs and HTML maps from analysis)
prow (Python module for analysis code)
|____utils (helper functions for analysis)
```

## Ethical considerations
All input public data is anonymised and untraceable as per the OSM API.
```

0 comments on commit c9cbd22

Please sign in to comment.