home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 43098072

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
43098072 MDU6SXNzdWU0MzA5ODA3Mg== 234 remove the notion of "Index coordinates", especially from the Dataset repr? 1217238 closed 0   740776 1 2014-09-18T06:16:38Z 2014-09-22T02:17:31Z 2014-09-22T02:17:31Z MEMBER      

@perrette mentioned that he found the distinction between "index" and "other" coordinates in the dev version of xray confusing (see the dev build of the docs).

I agree -- the differences are subtle, and difficult to convey. On the whole, they're mostly both just "Coordinates", although coordinates with the same name as a dimension are special because they're also used like indexes.

So I would like to visit repr(Dataset) to make this less confusing. Here are 5 options: 1. Current implementation (on master):

<xray.Dataset> Dimensions: (time: 3, x: 2, y: 2) Index Coordinates: time (time) datetime64[ns] 2014-09-06 2014-09-07 2014-09-08 x (x) int64 0 1 y (y) int64 0 1 Other Coordinates: lat (x, y) float64 42.25 42.21 42.63 42.59 lon (x, y) float64 -99.83 -99.32 -99.79 -99.23 reference_time datetime64[ns] 2014-09-05 Variables: temp (x, y, time) float64 11.04 23.57 20.77 9.346 6.683 17.17 11.6 19.54 ... precip (x, y, time) float64 5.904 2.453 3.404 9.847 9.195 0.3777 8.615 7.536 ... 2. Switch "Index Coordinates" to "Coordinates/Indexes" (to emphasize "Coordinates")

<xray.Dataset> Dimensions: (time: 3, x: 2, y: 2) Coordinates/Indexes: time (time) datetime64[ns] 2014-09-06 2014-09-07 2014-09-08 x (x) int64 0 1 y (y) int64 0 1 Coordinates/Other: lat (x, y) float64 42.25 42.21 42.63 42.59 lon (x, y) float64 -99.83 -99.32 -99.79 -99.23 reference_time datetime64[ns] 2014-09-05 Variables: temp (x, y, time) float64 11.04 23.57 20.77 9.346 6.683 17.17 11.6 19.54 ... precip (x, y, time) float64 5.904 2.453 3.404 9.847 9.195 0.3777 8.615 7.536 ... 3. Rename "Other Coordinates" to "Non-index Coordinates":

<xray.Dataset> Dimensions: (time: 3, x: 2, y: 2) Index Coordinates: time (time) datetime64[ns] 2014-09-06 2014-09-07 2014-09-08 x (x) int64 0 1 y (y) int64 0 1 Non-index Coordinates: lat (x, y) float64 42.25 42.21 42.63 42.59 lon (x, y) float64 -99.83 -99.32 -99.79 -99.23 reference_time datetime64[ns] 2014-09-05 Variables: temp (x, y, time) float64 11.04 23.57 20.77 9.346 6.683 17.17 11.6 19.54 ... precip (x, y, time) float64 5.904 2.453 3.404 9.847 9.195 0.3777 8.615 7.536 ... 4. Consolidate "Index" and "Other" coordinates (the info about indexing is implicit in the dimension names):

<xray.Dataset> Dimensions: (time: 3, x: 2, y: 2) Coordinates: time (time) datetime64[ns] 2014-09-06 2014-09-07 2014-09-08 x (x) int64 0 1 y (y) int64 0 1 lat (x, y) float64 42.25 42.21 42.63 42.59 lon (x, y) float64 -99.83 -99.32 -99.79 -99.23 reference_time datetime64[ns] 2014-09-05 Variables: temp (x, y, time) float64 11.04 23.57 20.77 9.346 6.683 17.17 11.6 19.54 ... precip (x, y, time) float64 5.904 2.453 3.404 9.847 9.195 0.3777 8.615 7.536 ... 5. Consolidate coordinates, but mark indexes with * (indexes could still be all grouped at the top, but wouldn't need to be):

<xray.Dataset> Dimensions: (time: 3, x: 2, y: 2) Coordinates: * time (time) datetime64[ns] 2014-09-06 2014-09-07 2014-09-08 * x (x) int64 0 1 * y (y) int64 0 1 lat (x, y) float64 42.25 42.21 42.63 42.59 lon (x, y) float64 -99.83 -99.32 -99.79 -99.23 reference_time datetime64[ns] 2014-09-05 Variables: temp (x, y, time) float64 11.04 23.57 20.77 9.346 6.683 17.17 11.6 19.54 ... precip (x, y, time) float64 5.904 2.453 3.404 9.847 9.195 0.3777 8.615 7.536 ...

I am leaning towards option (5). It introduces less terminology and is easier to scan / count at a glance than separate categories of coordinates. The asterisk is still there as a reminder that these coordinates are special, and the distinctions will be highlighted under "Coordinates" in the docs for anyone who wants more details.

@ToddSmall @akleeman @jhamman Any opinions?

(by the way, it's worth checking out @perrette's dimarray project... lots of nice ideas and overlap with xray)

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/234/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
  • 1 row from issue in issue_comments
Powered by Datasette · Queries took 0.849ms · About: xarray-datasette