SignalBoxes.fetch_ireland_codes

SignalBoxes.fetch_ireland_codes(update=False, dump_dir=None, verbose=False, **kwargs)[source]

Fetches data of Irish signal cabin prefix codes.

Parameters:
  • update (bool) – Whether to check for updates to the package data; defaults to False.

  • dump_dir (str | None) – The path to a directory where the data file will be saved; defaults to None.

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

Returns:

A dictionary containing the data of Irish signal cabin prefix codes and the date when they were last updated.

Return type:

dict

Examples:

>>> from pyrcs.other_assets import SignalBoxes  # from pyrcs import SignalBoxes

>>> sb = SignalBoxes()

>>> ireland_sb_codes = sb.fetch_ireland_codes()

>>> type(ireland_sb_codes)
dict
>>> list(ireland_sb_codes)
['Ireland', 'Notes', 'Last updated date']

>>> ireland_sb_codes_df = ireland_sb_codes['Ireland']
>>> ireland_sb_codes_df.shape

>>> ireland_sb_codes_df.head()
   Code Signal Cabin                    Note
0    AD     Adelaide
1    AN       Antrim
2    AE      Athlone
3  AE R                      Distant signals
4    XG               Level crossing signals