Features.collect_water_troughs

Features.collect_water_troughs(confirmation_required=True, verbose=False)[source]

Collects codes of water troughs locations from the source web page.

Parameters:
  • confirmation_required (bool) – Whether user confirmation is required before proceeding; defaults to True.

  • verbose (bool | int) – Whether to print relevant information to the console; defaults to False.

Returns:

A dictionary containing the codes of water trough locations and the date they were last updated.

Return type:

dict | None

Examples:

>>> from pyrcs.other_assets import Features  # from pyrcs import Features
>>> feats = Features()
>>> wt_codes = feats.collect_water_troughs()
To collect data of Water troughs
? [No]|Yes: yes
>>> 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]