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
| LOAD CSV WITH HEADERS FROM 'https://raw.githubusercontent.com/iamvarol/blogposts/main/medium/europe_gas_network/data/IGGIELGNC3_LNGs.csv' as row | |
| FIELDTERMINATOR ';' | |
| WITH row.id as id, | |
| replace(row.name, '"','') as name, | |
| row.country_code as country_code, | |
| apoc.convert.fromJsonList(row.source_id) as source_ids, | |
| apoc.convert.fromJsonList(row.node_id) as node_ids, | |
| point({latitude:toFloat(row.lat), longitude:toFloat(row.long)}) as loc, | |
| apoc.convert.fromJsonMap(replace(row.param, 'None', 'null')) as params | |
| MERGE(l:LNG {id:id}) |
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
| LOAD CSV WITH HEADERS FROM 'https://raw.githubusercontent.com/iamvarol/blogposts/main/medium/europe_gas_network/data/IGGIELGNC3_BorderPoints.csv' as row | |
| FIELDTERMINATOR ';' | |
| WITH row.id as id, | |
| replace(row.name, '"','') as name, | |
| row.country_code as country_code, | |
| apoc.convert.fromJsonList(row.source_id) as source_ids, | |
| apoc.convert.fromJsonList(row.node_id) as node_ids, | |
| point({latitude:toFloat(row.lat), longitude:toFloat(row.long)}) as loc, | |
| apoc.convert.fromJsonMap(replace(row.param, 'None', 'null')) as params | |
| MERGE(b:BorderPoint {id:id}) |
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
| LOAD CSV WITH HEADERS FROM 'https://raw.githubusercontent.com/iamvarol/blogposts/main/medium/europe_gas_network/data/IGGIELGNC3_Consumers.csv' as row | |
| FIELDTERMINATOR ';' | |
| WITH row.id as id, | |
| replace(row.name, '"','') as name, | |
| row.country_code as country_code, | |
| apoc.convert.fromJsonList(row.source_id) as source_ids, | |
| apoc.convert.fromJsonList(row.node_id) as node_ids, | |
| point({latitude:toFloat(row.lat), longitude:toFloat(row.long)}) as loc, | |
| apoc.convert.fromJsonMap(replace(row.param, 'None', 'null')) as params | |
| MERGE(c:Consumer {id:id}) |
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
| LOAD CSV WITH HEADERS FROM 'https://raw.githubusercontent.com/iamvarol/blogposts/main/medium/europe_gas_network/data/IGGIELGNC3_Storages.csv' as row | |
| FIELDTERMINATOR ';' | |
| WITH row.id as id, | |
| replace(row.name, '"','') as name, | |
| row.country_code as country_code, | |
| apoc.convert.fromJsonList(row.source_id) as source_ids, | |
| apoc.convert.fromJsonList(row.node_id) as node_ids, | |
| point({latitude:toFloat(row.lat), longitude:toFloat(row.long)}) as loc, | |
| apoc.convert.fromJsonMap(replace(row.param, 'None', 'null')) as params | |
| MERGE(s:Storage {id:id}) |
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
| LOAD CSV WITH HEADERS FROM 'https://raw.githubusercontent.com/iamvarol/blogposts/main/medium/europe_gas_network/data/IGGIELGNC3_Productions.csv' as row | |
| FIELDTERMINATOR ';' | |
| WITH row.id as id, | |
| replace(row.name, '"','') as name, | |
| row.country_code as country_code, | |
| apoc.convert.fromJsonList(row.source_id) as source_ids, | |
| apoc.convert.fromJsonList(row.node_id) as node_ids, | |
| point({latitude:toFloat(row.lat), longitude:toFloat(row.long)}) as loc, | |
| apoc.convert.fromJsonMap(replace(row.param, 'None', 'null')) as params | |
| MERGE(p:Production {id:id}) |
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
| LOAD CSV WITH HEADERS FROM 'https://raw.githubusercontent.com/iamvarol/blogposts/main/medium/europe_gas_network/data/IGGIELGNC3_PowerPlants.csv' as row | |
| FIELDTERMINATOR ';' | |
| WITH row.id as id, | |
| replace(row.name, '"','') as name, | |
| row.country_code as country_code, | |
| apoc.convert.fromJsonList(row.source_id) as source_ids, | |
| apoc.convert.fromJsonList(row.node_id) as node_ids, | |
| point({latitude:toFloat(row.lat), longitude:toFloat(row.long)}) as loc, | |
| apoc.convert.fromJsonMap(replace(row.param, 'None', 'null')) as params | |
| MERGE(pp:PowerPlant {id:id}) |
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
| LOAD CSV WITH HEADERS FROM 'https://raw.githubusercontent.com/iamvarol/blogposts/main/medium/europe_gas_network/data/IGGIELGNC3_Nodes.csv' as row | |
| FIELDTERMINATOR ';' | |
| WITH row.id as id, | |
| replace(row.name, '"','') as name, | |
| row.country_code as country_code, | |
| apoc.convert.fromJsonList(row.source_id) as source_ids, | |
| apoc.convert.fromJsonList(row.node_id) as node_ids, | |
| point({latitude:toFloat(row.lat), longitude:toFloat(row.long)}) as loc, | |
| apoc.convert.fromJsonMap(replace(row.param, 'None', 'null')) as params | |
| MERGE(n:Node {id:id}) |
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
| CALL apoc.periodic.iterate(" | |
| LOAD CSV WITH HEADERS FROM 'https://raw.githubusercontent.com/iamvarol/blogposts/main/medium/europe_gas_network/data/IGGIELGNC3_PipeSegments.csv' as row | |
| FIELDTERMINATOR ';' | |
| WITH row.id as id, | |
| row.name as name, | |
| apoc.convert.fromJsonList(row.country_code) as countries, | |
| apoc.convert.fromJsonList(row.node_id) as nodes, | |
| apoc.convert.fromJsonMap(replace(row.param, 'None', 'null')) as params | |
| MATCH (start_p:Node {id:nodes[0]}) | |
| MATCH (end_p:Node {id:nodes[1]}) |
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
| LOAD CSV WITH HEADERS FROM 'https://raw.githubusercontent.com/iamvarol/blogposts/main/medium/europe_gas_network/data/IGGIELGNC3_Compressors.csv' as row | |
| FIELDTERMINATOR ';' | |
| WITH row.id as id, | |
| replace(row.name, '"','') as name, | |
| row.country_code as country_code, | |
| apoc.convert.fromJsonList(row.source_id) as source_ids, | |
| apoc.convert.fromJsonList(row.node_id) as node_ids, | |
| point({latitude:toFloat(row.lat), longitude:toFloat(row.long)}) as loc, | |
| apoc.convert.fromJsonMap(replace(row.param, 'None', 'null')) as params | |
| MERGE(c:Compressor {id:id}) |
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
| CALL db.labels() YIELD label | |
| CALL apoc.cypher.run('MATCH (:`'+label+'`) RETURN count(*) as count',{}) YIELD value | |
| RETURN label as nodes, value.count as nodeCount | |
| ORDER BY nodeCount DESC |
OlderNewer