home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 105688738

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
105688738 MDU6SXNzdWUxMDU2ODg3Mzg= 567 Best way to find data variables by standard_name 1872600 closed 0     6 2015-09-09T21:32:02Z 2016-08-03T17:53:42Z 2016-08-03T17:53:42Z NONE      

Is there a way to return the data variables that match a specified standard_name?

I came up with this, but maybe the functionality already exists or there is a better way.

def get_std_name_vars(ds,std_name): return {k: v for k, v in ds.data_vars.iteritems() if 'standard_name' in v.attrs.keys() and std_name in v.standard_name}

as in this example: http://nbviewer.ipython.org/gist/rsignell-usgs/5b263906e92ce47bf05e

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/567/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed 13221727 issue

Links from other tables

  • 1 row from issues_id in issues_labels
  • 6 rows from issue in issue_comments
Powered by Datasette · Queries took 2.835ms · About: xarray-datasette