watex.datasets.load_huayuan#

watex.datasets.load_huayuan(*, samples=None, key=None, as_frame=False, return_data=False, tag=None, data_names=None, **kws)[source]#

Load AMT data from Huayuan locality.

The data is a bacth of 50 SEG EDI files collected in the Huayuan county, Hunan province, China. The data is a AMT data collected the first line.

Parameters
  • return_data (bool, default=False) – If True, returns data in array-like 1D instead of a Boxspace object. Note that the data is only a collection of EDI-objects from watex.edi.Edi

  • as_frame (bool, default=False) – If True, the data is a pandas DataFrame including columns with appropriate dtypes (numeric).

  • samples (int, str, default=None,) – Is the number of EDI files to collect. None or * allow retrieving all the 50 EDI sites.

  • key (str, optional) – Is the kind of data to fetch. Can be [‘preprocessed’|’raw’]. The default is default='pre-processed' for None value. The raw data contains missing tensors and ( weak frequency or noised data intereferences).

  • (tag (None) – tag and data_names do nothing. just for API purpose and to allow fetching the same data uing the func:~watex.datasets.fetch_data since the latter already holds tag and data_names as parameters.

  • data_names) (None) – tag and data_names do nothing. just for API purpose and to allow fetching the same data uing the func:~watex.datasets.fetch_data since the latter already holds tag and data_names as parameters.

  • savepath (str,) – Path to store temporarily the extracted huayuan data data. If no supplied the default cache is used.

  • clear_cache (bool, default=False) – Clear the cache before storing the new EDI files. For instance, if at the first turn all edis is fetched. At the second run, if samples is given, It does not have effect. All the EDI files will be retrieved. Thus, to get the the number of samples for EDI, clear_cache should be useful by setting to True.

Returns

data – Dictionary-like object, with the following attributes:

data: {ndarray, dataframe} of shape (50, 4)

The data matrix. If as_frame=True, data will be a pandas DataFrame.

path: str

Path where the EDI data is stored. By default is stored in a cache ~/watex_data.

frame: DataFrame of shape (50, 4)

Only present when as_frame=True. DataFrame with data no target.

feature_names: list

The names of the dataset columns.’None’ if as_frame=False.

emo: EM object.

Object from EM class.

filename: str

The path to the location of the data.

DESCR: str

The full description of the dataset.

Return type

Boxspace

See also

load_edis

Another collection of EDI stored as a supplement inner dataset.

Examples

>>> from watex.datasets import load_huayuan
>>> box = load_huayuan ()
>>> len(box.data)
50
>>> len(load_huayuan ( return_data =True ))
50
>>> data_sample = load_huayuan (samples=17, return_data =True, clear_cache=True )
>>> len(data_sample)
17
>>> data_sample = load_huayuan (samples=17 , as_frame=True)
                edi   longitude   latitude   site   id
0  Edi( verbose=0 )  110.485833  26.051389  s.E00  S00
1  Edi( verbose=0 )  110.486483  26.052210  s.E01  S01
2  Edi( verbose=0 )  110.487134  26.053032  s.E02  S02