Skip to content

Commit bf35dbf

Browse files
committed
fix : changes req
1 parent 2a5da7c commit bf35dbf

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

docs/examples.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,7 @@ scalar variables such as `goes_imager_projection`. `from_dataset` groups all the
9595
scalars into a single one-row table named `scalar`:
9696

9797
```python
98-
import urllib.request
99-
98+
import fsspec
10099
import xarray as xr
101100
from xarray_sql import XarrayContext
102101

@@ -106,8 +105,9 @@ url = (
106105
'https://noaa-goes16.s3.amazonaws.com/ABI-L2-MCMIPM/2024/001/00/'
107106
'OR_ABI-L2-MCMIPM1-M6_G16_s20240010000281_e20240010000350_c20240010000426.nc'
108107
)
109-
urllib.request.urlretrieve(url, 'goes.nc')
110-
ds = xr.open_dataset('goes.nc').chunk({'y': 250, 'x': 250})
108+
ds = xr.open_dataset(fsspec.open_local(f'simplecache::{url}')).chunk(
109+
{'y': 250, 'x': 250}
110+
)
111111

112112
ctx = XarrayContext()
113113
ctx.from_dataset('goes', ds)

0 commit comments

Comments
 (0)