utils¶
Utilities - Helper functions.
Source homepage¶
Specify the homepage URL of the data source. |
Data directory¶
|
Change directory to dat_dir/ and sub-directories within a package. |
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. |
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¶
|
Make a fake HTTP headers for requests.get. |
|
Get last update date. |
|
Get the catalogue for a class. |
|
Get a menu of the available classes. |
|
Get catalogue of railway station data. |
|
Get catalogue of track diagrams. |
Rectification of location names¶
|
Create a dictionary for rectifying location names. |
|
Update the location-name replacement dictionary in the package data. |
Fixers¶
|
Fix ‘STANOX’ if it is loaded as numbers. |
Misc¶
|
Check if a string-type variable can express a float-type value. |