Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create and display pmtiles for snow coverage #3444

Merged
merged 14 commits into from
Mar 5, 2024
Merged

Conversation

dgboss
Copy link
Collaborator

@dgboss dgboss commented Feb 29, 2024

Provided snow coverage data is available from the NSIDC, we now create a pmtiles layer and store it in our object storage at psu/pmtiles/snow/{yyyy-mm-dd}/snowCoverage{yyyymmdd.pmtiles}

Front-end implementation and expected behavior

  • On initial load, and everytime the Date of Interest changes, we query the API to get the date of the most recently processed snow that is less than or equal to the Date of Interest. If a date is returned, this is used in constructing the URL for fetching pmtiles.
  • A 'Snow Coverage' option was added to the legend which allows you to toggle the snow layer on/off. Since the date of our snow coverage doesn't necessarily align with the Date of Interest due to processing delays, the legend displays the date the snow layer represents.

Test Links:

Landing Page
MoreCast 2.0
Percentile Calculator
MoreCast
C-Haines
FireBat
FireBat bookmark
Auto Spatial Advisory (ASA)
HFI Calculator

@codecov-commenter
Copy link

codecov-commenter commented Feb 29, 2024

Codecov Report

Attention: Patch coverage is 44.11765% with 57 lines in your changes are missing coverage. Please review.

Project coverage is 80.68%. Comparing base (38b29d3) to head (b70672e).

Files Patch % Lines
api/app/jobs/viirs_snow.py 27.08% 35 Missing ⚠️
api/app/utils/pmtiles.py 35.71% 9 Missing ⚠️
api/app/routers/snow.py 63.15% 7 Missing ⚠️
web/src/api/snow.ts 50.00% 2 Missing and 2 partials ⚠️
api/app/utils/polygonize.py 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3444      +/-   ##
==========================================
- Coverage   81.33%   80.68%   -0.66%     
==========================================
  Files         281      286       +5     
  Lines       10053    10199     +146     
  Branches      495      497       +2     
==========================================
+ Hits         8177     8229      +52     
- Misses       1741     1833      +92     
- Partials      135      137       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dgboss dgboss requested review from brettedw and conbrad February 29, 2024 22:55
Copy link
Collaborator

@brettedw brettedw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, nice work!

api/app/jobs/viirs_snow.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@conbrad conbrad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, I like that the generic polygonization functions were pulled out 😎

api/app/jobs/viirs_snow.py Outdated Show resolved Hide resolved
api/app/routers/snow.py Show resolved Hide resolved
Copy link

sonarqubecloud bot commented Mar 5, 2024

Quality Gate Passed Quality Gate passed

Issues
2 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@dgboss dgboss temporarily deployed to production March 5, 2024 16:18 Inactive
@dgboss dgboss merged commit e21ea54 into main Mar 5, 2024
26 checks passed
@dgboss dgboss deleted the task/snow-pm-tiles/3411 branch March 5, 2024 16:46
vanislekahuna pushed a commit to vanislekahuna/wps that referenced this pull request Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants