home / github

Menu
  • Search all tables
  • GraphQL API

issues

Table actions
  • GraphQL API for issues

2 rows where state = "closed" and user = 191850 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

type 2

  • issue 1
  • pull 1

state 1

  • closed · 2 ✖

repo 1

  • xarray 2
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
454337592 MDExOlB1bGxSZXF1ZXN0Mjg2ODA4NzM0 3013 Add `scales` attributes to Dataset created in open_rasterio (#3012) ecarrara 191850 closed 0     11 2019-06-10T19:40:05Z 2019-07-10T16:09:30Z 2019-07-10T16:00:50Z CONTRIBUTOR   0 pydata/xarray/pulls/3013
  • [X] Closes #3012
  • [X] Tests ~added~ edited
  • [x] Fully documented, including whats-new.rst for all changes and api.rst for new API
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/3013/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
454335138 MDU6SXNzdWU0NTQzMzUxMzg= 3012 rasterio.open exposes the GeoTIFF scales attribute, but xarray.open_rasterio not ecarrara 191850 closed 0     0 2019-06-10T19:34:18Z 2019-07-10T16:00:50Z 2019-07-10T16:00:50Z CONTRIBUTOR      

Code Sample, a copy-pastable example if possible

```python

import xarray as xr from pprint import pprint arr = xr.open_rasterio('example.tif') pprint(arr) <xarray.DataArray (band: 2, y: 7201, x: 5896)> [84914192 values with dtype=uint16] Coordinates: * band (band) int64 1 2 * y (y) float64 -17.18 -17.18 -17.18 -17.19 ... -23.58 -23.58 -23.58 * x (x) float64 -52.23 -52.23 -52.23 -52.23 ... -46.99 -46.99 -46.99 Attributes: transform: (0.0008888888888890009, 0.0, -52.22933333332605, 0.0, -0.000... crs: +init=epsg:4326 res: (0.0008888888888890009, 0.0008888888888890009) is_tiled: 1 nodatavals: (65535.0, 65535.0) ```

Would be nice if it had the scales attribute.

Problem description

rasterio.open exposes the GeoTIFF scales attribute, but xarray not.

```python

import rasterio rarr = rasterio.open('example.tif') print(rarr.scales) (0.001, 0.001) ```

Expected Output

```python

import xarray as xr from pprint import pprint arr = xr.open_rasterio('example.tif') pprint(arr) <xarray.DataArray (band: 2, y: 7201, x: 5896)> [84914192 values with dtype=uint16] Coordinates: * band (band) int64 1 2 * y (y) float64 -17.18 -17.18 -17.18 -17.19 ... -23.58 -23.58 -23.58 * x (x) float64 -52.23 -52.23 -52.23 -52.23 ... -46.99 -46.99 -46.99 Attributes: transform: (0.0008888888888890009, 0.0, -52.22933333332605, 0.0, -0.000... crs: +init=epsg:4326 res: (0.0008888888888890009, 0.0008888888888890009) is_tiled: 1 nodatavals: (65535.0, 65535.0) scales: (0.001, 0.001) ```

xarray version

python xr.__version__ == '0.12.1'

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

Advanced export

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

CSV options:

CREATE TABLE [issues] (
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [number] INTEGER,
   [title] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [state] TEXT,
   [locked] INTEGER,
   [assignee] INTEGER REFERENCES [users]([id]),
   [milestone] INTEGER REFERENCES [milestones]([id]),
   [comments] INTEGER,
   [created_at] TEXT,
   [updated_at] TEXT,
   [closed_at] TEXT,
   [author_association] TEXT,
   [active_lock_reason] TEXT,
   [draft] INTEGER,
   [pull_request] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [state_reason] TEXT,
   [repo] INTEGER REFERENCES [repos]([id]),
   [type] TEXT
);
CREATE INDEX [idx_issues_repo]
    ON [issues] ([repo]);
CREATE INDEX [idx_issues_milestone]
    ON [issues] ([milestone]);
CREATE INDEX [idx_issues_assignee]
    ON [issues] ([assignee]);
CREATE INDEX [idx_issues_user]
    ON [issues] ([user]);
Powered by Datasette · Queries took 2956.052ms · About: xarray-datasette