Features.fetch_water_troughs

Features.fetch_water_troughs(update=False, dump_dir=None, verbose=False)

Fetch codes of water troughs locations.

Parameters
  • update (bool) – whether to do an update check (for the package data), defaults to False

  • dump_dir (str or None) – name of a folder where the pickle file is to be saved, defaults to None

  • verbose (bool or int) – whether to print relevant information in console, defaults to False

Returns

data of water trough locations, and date of when the data was last updated

Return type

dict

Examples:

>>> from pyrcs.other_assets import Features  # from pyrcs import Features

>>> feats = Features()

>>> wt_codes = feats.fetch_water_troughs()
>>> type(wt_codes)
dict
>>> list(wt_codes.keys())
['Water troughs', 'Last updated date']

>>> feats.KEY_TO_TROUGH
'Water troughs'

>>> wt_codes_dat = wt_codes[feats.KEY_TO_TROUGH]
>>> type(wt_codes_dat)
pandas.core.frame.DataFrame
>>> wt_codes_dat.head()
    ELR  ... Length (Yard)
0   BEI  ...           NaN
1   BHL  ...    620.000000
2  CGJ2  ...      0.666667
3  CGJ6  ...    561.000000
4  CGJ6  ...    560.000000
[5 rows x 6 columns]