diff --git a/README.md b/README.md index a6a2b79..508fa25 100644 --- a/README.md +++ b/README.md @@ -45,8 +45,9 @@ or install from source code: ```python import tsdb + tsdb.list_available_datasets() # list all available datasets in TSDB -data = tsdb.load_specific_dataset('physionet_2012') # select the dataset you need and load it, TSDB will download, extract, and process it automatically +data = tsdb.load_dataset('physionet_2012') # select the dataset you need and load it, TSDB will download, extract, and process it automatically tsdb.download_and_extract('physionet_2012', './save_it_here') # if you need the raw data, use download_and_extract() tsdb.list_cached_data() # datasets you once loaded are cached, and you can check them with list_cached_data() tsdb.delete_cached_data() # you can delete all cache with delete_cached_data() to free disk space diff --git a/tsdb/__init__.py b/tsdb/__init__.py index 0feda1e..558d5b6 100644 --- a/tsdb/__init__.py +++ b/tsdb/__init__.py @@ -11,7 +11,7 @@ from .data_processing import ( window_truncate, download_and_extract, - load_specific_dataset, + load_dataset, delete_cached_data, list_cached_data, CACHED_DATASET_DIR, diff --git a/tsdb/data_processing.py b/tsdb/data_processing.py index 78c97ed..567fee7 100644 --- a/tsdb/data_processing.py +++ b/tsdb/data_processing.py @@ -221,7 +221,7 @@ def pickle_load(path): return data -def load_specific_dataset(dataset_name, use_cache=True): +def load_dataset(dataset_name, use_cache=True): """ Load dataset with given name. Parameters diff --git a/tsdb/tests/test_tsdb.py b/tsdb/tests/test_tsdb.py index 15b86d0..d8bac2b 100644 --- a/tsdb/tests/test_tsdb.py +++ b/tsdb/tests/test_tsdb.py @@ -25,7 +25,7 @@ def test_available_datasets(self): def test_dataset_loading(self): for d_ in DATASETS_TO_TEST: - data = tsdb.load_specific_dataset(d_) + data = tsdb.load_dataset(d_) assert isinstance(data, dict) def test_downloading_only(self):