Format
This commit is contained in:
parent
555ba7cf53
commit
3c2e527328
6 changed files with 64 additions and 26 deletions
|
|
@ -11,13 +11,13 @@ NAPTAN_CSV_URL = "https://naptan.api.dft.gov.uk/v1/access-nodes?dataFormat=csv"
|
|||
|
||||
|
||||
STOP_TYPES = {
|
||||
'AIR': "Airport",
|
||||
'FTD': "Ferry",
|
||||
"AIR": "Airport",
|
||||
"FTD": "Ferry",
|
||||
"RSE": "Rail station",
|
||||
"BCT": "Bus stop",
|
||||
"BCE": "Bus station",
|
||||
"TXR": "Taxi rank",
|
||||
"TMU": "Metro or Tram stop",
|
||||
"TMU": "Metro or Tram stop",
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -48,7 +48,7 @@ def download_naptan(output: Path) -> None:
|
|||
)
|
||||
|
||||
df.write_parquet(output)
|
||||
size_mb = output.stat().st_size / (1024 * 1024)
|
||||
size_mb = output.stat().st_size / (1024 * 1024)
|
||||
print(f"Wrote {output} ({size_mb:.1f} MB, {len(df):,} stations)")
|
||||
|
||||
counts = df.group_by("category").len().sort("len", descending=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue