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

Fix up downsample-zarr notebook #139

Merged
merged 3 commits into from
Jun 3, 2024
Merged

Fix up downsample-zarr notebook #139

merged 3 commits into from
Jun 3, 2024

Conversation

jsignell
Copy link
Collaborator

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Copy link

github-actions bot commented Apr 24, 2024

PR Preview Action v1.4.7
🚀 Deployed preview to https://NASA-IMPACT.github.io/veda-docs/pr-preview/pr-139/
on branch gh-pages at 2024-05-01 20:45 UTC

@jsignell jsignell requested a review from wildintellect April 24, 2024 19:40
Copy link

review-notebook-app bot commented Apr 25, 2024

View / edit / reply to this conversation on ReviewNB

wildintellect commented on 2024-04-25T23:27:09Z
----------------------------------------------------------------

"for to" probably "to"?

"within the memory limits of the notebook"? Is this really the notebook memory or the Jupyter instance memory? Also can we clarify that Dask is being used to parallel compute with local dask cluster, hence the memory limits of running instance matter.

I find the Downsample and Coarsen terminology a little foreign (seems like other tools might call this something else).

Coarsen aka aggregate?

Downsample aka Sub-select?

Is this still using Datashader? The calls below only use hvplot now (directly)


jsignell commented on 2024-04-26T12:59:47Z
----------------------------------------------------------------

Yeah I didn't touch the language in this PR, but these are good thoughts. I can try to make it clearer. It is still using datashader, it's just internal now (via the rasterize kwarg)

jsignell commented on 2024-05-01T19:12:38Z
----------------------------------------------------------------

I think aggregate implies that the whole dimension will be collapsed. So I left "coarsening"

wildintellect commented on 2024-05-01T20:13:42Z
----------------------------------------------------------------

I think this is just a terminology difference with GIS uers

https://pro.arcgis.com/en/pro-app/3.1/tool-reference/data-management/resample.htm <- aggregate

https://rspatial.github.io/terra/reference/aggregate.html

GDAL doesn't even differentiate and just calls it resampling https://gis.stackexchange.com/a/262318 though users clearly call it downsampling

I see why it gets confusing in GRASS r.resample like GDAL, but if it's time it's t.rast.aggregate

jsignell commented on 2024-05-01T20:41:56Z
----------------------------------------------------------------

I also decided downsample was correct for the time dimension. I think the name is based off the resample method in xarray (and pandas) then there is "upsample" for when you end up with more values than you started with, and "downsample" for when you end up with fewer. To me subselect should more like taking an aoi or a particular month. More like taking a piece of the data with the existing resolution rather than changing the resolution. Obviously you can use select to change the step, but that's not what first comes to my mind.

Copy link

review-notebook-app bot commented Apr 25, 2024

View / edit / reply to this conversation on ReviewNB

wildintellect commented on 2024-04-25T23:27:10Z
----------------------------------------------------------------

Use a markdown Note block?


jsignell commented on 2024-04-26T13:00:08Z
----------------------------------------------------------------

👍

Copy link

review-notebook-app bot commented Apr 25, 2024

View / edit / reply to this conversation on ReviewNB

wildintellect commented on 2024-04-25T23:27:10Z
----------------------------------------------------------------

bold mean so it's clear that's the function being used to coarsen/aggregate the data


jsignell commented on 2024-04-26T13:01:38Z
----------------------------------------------------------------

👍

Copy link

review-notebook-app bot commented Apr 25, 2024

View / edit / reply to this conversation on ReviewNB

wildintellect commented on 2024-04-25T23:36:16Z
----------------------------------------------------------------

Didn't you drop GeoViews in favor of HVplot?


jsignell commented on 2024-04-26T13:01:25Z
----------------------------------------------------------------

yeah similar to the datashader it is being used internally, but I agree that in the text needs an update.

Copy link
Collaborator Author

Yeah I didn't touch the language in this PR, but these are good thoughts. I can try to make it clearer. It is still using datashader, it's just internal now (via the rasterize kwarg)


View entire conversation on ReviewNB

Copy link
Collaborator Author

👍


View entire conversation on ReviewNB

Copy link
Collaborator Author

yeah similar to the datashader it is being used internally, but I agree that in the text needs an update.


View entire conversation on ReviewNB

Copy link
Collaborator Author

👍


View entire conversation on ReviewNB

Copy link
Collaborator Author

jsignell commented May 1, 2024

I think aggregate implies that the whole dimension will be collapsed. So I left "coarsening"


View entire conversation on ReviewNB

Copy link
Contributor

I think this is just a terminology difference with GIS uers

https://pro.arcgis.com/en/pro-app/3.1/tool-reference/data-management/resample.htm <- aggregate

https://rspatial.github.io/terra/reference/aggregate.html

GDAL doesn't even differentiate and just calls it resampling https://gis.stackexchange.com/a/262318 though users clearly call it downsampling

I see why it gets confusing in GRASS r.resample like GDAL, but if it's time it's t.rast.aggregate


View entire conversation on ReviewNB

Copy link
Collaborator Author

jsignell commented May 1, 2024

I also decided downsample was correct for the time dimension. I think the name is based off the resample method in xarray (and pandas) then there is "upsample" for when you end up with more values than you started with, and "downsample" for when you end up with fewer. To me subselect should more like taking an aoi or a particular month. More like taking a piece of the data with the existing resolution rather than changing the resolution. Obviously you can use select to change the step, but that's not what first comes to my mind.


View entire conversation on ReviewNB

@jsignell
Copy link
Collaborator Author

jsignell commented May 1, 2024

@wildintellect ready for another look

@jsignell jsignell merged commit fa84411 into main Jun 3, 2024
1 check passed
@jsignell jsignell deleted the js/geoviews-fix branch June 3, 2024 18:52
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.

Investigate failures in downsample-zarr notebook
2 participants