From 1bd16f370f30b93ae36b8740c6218e4a94ce0d68 Mon Sep 17 00:00:00 2001 From: Matthias Dahlmanns <51171678+matdahl@users.noreply.github.com> Date: Mon, 13 Sep 2021 15:09:33 +0200 Subject: [PATCH] Fix column order in edge.csv + change jsonfile suffix Thanks for providing these data in an easy accessible way! However, I noticed that the data are not correctly filled into `edge.csv`: The edge uid is written into column 2 instead of column 0 as expected. Furthermore, the suffix of `jsonfile` needs to be updated. --- ETL.ipynb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ETL.ipynb b/ETL.ipynb index 459b8db..c88e1a7 100644 --- a/ETL.ipynb +++ b/ETL.ipynb @@ -31,7 +31,7 @@ "source": [ "nodefile = \"vertex/vertex.csv\"\n", "edgefile = \"edge/edge.csv\"\n", - "jsonfile = \"geojson/multigraph.json\"\n", + "jsonfile = \"geojson/multigraph.geojson\"\n", "graphmlfile = \"graphml/multigraph.graphml\"\n", "gmlfile = \"gml/multigraph.gml\"\n", "\n", @@ -78,17 +78,17 @@ " direction = \"OneWay\"\n", " \n", " edge.writerow([\n", + " jsentry['_id']['$oid'], \n", " jsentry['properties']['mongo_org_id'],\n", " jsentry['properties']['mongo_dest_id'],\n", - " jsentry['_id']['$oid'], \n", " direction,\n", " jsentry['properties']['layer'], \n", " jsentry['properties']['name']])\n", " else:\n", " edge.writerow([\n", + " jsentry['_id']['$oid'], \n", " jsentry['properties']['mongo_org_id'],\n", " jsentry['properties']['mongo_dest_id'],\n", - " jsentry['_id']['$oid'],\n", " \"TwoWay\",\n", " jsentry['properties']['layer'], \n", " jsentry['properties']['name']])"