Settings

Theme

Show HN: Modeling Berlin subway lines in graph database

memgraph.com

29 points by kgolubic · 5 comments

Reader

3 threads
kgolubicOP

I recently stumbled upon an interesting Gist [1] about the Berlin subway and was inspired to create something similar using Memgraph. The most challenging part was figuring out which sources to use. Since this was my first attempt to create any type of graph dataset, I focused solely on stations (nodes) and lines (relationships), and I've packaged them into two CSV files. I also did some styling using a styling language called GSS. You can check out the results in my blog post.

It may not seem like much, but I really enjoyed working on this project. All comments and feedback are welcome :)

Disclaimer: I am employed at Memgraph.

[1] https://gist.github.com/CliffordAnderson/7fb7473af31f9343f8a...

kmerroll

Kudos for sharing this and the implementation details.

I guess I'll never get over not liking Cypher queries or the other ways property graph engines query the graph: (MATCH path = (s1:Station)-[r1:CONNECTED_VIA {line: 'U1'}]->(s2:Station))

Seems like standard SPARQL and RDF* work better for me.

appplication

Looks cool! If you want your lines to look a little more natural (rather than straight lines) look into splines, which are their own little fun rabbit hole to dive down. There’s a video called The Continuity of Splines on YouTube that’s worth the watch.

  • kgolubicOP

    Hi, yes, I've been looking into smoothing similar. I was thinking about using https://overpass-turbo.eu/ and running something like:

    [out:json][timeout:60];

    area["name"="Berlin"]->.searchArea;

    relation["route"="subway"](area.searchArea);

    out body;

    >;

    out skel qt;

    Then I could get something like https://pasteboard.co/FTHhZgTPuP9b.png.

    Maybe one day I'll try to mimic some GIS functionalities in my Memgraph database :)

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection