Viaducts¶
-
class
viaduct.
Viaducts
(data_dir=None, update=False, verbose=True)[source]¶ A class for collecting railway viaducts.
- Parameters
data_dir (str, None) – name of data directory, defaults to
None
update (bool) – whether to check on update and proceed to update the package data, defaults to
False
verbose (bool or int) – whether to print relevant information in console as the function runs, defaults to
True
- Variables
Name (str) – name of the data
Key (str) – key of the dict-type data
HomeURL (str) – URL of the main homepage
SourceURL (str) – URL of the data web page
LUDKey (str) – key of the last updated date
LUD (str) – last updated date
Catalogue (dict) – catalogue of the data
DataDir (str) – path to the data directory
CurrentDataDir (str) – path to the current data directory
P1Key (str) – key of the dict-type data of Page 1
P2Key (str) – key of the dict-type data of Page 2
P3Key (str) – key of the dict-type data of Page 3
P4Key (str) – key of the dict-type data of Page 4
P5Key (str) – key of the dict-type data of Page 5
P6Key (str) – key of the dict-type data of Page 6
Example:
>>> from pyrcs.other_assets import Viaducts >>> vdct = Viaducts() >>> print(vdct.Name) Railway viaducts >>> print(vdct.SourceURL) http://www.railwaycodes.org.uk/viaducts/viaducts0.shtm
Methods
collect_viaduct_codes_by_page
(page_no[, …])Collect data of railway viaducts for a given page number from source web page.
fetch_viaduct_codes
([update, pickle_it, …])Fetch data of railway viaducts from local backup.