ELRMileages.fetch_elr

ELRMileages.fetch_elr(update=False, pickle_it=False, data_dir=None, verbose=False)[source]

Fetch ELRs and mileages from local backup.

Parameters
  • update (bool) – whether to check on update and proceed to update the package data, defaults to False

  • pickle_it (bool) – whether to replace the current package data with newly collected data, defaults to False

  • data_dir (str or None) – name of package data folder, defaults to None

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

Returns

data of all available ELRs and date of when the data was last updated

Return type

dict

Example:

>>> from pyrcs.line_data import ELRMileages

>>> em = ELRMileages()

>>> elrs_dat = em.fetch_elr()

>>> type(elrs_dat)
<class 'dict'>
>>> print(list(elrs_dat.keys()))
['ELRs', 'Last updated date']

>>> print(elrs_dat['ELRs'])
   ELR  ...         Notes
0  AAL  ...      Now NAJ3
1  AAM  ...  Formerly AML
2  AAV  ...
3  ABB  ...       Now AHB
4  ABB  ...
[5 rows x 5 columns]