Last active
September 25, 2019 14:27
-
-
Save adsieg/c5aaaa23eaedfe172d6025a1d71ab771 to your computer and use it in GitHub Desktop.
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
from py2neo import Graph | |
graph = Graph("bolt://localhost:7687", user="xxxxx", password="xxxx") | |
graph.delete_all() | |
graph.run(query_rider) | |
query_climbs = """ | |
LOAD CSV WITH HEADERS FROM "https://raw.githubusercontent.com/inserpio/tour-de-france-2014/master/tour-de-france-2014-0003-climbs.csv" AS csvLine | |
MATCH (s:Stage { number: toInt(csvLine.STAGE_NUMBER) }) | |
CREATE (s)-[:INCLUDES]->(c:Climb { startingAtKm: toFloat(csvLine.STARTING_AT_KM), name: csvLine.NAME, initialAltitude: toFloat(csvLine.INITIAL_ALTITUDE), averageSlope: toFloat(csvLine.AVERAGE_SLOPE), distance: toFloat(csvLine.DISTANCE), category: csvLine.CATEGORY }); | |
""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment