home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

10 rows where issue = 1707774178 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: reactions, created_at (date), updated_at (date)

user 4

  • headtr1ck 4
  • ayjayt 3
  • keewis 2
  • welcome[bot] 1

author_association 3

  • COLLABORATOR 4
  • NONE 4
  • MEMBER 2

issue 1

  • Fix words to make terminology consistent in docs · 10 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1547169473 https://github.com/pydata/xarray/pull/7840#issuecomment-1547169473 https://api.github.com/repos/pydata/xarray/issues/7840 IC_kwDOAMm_X85cN-7B headtr1ck 43316012 2023-05-15T04:15:53Z 2023-05-15T04:15:53Z COLLABORATOR

Well that's the point, "x" is a dimension as well as a coordinate. And since dimensions are names you cannot assign anything to them. If you want you can change coordinate by dimension coordinate.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix words to make terminology consistent in docs 1707774178
1547022976 https://github.com/pydata/xarray/pull/7840#issuecomment-1547022976 https://api.github.com/repos/pydata/xarray/issues/7840 IC_kwDOAMm_X85cNbKA ayjayt 30324885 2023-05-14T23:10:31Z 2023-05-14T23:10:31Z NONE

I'm sorry, but just to reiterate, "x" is referred to as a dimension several times in the document. It is then, one time, mistakenly referred to as a coordinate. This pull request, which should be accepted, is to make the document consistent in how it refers to "x".

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix words to make terminology consistent in docs 1707774178
1546939363 https://github.com/pydata/xarray/pull/7840#issuecomment-1546939363 https://api.github.com/repos/pydata/xarray/issues/7840 IC_kwDOAMm_X85cNGvj headtr1ck 43316012 2023-05-14T16:29:13Z 2023-05-14T16:29:13Z COLLABORATOR

I agree that there is a lot of terminology that is somewhat similar and/or overlapping.

In math you have the basis of a vector space which when plotting in a coordinate system you sometimes call coordinates or axes. Also you often use the phrase "the x-coordinate of point p is ...", So I understand why naming an axis "coordinate" might sound reasonable.

However in xarray (or numerics in general) you often deal with data that is not aligned to any axis in a given coordinate system. Consider the following example: you have a time series of points that might be scattered randomly in your coordinate system. Now you can assign to each point a x and y coordinate. In xarray you would call the dimension of the data e.g. "time". You will need two additional time series of data points for the x and y coordinates.

