-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
dataset info in .json format #2656
Comments
I like the look of
|
I will ping @dopplershift of Unidata, my go-to for all things netCDF. 😉 Ryan, do you know of any work on this area? The best I could google is this thread from the netcdf mailing list. |
Just to say, I really like this idea. I think I prefer the |
I'm not aware of any standard out there for JSON representation of netCDF, but I know it's been at least (briefly) discussed. @WardF, anything out there you're aware of? Another spelling of this could be |
Since my PR was merged, I have discovered two different JSON representations of netcdf Oops! |
It would be good to figure out if either of these are used. It's not too late to update your implementation. |
Would it make sense having |
What's the right way to serialize datetime objects in JSON? One option would be to add an |
Pandas has an option |
I am exploring the world of Spatio Temporal Asset Catalogs (STAC), in which all datasets are described using json/ geojson:
I am thinking about how to put the sort of datasets that xarray deals with into STAC items (see https://github.com/radiantearth/stac-spec). This would be particular valuable in the context of Pangeo and the zarr-based datasets we have been putting in cloud storage.
For this purpose, it would be very useful to have a concise summary of an xarray dataset's contents (minus the actual data) in .json format. I'm talking about the kind of info we currently get from the
.info()
method, which is designed to mirror the CDL output ofncdump -h
.For example
I would like to be able to do
ds.info(format='json')
and see something like thisWhich is what I get by doing
print(json.dumps(ds.to_dict(), indent=2))
and manually stripping out all thedata
fields. So an alternative api might be something likeds.to_dict(data=False)
.If anyone is aware of an existing spec for expressing Common Data Language in json, we should probably use that instead of inventing our own. But I think some version of this would be a very useful addition to xarray.
The text was updated successfully, but these errors were encountered: