Created
May 10, 2019 15:36
-
-
Save vladbatushkov/a98b46a9b21c9376b1b748ef266fe3cd to your computer and use it in GitHub Desktop.
List of Japanese Airlines destinations IATA codes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MERGE (j:Airport { IATA: "HND" }) | |
WITH ("https://en.wikipedia.org/wiki/List_of_Japan_Airlines_destinations") as url, j | |
CALL apoc.load.html(url, { codes: "table.sortable tr[style!=\"background-color:#ddd\"] td:eq(3)" }) YIELD value | |
WITH filter(code IN value.codes WHERE code.text <> "HND") as outsideCodes, j | |
UNWIND outsideCodes as code | |
MERGE (a:Airport { IATA: code.text }) | |
MERGE (j)-[:TO]->(a) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment