mapbox / mapbox/nepomuk

Extractor: clean up and normalize station names

Open
#52 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Data Feature Request
Dominant language
C++
Stars
24
Forks
7
PR merge metrics
No merged PRs in 30d

Description

I just had a look at the Berlin GTFS feeds for this year.

> https://daten.berlin.de/datensaetze/vbb-fahrplandaten-januar-2017-bis-dezember-2017
> stops.txt, CC-BY 3.0 licensed: http://www.vbb.de/de/datei/GTFS_VBB_Jan_Dez2017.zip

I can see three concrete issues:

1/ In there stations for the U-Bahn are named `U Alexanderplatz (Berlin)`, and other kind of stations e.g. bus lines have a different naming scheme. We probably don't want to show and store the `(Berlin)` suffix (what about the `U ` prefix?) and want to associate a type with these stops. (Sidenote: other delimiters seem to be `/` and extra information in brackets `[x]` _in this dataset_!)

2/ There are multiple stops with _almost_ the same name in there, with some diffs being only the number of spaces in stop name. We probably should trim and collapse multiple spaces within stop names.

3/ There are multiple stops for each stop name in the data. We probably can deduplicate based on their location (e.g. haversine < 500m is probably the same stop). How should we handle cases where the name is the same but the location is different?

The issues above are not specifically for the Berlin GTFS feeds — there's probably more out there.

Related:
- Deduplication - https://github.com/mapbox/directions-transit/issues/45 station lookup by coordinate
- Names - https://github.com/mapbox/directions-transit/issues/19 name to station / location to station

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining the GTFS stops.txt data described in the issue and review related issues #45 and #19. Establish agreed rules for prefix and suffix handling, whitespace normalization, station typing, and coordinate-based deduplication, including differing locations, before determining what tests or extractor changes are needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
data-engineering
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.