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

Use collections endpoint instead of search for analysis #666

Merged
merged 5 commits into from
Sep 22, 2023

Conversation

hanbyul-here
Copy link
Collaborator

@hanbyul-here hanbyul-here commented Sep 20, 2023

This PR uses collections endpoint to get all the collections, and filters them on the client side based on aoi/date range that user inputs. I followed the guidance provided in this issue:

A few things to note

  • I am not sure how item search works. Currently, the code catches all the datasets with the bbox that intersects with the AOI && the date domain that overlaps with the selected date range.
  • collections endpoint doesn't offer a detailed spatial extent. The bbox is a convex hull that includes all the data points. If a dataset is sparse like nightlight and plume, a user can see an empty chart like the screenshot below. @anayeaye and I talked and it might be helpful to have a flag to signal that this dataset is spatially sparse. (something similar to is_periodic but for spatial extent.)

Screen Shot 2023-09-20 at 2 35 39 PM

@anayeaye thanks for your help 🙇 and let me know if you see anything unexpected!

Related issues

Supersedes / temporarily replaces #534

@netlify
Copy link

netlify bot commented Sep 20, 2023

Deploy Preview for veda-ui ready!

Name Link
🔨 Latest commit fc5bbbc
🔍 Latest deploy log https://app.netlify.com/sites/veda-ui/deploys/650dc9aad612450008b9351b
😎 Deploy Preview https://deploy-preview-666--veda-ui.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@hanbyul-here hanbyul-here force-pushed the feature/use-collection-ep branch from ed4f179 to 9a69902 Compare September 20, 2023 18:55
@j08lue
Copy link
Contributor

j08lue commented Sep 20, 2023

Not to overload this job here, but extra sugar for the user would be if a spatial query already limited the maximum range for the date selection - and possibly vice versa.

We can keep that for next time, though, unless you think it is very simple to add.

@j08lue
Copy link
Contributor

j08lue commented Sep 20, 2023

The query UI is already a lot more responsive. 🎉

@hanbyul-here hanbyul-here marked this pull request as ready for review September 21, 2023 20:00
@hanbyul-here
Copy link
Collaborator Author

This PR is ready for review @danielfdsilva !

@hanbyul-here hanbyul-here force-pushed the feature/use-collection-ep branch from 6bde489 to 5eaa819 Compare September 22, 2023 14:08
@hanbyul-here This is a simplification suggestion for #666

It:
- Reduces array passes by merging the different `.map` and `.filter`
into a single `.reduce`
- Reduces component renders by avoiding state variables (status and
data)
- Uses the useQuery built in state to track the request status.
@hanbyul-here hanbyul-here merged commit e870dc3 into main Sep 22, 2023
7 checks passed
@hanbyul-here hanbyul-here deleted the feature/use-collection-ep branch September 22, 2023 17:20
@nerik nerik mentioned this pull request Sep 28, 2023
hanbyul-here added a commit that referenced this pull request Oct 12, 2023
## This PR, merged to `ghg`

### Features

- Analysis define
  - New step-by-step layout and various UI tweaks
  - Added sticky footer, moved submit and cancel buttons there
  - Added an AoI preset for North America
- Datasets are not filtered from `/collections` metadata (spatial,
temporal extent)
  - Dates are now set by default to 2018 - 2022
  - Replaced date presets with "2018 - 2022" and "last 10 years"
  - Date selection not possible anymore before 01-01-1980
- Prevent users from selecting datasets when time range selected would
mean fetching too many STAC items
- Analysis results page: set a hardcoded limit on the number of items
that can be requested as a failsafe mechanism for ☝️

### Bugfixes

- Removed logs in production
(US-GHG-Center/veda-config-ghg#152)
- Temporary fix of critical error encoutered during demos
(#680)
- Remove Shadow Scroll as a preventative method for
(#691)
- Check only day level equity to validate dates
(#676)
- Remove unneded attributes
(#694)
- BlockMap initial position error
(#687)

### Copy changes
- [Updated define
copy](f1e7171)
- [Disclaimer on results
page](54cf01e)


--- 

## Other PRs, merged to `main`

### Added in veda UI but made configurable (so not affecting
veda-config):
- #673
- #665
- #664

### Bugfixes
- #672
- #670 /
#666
- #662
- #691
- #650
- #676
- #694
- #687
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.

3 participants