In xarray this would be something like that: python da = xr.DataArray( [5, 6, 7], dims="time", coords={ "x": ("time", [1, 2, 3]), "y": ("time", [9, 8, 7]), "time": [0, 1, 2] } You can see that in this example we cannot easily define a x-y coordinate system since the data points are not on a grid. But still we can assign each data point a x and y coordinate.

Now finding a naming convention that fits both, random data points and lattices that are aligned with the coordinate system is not trivial.

That's why we choose to go with the following: - dimension: name of an axis of a nd-array, this might be a "real" axis that has any real world equivalent or something as trivial as "order in which the data has been aquisited". In the example this was "time". - coordinate: auxiliary data that can be used to identify the data values. In the example this was "x" and "y". (Basically it is a short name for "coordinate variable") - dimension coordinate: a coordinate that assigns values to the dimension directly if possible. This is the case when the name of a coordinate is the same as a dimension. In the example this was "time" with the timestamps 0, 1 and 2 (probably this should be real timestamps).

Feel free to propose some changes to the documentation such that newcomers will find it easier to understand the terminology.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix words to make terminology consistent in docs 1707774178
1546041240 https://github.com/pydata/xarray/pull/7840#issuecomment-1546041240 https://api.github.com/repos/pydata/xarray/issues/7840 IC_kwDOAMm_X85cJreY ayjayt 30324885 2023-05-12T17:07:08Z 2023-05-12T17:09:44Z NONE

Yeah, as a total new comer, this explanation seems not only unintuitive but also like we're fighting with common terminology used in math and everywhere else.

When you define the coordinates,

data = xr.DataArray(np.random.randn(2,3)*10, dims=("x", "y"), coords={"x": [10, 20]})

It looks like you are defining a specific coordinate system [10,20] on a specific dimension "x". The key of the object-value pair set in coords (ie. "x") MUST refer to a dimension, because "x" is a dimension that we are defining a coordinate system for. As we don't define any coordinate system on "y", asking xarray for data.coords["y"] gives us a array([0,1,2]) which we'd consider to be an intuitive default coordinate system.

Intuitively, we think: An xarray contains dimensions along which specific coordinates can be defined: xarray.dimension.coordinate

In the attribute definition, we say:

data.x.attrs["units"] = "x units" which feels like we are defining an attribute on the entire dimension. As opposed to data.x.10 (I realize the problem here) which would be definiting an attribute on a single coordinate within a dimension.

I'm done, thank you for your time. I will continue reading and learning about xarray.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix words to make terminology consistent in docs 1707774178
1546029852 https://github.com/pydata/xarray/pull/7840#issuecomment-1546029852 https://api.github.com/repos/pydata/xarray/issues/7840 IC_kwDOAMm_X85cJosc headtr1ck 43316012 2023-05-12T16:57:53Z 2023-05-12T16:57:53Z COLLABORATOR

Yes exactly. A dimension is only a name for an axis.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix words to make terminology consistent in docs 1707774178
1546028265 https://github.com/pydata/xarray/pull/7840#issuecomment-1546028265 https://api.github.com/repos/pydata/xarray/issues/7840 IC_kwDOAMm_X85cJoTp keewis 14808389 2023-05-12T16:56:23Z 2023-05-12T16:56:23Z MEMBER

let's have a look at what defines the object: python data = xr.DataArray(np.random.randn(2, 3), dims=("x", "y"), coords={"x": [10, 20]}) That means we have: - random data - two dimensions: x with a length of 2 and y with a length of 3 - one coordinate: x with values [10, 20]

The line python data.x.attrs["units"] = "x units" can be split into two parts: python x = data.x and python x.attrs["units"] = "x units" where x is the coordinate.

If we did the same thing with y we would not get the dimension, but a dummy coordinate that has the values np.arange(data.sizes["y"]). This is admittedly a bit confusing.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix words to make terminology consistent in docs 1707774178
1546019472 https://github.com/pydata/xarray/pull/7840#issuecomment-1546019472 https://api.github.com/repos/pydata/xarray/issues/7840 IC_kwDOAMm_X85cJmKQ ayjayt 30324885 2023-05-12T16:47:46Z 2023-05-12T16:51:44Z NONE

Well, it's not consistent within this particular document, which is reasonably the first anyone reads. The dimension, as its refered to, in this example is called "x", we are assigning an attribute to "x", the coordinates of "x" are [10,20], we are not assigning an attribute to a coordinate within the dimension "x".

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix words to make terminology consistent in docs 1707774178
1545937746 https://github.com/pydata/xarray/pull/7840#issuecomment-1545937746 https://api.github.com/repos/pydata/xarray/issues/7840 IC_kwDOAMm_X85cJSNS keewis 14808389 2023-05-12T15:37:59Z 2023-05-12T15:37:59Z MEMBER

I agree, coordinate is the correct term. We could make that a bit less confusing by using a non-dimension coordinate in the example, but then again the point is that any coordinate can have additional metadata.

But I think the concept of dimension-coordinates (when the coordinate has the same name as the dimension) is still relevant.

If I remember correctly, while they lost their status as the only ones having an index dimension coordinates are still used for alignment.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix words to make terminology consistent in docs 1707774178
1545930547 https://github.com/pydata/xarray/pull/7840#issuecomment-1545930547 https://api.github.com/repos/pydata/xarray/issues/7840 IC_kwDOAMm_X85cJQcz headtr1ck 43316012 2023-05-12T15:32:29Z 2023-05-12T15:32:29Z COLLABORATOR

This is a bit misleading. I think the term coordinate is correct, but you can be more precise and use dimension-coordinate, see: https://docs.xarray.dev/en/stable/user-guide/data-structures.html#coordinates

Maybe we should start calling them index as well? But I think the concept of dimension-coordinates (when the coordinate has the same name as the dimension) is still relevant.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix words to make terminology consistent in docs 1707774178
1545870642 https://github.com/pydata/xarray/pull/7840#issuecomment-1545870642 https://api.github.com/repos/pydata/xarray/issues/7840 IC_kwDOAMm_X85cJB0y welcome[bot] 30606887 2023-05-12T14:53:26Z 2023-05-12T14:53:26Z NONE

Thank you for opening this pull request! It may take us a few days to respond here, so thank you for being patient. If you have questions, some answers may be found in our contributing guidelines.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix words to make terminology consistent in docs 1707774178

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
);
CREATE INDEX [idx_issue_comments_issue]
    ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
    ON [issue_comments] ([user]);
Powered by Datasette · Queries took 13.374ms · About: xarray-datasette