src.data_loading package
Submodules
src.data_loading.bsose_download module
Download the data from dropbox links.
‘get_zip’ 1694.64639 s
‘un_zip’ 444.41240 s
‘clean_up’ 4.04602 s
‘get_and_unzip’ 2143.10502 s
Example
- Import statement::
from src.data_loading.bsose_download import get_data
- Run statement::
get_data()
- src.data_loading.bsose_download.get_and_unzip(direc, url, name)
Get the data and unzip it.
src.data_loading.io_names module
Defaults for naming files.
- src.data_loading.io_names.return_folder(k_clusters, pca_components)
Return return folder name.
- src.data_loading.io_names.return_name(k_clusters, pca_components)
Return name.
- src.data_loading.io_names.return_pair_i_metric(k_clusters=5, pca=3, save_nc=True, t_index=40)
Return pair i metric.
- Parameters
k_clusters (int, optional) – Number of clusters. Defaults to cst.K_CLUSTERS.
pca (int, optional) – Number of principal components. Defaults to cst.D_PCS.
save_nc (bool, optional) – Whether or not to save the resulting dataset. Defaults to True.
t_index (int, optional) – time index cst.EXAMPLE_TIME_INDEX.
- Returns
pair i metric.
- Return type
xr.DataArray
src.data_loading.xr_loader module
Xarray values.
- src.data_loading.xr_loader.order_indexes(dataarray, index_list)
Order indices.
Goes from a datarray to a numpy array, ideally guaranteeing that the ordering of the numpy array is the same as would be expected.
- Parameters
dataarray (xr.DataArray) – [description]
index_list (list) – [description]
- Returns
the numpy array which has been correctly ordered.
- Return type
np.ndarray