Riverscapes / riverscapes-tools

Open-source Python 3.0 tools for the Riverscapes organization
https://tools.riverscapes.net/
GNU General Public License v3.0
10 stars 8 forks source link

UK BRAT - Scope merging back into sqlBRAT #35

Open joewheaton opened 4 years ago

joewheaton commented 4 years ago

Hugh Graham (@h-a-graham) just published the UK BRAT or BDC (beaver dam capacity) model and a new BFI (beaver foraging index). Both are based off of the pyBRAT.

Graham et al. - 2020 - Modelling Eurasian beaver foraging habitat and dam.pdf

All of @h-a-graham source code can be found at https://github.com/h-a-graham/Graham_et_al._in_review_Supporting-Information

The Task

First we should take a look at this and scope what it would take to:

This will all take $$ but I'd like to scope it and get a meeting together with @h-a-graham, Allan Puttock and Richard Brazier to discuss seeking funding. As a teaser, here's a UK wide run they're working on (provisional): England_BDC

h-a-graham commented 4 years ago

Hello All,

Thanks Joe for setting up the issue, I'd love to contribute here to merge the project back together again. The repo that Joe has shared is the version used for the paper which does still have a sprinkling of arcpy in there but I was having some issues when using this version nationally so I have since moved to this workflow:

[https://github.com/h-a-graham/BDC_V1.2 ]

Here, the BDC part of the project uses only open source tools but could do with some consolidation - currently moves between python R and GRASS. The Forgaing index (here named habitat index) does still contain some arcpy stuff but could be removed very easily. Mostly, the geospatial functionality uses geopandas and rasterio...

On your points Joe...

Integrate the UK BDC into sqlBRAT Yes very keen to do so - I'll take a look through how sqlBRAT works and think about how we could merge.

Run BRAT with the UK and European data sources highlighted in paper This can be done - only thing that I would be cautious of is that a few of the data sources we used are not open source although they are all free for academic use. Here I'd like to explore the develpoment of an open Forging Index using sentinel data - Now we have a working index I believe this would work as a good benchmark/validation dataset.

A couple of other thoughts - I assume you use a USGS stream network which is free to access? the one used in the GB version is excellent but Ordnance Survey have very restrictive use for this. I'm keen to look at alternatives such as Open Maps which also then, like using sentinel data for the BFI, allows us to run things across Europe.

Also, on the subject of Europe, For the estimation of river flow - we are using an API for the gauging network in GB (This is where R is used as someone made a nice package for the API - but it could be called from Python with some tinkering). However, this isn't scalable across Europe - Do you still use the USGS gauging network to derive this esimtate - I was wondering if some kind of large scale rainfall-runoff model may enable a larger scale approach (though this would also add major complexity).

Build a UK Riverscapes Context project from those data sources and a UK National Model Sounds sensible - where is the US version for this based and I can think about how to replicate the style.

Integrate the BFI as something that can run anywhere BRAT runs. Probably covered by the point above...

Keen to set up a meeting to discuss the nitty gritty of this - I'll drop Alan and Rich a message to pin down a time.

A question for you on this: How do you see this toolset being used - are you developing a python package/QGIS extension or something else? (haven't had a chance to delve into the code yet so apologies if this was an obvious question!)

Cheers and looking forward to working with you all on this.

joewheaton commented 4 years ago

Hey @h-a-graham, thanks for detailed responses on all this. I look forward to what @philipbaileynar and @wally-mac have to say too. As you say, we can discuss nitty gritty when we pin down time.

In response to:

A question for you on this: How do you see this toolset being used - are you developing a python package/QGIS extension or something else? (haven't had a chance to delve into the code yet so apologies if this was an obvious question!)

Right now sqlBRAT is in a beta version of a production grade tool. By contrast, the old pyBRAT was an operational grade tool (see this report card).

The vision is best described at this point in the developer intent part of that record. Essentially, we're working on getting BRAT to commercial grade where users can engage with outputs in webGIS or download riverscape projects. We're skipping (at this point) over a professional grade tool as a QGIS Plugin, stand alone or ArcGIS tool as reaching an audience of GIS users is a lower priority. Most people that want to interact with tool, want to engage with outputs, maybe tweak something here or there, and are not power GIS users that would be running the model. Anyhow, that can be done too, but is not the current focus (just $$$). I look forward to chatting through how to tackle some of this.

philipbaileynar commented 4 years ago

sqlBRAT was conceived and architected with the specific goal of making it easy to implement in jurisdictions other than North America. All references to US terms like "HUC" and "FCode" were removed. All lookup data were centralized into a simple relational database that should be easy to document and teach others how to populate with their own information (vegetation types, hydrologic formulas etc).

I am keen to meet with the UK team and learn more about their foraging model enhancement. I have high confidence that it should be straightforward to integrate into sqlBRAT.

Next logical step seems like a web meeting to raise each others understanding of our respective enhancements.