Skip to content

Add example for Planetary Computer GeoParquet with PyArrow #433

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

demoncoder-crypto
Copy link

Addresses #403

@demoncoder-crypto
Copy link
Author

I have done the basic implementation if its correct I will fix everything iteratively. Thanks

Copy link
Member

@kylebarron kylebarron left a comment

Choose a reason for hiding this comment

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

This is an extremely verbose (AI-generated?) example where we really only need 10 lines of code, such as what we already have in the Zarr Planetary Computer example:

# These first lines are specific to Zarr stored in the Microsoft Planetary
# Computer. We use pystac-client to find the metadata for this specific Zarr
# store.
catalog = pystac_client.Client.open(
"https://planetarycomputer.microsoft.com/api/stac/v1/",
)
collection = catalog.get_collection("daymet-daily-hi")
asset = collection.assets["zarr-abfs"]
# We construct an AzureStore because this Zarr dataset is stored in Azure
# storage
azure_store = AzureStore(
credential_provider=PlanetaryComputerCredentialProvider.from_asset(asset),
)

We already have an example for creating the Planetary Computer credential provider, so it would be much better to have a focused example on how to use pyarrow than a verbose example with all these print statements.


# Create an fsspec filesystem interface from the obstore instance
print("Creating fsspec filesystem from obstore...")
fs = obstore.fsspec.ObstoreFileSystem(azure_store)
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't exist.

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.

None yet

2 participants