Closed corviday closed 10 months ago
Good call on the linting. I suggest a separate PR (not needing review probably) for linting, each time the project overall needs it. Minor linting can be incorporated in larger PR's of course.
And a question about either data or logic: In the demo, if I select any basin, the watersheds available are always the same. Basin does not affect that selector. Ditto for CU. Is that intended?
Oops, no! I will look into that.
Hm, it is working "correctly" for me; selecting different basins shows different watersheds and conservation units. Could you perhaps clear your cache and try again, and if it is still not working, see if there are any error messages in the console you can send me?
Cleared cache, now watersheds for each basin are mostly disjoint. Fraser and Skeena basins share at least Babine Lake and Babine River watersheds. But they are adjacent and I suspect the polygons overlap in an unfortunate way and that this is a data problem not a logic problem.
That said, the need to clear cache will have to be eliminated at some point. Users won't know to do that.
Some 500 errors occur from time to time in the console (and network, of course) log. I can't quite figure out what is provoking them but suspect that invalid or insufficient arguments are being provided to the endpoints. Which are, so far,
This might not be a thing you need to address immediately.
The third is a known data issue - it's trying to find the path from the Fraser watershed to the sea, but of course the Fraser watershed terminates at the sea; there's no path. That's a database fix I haven't made yet.
The previous two are more surprising, those should be valid requests, and both work for me. Hm. That backend throws 500s unexpectedly sometimes; I have wondered if it is too slow to handle a bunch of requests at once. Not a frontend issue, though.
Updates the portal to use the new indicator (netCDF raster) data including coastal regions and further North along the Skeena and Nass basins.
Also implements a whitelist for the predefined watersheds and basins from the BC Freshwater Atlas and predefined salmon conservation units from DFO. Only regions for which we have data will be visible in the dropdowns.
resolves #51 resolves #40 (incidentally, by switching to an entirely new dataset) resolves #55
I haven't done a linting pass on this PR because there's some file overlap with the next (partially completed) one, and I fear a linting pass would make a merge very complicated.
demo