Skip to content

Commit

Permalink
hybrid brat project type
Browse files Browse the repository at this point in the history
  • Loading branch information
jtgilbert authored and philipbaileynar committed Nov 14, 2024
1 parent 7bc2bbc commit 39a5001
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 6 deletions.
26 changes: 26 additions & 0 deletions lib/riverscapes/riverscapes/projectTypeTool/projectTypes.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,32 @@
"machineName": "BRAT",
"state": "ACTIVE"
},
{
"name": "Riverscapes Beaver Restoration Assessment Tool (BRAT)",
"summary": "The hybrid channel network/riverscape network Beaver Restoration Assessment Tool (sqlBRAT)",
"description": "The [Beaver Restoration Assessment Tool](https://tools.riverscapes.net/brat) combines a model estimating the capacity of a riverscape to support dam building activity with analysis of potential anthropogenic conflicts to create a tool that can be used to inform where [LTPBR restoration](http://lowtechpbr.restoration.usu.edu/) using beaver can be targeted.",
"meta": [
{
"key": "Resolution",
"value": "Reach"
},
{
"key": "Extent",
"value": "Network"
},
{
"key": "Model Status",
"value": "Production Grade"
},
{
"key": "Riverscapes Project Class",
"value": "Model Output"
}
],
"url": "https://tools.riverscapes.net/brat",
"machineName": "Riverscapes_BRAT",
"state": "ACTIVE"
},
{
"name": "CAD Export - CHaMP",
"summary": "Raw Topographic Survey Data Export",
Expand Down
2 changes: 1 addition & 1 deletion packages/brat/database/data/DamOpportunities.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OpportunityID,Name
1,Conservation/Appropriate for Translocation
2,Encourage Beaver Expansion/Colonization
3,Appropriate for BDAs
3,Appropriate for Beaver Mimicry
4,Address Resource Limitations
5,Potential Floodplain/Side Channel Opportunities
6,Natural or Anthropogenic Limitations
6 changes: 6 additions & 0 deletions packages/brat/database/data/ReachCodes.csv
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,15 @@ ReachCode,Name,DisplayName,Description
42814,PIPELINE,Pipeline,Product|water; Pipeline Type|general case
42815,PIPELINE,Pipeline,Product|water; Pipeline Type|penstock
42816,PIPELINE,Pipeline,Product|water; Pipeline Type|aqueduct
42820,PIPELINE,Pipeline,Product|water; Pipeline Type|stormwater; Relationship to Surface|null
42821,PIPELINE,Pipeline,Product|water; Pipeline Type|stormwater; Relationship to Surface|at or near
42822,PIPELINE,Pipeline,Product|water; Pipeline Type|stormwater; Relationship to Surface|elevate
42823,PIPELINE,Pipeline,Product|water; Pipeline Type|stormwater; Relationship to Surface|underground
42824,PIPELINE,Pipeline,Product|water; Pipeline Type|stormwater; Relationship to Surface|underwater
46000,STREAM/RIVER,Stream,feature type only: no attributes
46003,STREAM/RIVER,Intermittent,Hydrographic Category|intermittent
46006,STREAM/RIVER,Perennial,Hydrographic Category|perennial
46007,STREAM/RIVER,Ephemeral,Hydrographic Category|ephemeral
46800,DRAINAGE LINE,Drainage Line,feature type only: no attributes
55800,ARTIFICIAL PATH,Artificial Path,feature type only: no attributes
56600,COASTLINE,Coastline,feature type only: no attributes
2 changes: 1 addition & 1 deletion packages/brat/sqlbrat/brat.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def brat(huc: int, hydro_flowlines: Path, hydro_igos: Path, hydro_dgos: Path,

project_name = f'BRAT for HUC {huc}'
project = RSProject(cfg, output_folder)
project.create(project_name, 'BRAT', [
project.create(project_name, 'Riverscapes_BRAT', [
RSMeta('Model Documentation', 'https://tools.riverscapes.net/brat', RSMetaTypes.URL, locked=True),
RSMeta('HUC', str(huc), RSMetaTypes.HIDDEN, locked=True),
RSMeta('Hydrologic Unit Code', str(huc), locked=True),
Expand Down
2 changes: 1 addition & 1 deletion packages/brat/sqlbrat/brat_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def __init__(self, database, report_path, rs_project):
'Negligible Risk': '#a5a5a5',
'Conservation/Appropriate for Translocation': '#00a800',
'Encourage Beaver Expansion/Colonization': '#00c5ff',
'Appropriate for BDAs': '#e6cc00',
'Appropriate for Beaver Mimicry': '#e6cc00',
'Address Resource Limitations': '#895d40',
'Natural or Anthropogenic Limitations': '#b9b9b9',
'Potential Floodplain/Side Channel Opportunities': '#1111e5',
Expand Down
6 changes: 3 additions & 3 deletions packages/brat/sqlbrat/utils/conservation.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,14 +207,14 @@ def calc_opportunities(opportunities: dict, risks: dict, risk_id: float, reachco
else:
if occ_ex > 10:
if ipc_highlu >= 25:
return opportunities['Appropriate for BDAs']
return opportunities['Appropriate for Beaver Mimicry']
else:
return opportunities['Encourage Beaver Expansion/Colonization']
elif occ_ex >= 5 and occ_ex < 10:
if ipc_highlu >= 25:
return opportunities['Natural or Anthropogenic Limitations']
else:
return opportunities['Appropriate for BDAs']
return opportunities['Appropriate for Beaver Mimicry']
else:
if ipc_highlu >= 25:
return opportunities['Natural or Anthropogenic Limitations']
Expand All @@ -240,7 +240,7 @@ def calc_opportunities(opportunities: dict, risks: dict, risk_id: float, reachco
if ipc_highlu >= 25:
return opportunities['Natural or Anthropogenic Limitations']
else:
return opportunities['Appropriate for BDAs']
return opportunities['Appropriate for Beaver Mimicry']
else:
return opportunities['Natural or Anthropogenic Limitations']
else:
Expand Down

0 comments on commit 39a5001

Please sign in to comment.