wee-forest

Mapping trees of the United Kingdom, using Mapbox, TypeScript, Geopandas and data from UK's National Forest and Ancient Woodland Inventories.

https://github.com/mneveroff/wee-forest

Science Score: 13.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
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.4%) to scientific vocabulary

Keywords

biodiversity forestry geopandas geospatial mapbox typescript uk

Keywords from Contributors

projection interactive serializer measurement cycles packaging charts network-simulation archival shellcodes
Last synced: 6 months ago · JSON representation

Repository

Mapping trees of the United Kingdom, using Mapbox, TypeScript, Geopandas and data from UK's National Forest and Ancient Woodland Inventories.

Basic Info
  • Host: GitHub
  • Owner: mneveroff
  • License: mit
  • Language: Jupyter Notebook
  • Default Branch: main
  • Homepage: https://weeforest.org/lens
  • Size: 75 MB
Statistics
  • Stars: 8
  • Watchers: 1
  • Forks: 0
  • Open Issues: 17
  • Releases: 0
Topics
biodiversity forestry geopandas geospatial mapbox typescript uk
Created almost 2 years ago · Last pushed over 1 year ago
Metadata Files
Readme License

README.md

WeeForest Lens Cover Image

Mapping trees of the United Kingdom

🗺️ Interactive map: WeeForest Lens
🌐 Website: WeeForest
🔬 Methodology & Findings: Research

Disclaimer

This work is not indented to be a piece of scientific research, nor is it a journalistic piece. It's a personal project that aims to make the data about trees in Great Britain more accessible and understandable, whilst still maintaining good industry practices.

I do not claim accuracy, expertise or authority in the field. I am, however, passionate about data, distraught about the state of biodiversity in the UK and want to see it improved, and firmly believe that the first step to get there is helping others see the issues I observed. - Mike Neverov, 2024

Inspiration

On one of the drives across the Scottish Highlands I have noticed rows of what seemed like rocks left on the hillsides around us, next to lush and orderly rows of conifers. Puzzled and back home I looked up the area on satellite maps and after a few minutes of searching discovered the reality of forestry industry in the UK.

Being already rather sad about the overall state of biodiversity on the British Isles I wanted to learn where can I find the "real trees" that I could visit or enjoy driving by. I quickly learned that only a fraction of Scottish (and British for that matter) woodlands are native, and of the "woodland" reported by Forestry Commission's National Forest Inventory, almost 20% or some 600,000 ha are currently Felled and Barren, devoid if any visible vegetation as of 2022.

This lack of transparency in definition has prompted me to visualise it, which led me on a spiral of data collection, methodology analysis and learning about the evolution of definition of "woodland", "native trees", "trees outside woods" and other relevant terms in the UK tree-related discourse.

Structure of this repository

This repository combines three distinct components:

  • Data analysis and processing carried out via Python and Jupyter Notebooks. Data processing, MBTiles generation, area calculation and experiments reside there. Visit the relevant readme for details.
  • Lens - folder with the map viewer application, tasked with visualising the data, providing frontend and user interaction. Details of setting it up are documented within.
  • Research folder, containing files and references to various pieces of information, methodology, analysis and sources used in the project. Most justifications and observations regarding source data and it's aggregation will be found there.

Separately there's a docker folder with a sample docker compose configuration and some other configuration files in the root of the solution.

All of the relevant documentation and instructions are available in respective folders, please refer to them for more information.

Installation

