-
-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make download data a Python script instead of Bash (#725)
- Loading branch information
Showing
4 changed files
with
36 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
from contextlib import suppress | ||
from pathlib import Path | ||
|
||
import bokeh.sampledata | ||
|
||
BASE_PATH = Path(__file__).resolve().parents[1] | ||
|
||
bokeh.sampledata.download() | ||
|
||
with suppress(ImportError): | ||
import pyct.cmd | ||
|
||
pyct.cmd.fetch_data( | ||
name="data", | ||
path=str(BASE_PATH / "examples"), | ||
datasets="datasets.yml", | ||
) | ||
|
||
|
||
with suppress(ImportError): | ||
import geodatasets as gds | ||
|
||
gds.get_path("geoda airbnb") | ||
gds.get_path("nybb") | ||
|
||
|
||
with suppress(ImportError): | ||
import pooch # noqa: F401 | ||
import scipy # noqa: F401 | ||
import xarray as xr | ||
|
||
xr.tutorial.open_dataset("air_temperature") | ||
xr.tutorial.open_dataset("rasm") |
This file was deleted.
Oops, something went wrong.