Skip to content

Instantly share code, notes, and snippets.

@adsieg
Last active September 25, 2019 14:27
Show Gist options
  • Save adsieg/c5aaaa23eaedfe172d6025a1d71ab771 to your computer and use it in GitHub Desktop.
Save adsieg/c5aaaa23eaedfe172d6025a1d71ab771 to your computer and use it in GitHub Desktop.
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