Liam 752efb11d0 cleaned | преди 3 години | |
---|---|---|
.gitignore | преди 4 години | |
README.org | преди 3 години | |
dm-geber.csv | преди 4 години | |
dm-relationship-geldleistung.csv | преди 4 години | |
dm-relationship-geldleistung.ods | преди 4 години | |
dm-relationship-geldspende.csv | преди 4 години | |
dm-relationship-geldspende.ods | преди 4 години | |
dm-relationship-sachleistung.ods | преди 4 години | |
dm-relationship-sachspende.ods | преди 4 години | |
dm-relationship-sponsoring.csv | преди 4 години | |
dm-relationship-sponsoring.ods | преди 4 години | |
dm-relationship-stipendium.ods | преди 4 години | |
dm-reliationsship.ods | преди 4 години | |
dm-unis.csv | преди 4 години | |
dm-unis.ods | преди 4 години | |
notes.org | преди 4 години | |
prepare.py | преди 4 години | |
sponsoring-csv.csv | преди 3 години | |
sponsoring.csv | преди 3 години |
Begin here for the data https://github.com/netAction/hochschulwatch/blob/gh-pages/import/daten/sponsoring.csv Sponsoring
The reast is in the parrent folder daten
LOAD CSV FROM '/home/s0/Code/Projects/OSI/graphsForSpenders/dm-unis-unique.csv' AS line;
CREATE (:Uni { name: line[1] });
WITH "/home/s0/Code/Projects/OSI/graphsForSpenders/" AS base
WITH base + "dm-unis-unique.csv" AS uri
LOAD CSV WITH HEADERS FROM uri AS row
MERGE (:uni {id: row.id})
WITH base + "dm-relationship-geldspende.csv" AS uri
LOAD CSV WITH HEADERS FROM uri as row
MERGE (source:Geber {id: row.src})
MERGE (destination:Uni {id: row.dst})
MERGE (source)-[:MONEY_GRANT {year: row.year, sum: row.sum, source:row.source explanation:row.expl} ]-> (destination)
WITH "https://notabug.org/ProTransparenz/spending2graphs/raw/master/" AS base
WITH base + "dm-relationship-geldleistung.csv" AS uri
LOAD CSV WITH HEADERS FROM uri as row
MERGE (source:Geber {id: row.src})
MERGE (destination:Uni {id: row.dst})
MERGE (source)-[:MONEY_GRANT {year: row.year, sum: row.syn} ]-> (destination)
https://notabug.org/ProTransparenz/spending2graphs/raw/master/dm-relationship-geldspende.csv
state;dst;year;src;rel;art;wert;note;alt;src
Bundesland Universität Jahr Name des Gebers Geld-/Sachspende Art der Leistung Wert Hinweis Alternativname Quelle
WITH "https://notabug.org/ProTransparenz/spending2graphs/raw/master/" AS base
WITH base + "sponsoring.csv" AS uri
LOAD CSV WITH HEADERS FROM uri as row with row where row.src is not null where row.dst is not null
MERGE (source:Geber {id: row.src, state:row.state})
MERGE (destination:Uni {id: row.dst})
MERGE (source)-[:MONEY_GRANT {year: row.year, value: row.value, type:row.rel, art:row.art, alt:row.alt, source:row.source}]-> (destination)