utils¶
Utilities - Helper functions.
Specification of resource homepage¶
Specify the homepage URL of the data source. |
Data converters¶
|
Convert mileage data in the form ‘<miles>.<chains>’ to Network Rail mileage. |
|
Convert Network Rail mileage to the form ‘<miles>.<chains>’. |
|
Convert string-type Network Rail mileage to numerical-type one. |
|
Convert numerical-type Network Rail mileage to string-type one. |
|
Convert Network Rail mileages to yards. |
|
Convert yards to Network Rail mileages. |
|
Shift Network Rail mileage by given yards. |
|
Convert calendar year of a given date to Network Rail financial year. |
Data parsers¶
|
Parse a list of parsed HTML <tr> elements. |
|
Parse HTML <tr> elements for creating a data frame. |
|
Parse location name (and its associated note). |
|
Parse a date. |
Retrieval of useful information¶
|
Fetch the site map from the package data. |
|
Get last update date. |
|
Get the catalogue for a class. |
|
Get a menu of the available classes. |
Rectification of location names¶
|
Create a dictionary for rectifying location names. |
|
Update the location-names replacement dictionary in the package data. |
Data fixers¶
|
Fix ‘STANOX’ if it is loaded as numbers. |
|
Fix Network Rail mileage. |
Miscellaneous utilities¶
|
Print a message about unsuccessful attempts to establish a connection to the Internet. |
|
Print a message about unsuccessful attempts to establish a connection to the Internet for an instance of a class. |
|
Check if a string-type variable can express a float-type value. |
Check the Internet connection. |