As this repository doesn't have neither raw nor processed data attached, you would need to perform a few steps to get the .mbtiles and .parquet files used in area visualisation calculation:

  1. Clone the repository.
  2. Configure VSCode to run Jupyter Notebooks by installing Python, Jupyter and Polyglot Notebooks extensions.
  3. Configure the git filter to remove Notebook outputs: git config filter.strip-notebook-output.clean 'jupyter nbconvert --ClearOutputPreprocessor.enabled=True --to=notebook --stdin --stdout --log-level=ERROR'.
  4. Run the AWI Notebook after downloading the data from the Sources section within - this will generate the Ancient Woodland Inventory data.
  5. Run the NFI Notebook after downloading the data from the Sources section within - this will generate the National Forest Inventory data.
  6. Run the Overlay Notebook, to completion - this will overlay both datasets and produce the overlay data.
  7. Run the Area Calculation Notebook to completion - generating the point datasets for area calculation.
  8. Finally, run the MBTiles Notebook to generate the .mbtiles files for the map, 23 in total, around 4.5GB total size.
  9. Set up the .env file in the lens directory, following the instructions in the lens readme.
  10. With everything done, you should be able to run the dev server via npm run dev, or production in docker via npm run docker: build in lens and docker-compose up in docker folders, assuming .env files were set up correctly. First few minutes will be spent generating indexes so the area calculation might be unresponsive.

Contributing

Contributions are encouraged and welcome. The project roadmap, ideas, bugs and issues are tracked in the Project.

Currently we'd be especially grateful for help with:

  1. Better MBTiles generation, achieving a smooth and equal distribution across all zoom levels, with lower .mbtiles file sizes and better performance.
  2. Satellite basemap creation for each of the dataset years, allowing to add contextual satellite imagery.
  3. Reimplementing Mapbox styles with terrain and hillshading using open data, which would allow to move to maplibre-gl completely.
  4. Help with data access, especially the TOW and hedges geospatial datasets.
  5. Assistance expanding the coverage to other countries.

Consult the relevant project (Data, Lens, Research) for a more detailed list if ideas and priorities.

Acknowledgements

I want commend following organisations and people, for without their work this project would not be possible:

  • People of the National Forest Inventory and Forestry Commission for providing the data and making it available to the public, including woodland, ecological condition and trees outside woodland datasets.
  • The Native Woodland Survey of Scotland team for the best piece of native woodland research and mapping in the UK to date.
  • Various maintainers and contributors to the Ancient Woodland Inventories.

Separately, want to extend my thanks to:

  • Mykhailo Matviiv for allowing my to bounce ideas off him and brainstorming certain performance improvements

Owner

  • Name: Mike Neverov
  • Login: mneveroff
  • Kind: user
  • Location: Scotland, United Kingdom

Tech Lead / Senior Software Engineer

GitHub Events

Total
Last Year

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 13
  • Total Committers: 2
  • Avg Commits per committer: 6.5
  • Development Distribution Score (DDS): 0.308
Past Year
  • Commits: 4
  • Committers: 1
  • Avg Commits per committer: 4.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
MNeverOff m****e@n****v 9
dependabot[bot] 4****] 4
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 16
  • Total pull requests: 5
  • Average time to close issues: N/A
  • Average time to close pull requests: about 7 hours
  • Total issue authors: 1
  • Total pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 4
  • Bot issues: 0
  • Bot pull requests: 5
Past Year
  • Issues: 0
  • Pull requests: 5
  • Average time to close issues: N/A
  • Average time to close pull requests: about 7 hours
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 4
  • Bot issues: 0
  • Bot pull requests: 5
Top Authors
Issue Authors
  • MNeverOff (16)
Pull Request Authors
  • dependabot[bot] (9)
Top Labels
Issue Labels
documentation (1)
Pull Request Labels
dependencies (9)

Dependencies

.github/workflows/docker-image.yml actions
  • actions/checkout v2 composite
  • actions/setup-node v2 composite
  • docker/login-action v3 composite
Dockerfile docker
  • node 20 build
docker/docker-compose.yml docker
  • wee-forest-lens latest
lens/package-lock.json npm
  • 459 dependencies
lens/package.json npm
  • @types/mapbox-gl ^3.1.0 development
  • concurrently ^8.2.2 development
  • nodemon ^3.1.0 development
  • dotenv ^16.4.5
  • duckdb ^0.10.1
  • esbuild ^0.20.2
  • events ^3.3.0
  • express ^4.19.2
  • express-rate-limit ^7.2.0
  • http-proxy-middleware ^2.0.6
  • lit ^3.1.2
  • lit-html ^3.1.2
  • mapbox-gl ^3.2.0
  • mapbox-gl-compare ^0.4.1
  • tileserver-gl-light ^4.10.3