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

Implement Pangeo notebooks #44

Open
tinaok opened this issue Aug 22, 2024 · 9 comments
Open

Implement Pangeo notebooks #44

tinaok opened this issue Aug 22, 2024 · 9 comments

Comments

@tinaok
Copy link
Collaborator

tinaok commented Aug 22, 2024

Identify the notebooks from pangeo-openeo-BiDS-2023/tutorial
/part3
Update and implement them.

@annefou
Copy link
Contributor

annefou commented Aug 22, 2024

for now I worked on the data access using Pangeo approach and created the corresponding notebooks for the "Data Access" section. See https://github.com/annefou/cubes-and-clouds/tree/main/lectures/2.3_data_access/exercises/_alternatives

@annefou
Copy link
Contributor

annefou commented Sep 3, 2024

Also added & tested snow cover on Pangeo@EOSC:

We would need to test it on EOX and better integrate it into the EO-College course.

@clausmichele
Copy link
Member

@annefou thanks for the PR!
I now had finally time to go through them and I have a couple of feedbacks and thoughts:

URL = "https://earth-search.aws.element84.com/v1"
catalog = pystac_client.Client.open(URL)
items = catalog.search(
    bbox=spatial_extent,
    collections=["sentinel-2-l2a"],
    query={"eo:cloud_cover":dict(lt=50)}
).item_collection()

datacube = stackstac.stack(items,
                     bounds_latlon=spatial_extent,
)
datacube

@clausmichele
Copy link
Member

Also added & tested snow cover on Pangeo@EOSC:

* Jupyter notebook: https://github.com/annefou/cubes-and-clouds/blob/main/lectures/3.1_data_processing/3.1_exercises/_alternatives/31_data_processing_pangeo.ipynb

* Rendered notebook: https://annefou.github.io/cubes-and-clouds/3.1_data_processing/3.1_exercises/_alternatives/31_data_processing_pangeo.html

We would need to test it on EOX and better integrate it into the EO-College course.

It looks really good, I like how you improved it compared to the old version.

@clausmichele
Copy link
Member

Also added & tested snow cover on Pangeo@EOSC:

* Jupyter notebook: https://github.com/annefou/cubes-and-clouds/blob/main/lectures/3.1_data_processing/3.1_exercises/_alternatives/31_data_processing_pangeo.ipynb

* Rendered notebook: https://annefou.github.io/cubes-and-clouds/3.1_data_processing/3.1_exercises/_alternatives/31_data_processing_pangeo.html

We would need to test it on EOX and better integrate it into the EO-College course.

I have some feedbacks in this PR annefou#1

@annefou
Copy link
Contributor

annefou commented Oct 28, 2024

I have some feedbacks in this PR annefou#1

Thanks for your feedback. I would like to follow up and discuss what would be the most relevant approach for our learners.

My view is that we should decide which approach to teach and use in the exercises. Since we have already OpenEO & Pangeo, we should try not to complexity further.

Then we can elaborate and show/mention other packages in the new episode 2.4 - Data Formats and Performance.

How does it sound?

@clausmichele
Copy link
Member

Hi @annefou, the notebooks I created in the PR wanted to try to improve the code efficiency. In my opinion, using odc-stac instead of stackstac is not increasing the complexity, it might even reduce it, because sometimes the behavior of stackstac is not what the user might expect, see like gjoseph92/stackstac#241 and gjoseph92/stackstac#196 . We can discuss about this tomorrow.

@clausmichele
Copy link
Member

@annefou @tinaok there are still two notebooks to convert:

https://github.com/annefou/cubes-and-clouds/blob/main/lectures/3.2_validation/3.2_exercises/32_validation.ipynb

and

https://github.com/annefou/cubes-and-clouds/blob/main/lectures/3.3_data_sharing/3.3_exercises/33_data_sharing.ipynb

for the data_sharing one, we can use the raster2stac package as I mentioned here: #46 (comment)

@clausmichele
Copy link
Member

For the data_sharing notebook: https://github.com/annefou/cubes-and-clouds/blob/main/lectures/3.3_data_sharing/3.3_exercises/33_data_sharing.ipynb

It is necessary to resue the workflow defined in the 3.1 exercise, creating the snow map for a single date. The result has to be stored as a COG, metadata about bbox and temporal coverage extracted from it and the STAC Item created.

To store the xarray object to a COG it's possible to use rioxarray with .rio.to_raster(driver="COG") (test it)

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

No branches or pull requests

3 participants