five

Using HydroShare Buckets to Access Resource Files

收藏
DataONE2025-07-23 更新2025-08-02 收录
下载链接:
https://search.dataone.org/view/sha256:b25a0f5e5d62530d70ecd6a86f1bd3fa2ab804a8350dc7ba087327839fcb1fb1
下载链接
链接失效反馈
官方服务:
资源简介:
This resource contains a draft Jupyter Notebook that has example code snippets showing how to access HydroShare resource files using HydroShare S3 buckets. The user_account.py is a utility to read user hydroshare cached account information in any of the JupyterHub instances that HydroShare has access to. The example notebook uses this utility so that you don't have to enter your hydroshare account information in order to access hydroshare buckets. Here are the 3 notebooks in this resource: - hydroshare_s3_bucket_access_examples.ipynb: The above notebook has examples showing how to upload/download resource files from the resource bucket. It also contains examples how to list files and folders of a resource in a bucket. - python-modules-direct-read-from-bucket/hs_bucket_access_gdal_example.ipynb: The above notebook has examples for reading raster and shapefile from bucket using gdal without the need of downloading the file from the bucket to local disk. - python-modules-direct-read-from-bucket/hs_bucket_access_non_gdal_example.ipynb The above notebook has examples of using h5netcdf and xarray for reading netcdf file directly from bucket. It also contains examples of using rioxarray to read raster file, and pandas to read CSV file from hydroshare buckets.

本数据集包含一份Jupyter Notebook草稿,其中附带示例代码片段,演示如何通过HydroShare S3存储桶访问HydroShare资源文件。其中的`user_account.py`是一款工具脚本,可在HydroShare可访问的任意JupyterHub实例中读取用户的HydroShare缓存账户信息。本示例Notebook集成了该工具,因此用户无需手动输入HydroShare账户信息即可访问HydroShare存储桶。 本数据集中共包含3份Notebook: - `hydroshare_s3_bucket_access_examples.ipynb`:该Notebook提供了从资源存储桶上传、下载资源文件的示例代码,同时包含如何列出存储桶中资源的文件与文件夹的相关示例。 - `python-modules-direct-read-from-bucket/hs_bucket_access_gdal_example.ipynb`:该Notebook演示了无需将文件从存储桶下载至本地磁盘,直接通过地理空间数据抽象库(GDAL)读取存储桶中的栅格数据与矢量形状文件(shapefile)的方法。 - `python-modules-direct-read-from-bucket/hs_bucket_access_non_gdal_example.ipynb`:该Notebook提供了使用`h5netcdf`与`xarray`直接从存储桶读取网络通用数据格式(NetCDF)文件的示例,同时包含使用`rioxarray`读取栅格文件、使用`pandas`从HydroShare存储桶读取CSV文件的相关示例。
创建时间:
2025-07-26
二维码
社区交流群
二维码
科研交流群
商业服务