-
+

-
RailFares
+
Fares
"""
@@ -67,7 +67,7 @@ Some Header Content
HTML_CONTENT_FOOTER = """
-
+
Open Rail Data Disclaimer Etc. | No Guarantees or Whatever | We do freelance and dont want to be poor.
@@ -100,7 +100,7 @@ class FaresHandler(BaseHTTPRequestHandler):
text += (
'
| Flow | Fares |
\n'
)
- for flow_fares in data:
+ for flow_fares in sorted(data, key=lambda d: d["flow_id"]["flow_id"]):
flow_table = (
pd.json_normalize(flow_fares["flow_id"])
.rename(COLUMN_RENAMES, axis=1)
@@ -116,9 +116,9 @@ class FaresHandler(BaseHTTPRequestHandler):
)
_ = fares_table.hide(axis=0)
- text += '
\n | '
+ text += ' |
\n | '
text += flow_table.to_html()
- text += ' | '
+ text += ' | '
text += fares_table.to_html()
text += " | \n
"
text += ""