Skip to content

Instantly share code, notes, and snippets.

@mneedham
mneedham / import.cql
Last active August 29, 2015 14:24
Football transfers graph
// teams
load csv with headers from "file:///Users/markneedham/projects/football-transfers/data/teams.csv" as row
merge (team:Team {id: toint(row.team_id)})
on create set team.name = row.team;
// seasons
load csv with headers from "file:///Users/markneedham/projects/football-transfers/data/transfers.csv" as row
merge (season:Season {name: row.season})
ON CREATE SET season.starts = toint(split(season.name, "-")[0]);
@ikwattro
ikwattro / GithubEventAnalysisWithNeo4j.markdown
Last active December 2, 2022 17:49
Github Events Analysis with Neo4j

Github Events Analysis with Neo4j

Imgur

On July 22, Github announced the 3rd Annual Github Data Challenge presenting multiple sources of data available.

This sounded to me a good opportunity to use their available data and import it in Neo4j in order to have a lot of fun at analyzing the data that fits naturally in a graph.

As I work mainly offline or behind military proxies that do not permit me to use the ReST API, I decided to go for the Github Archive available here, you can then download json files representing Github Events on a daily/hour basis.

@kbastani
kbastani / CasinoStaff-24-7-Alice.CQL
Last active January 3, 2016 22:39
Casino staff 24/7
// Setup data for casino employee: Alice
WITH { day: 18, month: 1, year: 2014 } as dayMap
// The dayMap field acts as a parameter for this script
// Merge Alice and his skills
MERGE (baccarat:Skill { name: "Baccarat" })
MERGE (blackjack:Skill { name: "Blackjack" })
MERGE (roulette:Skill { name: "Roulette" })
MERGE (alice:Employee { firstname: "Alice", lastname: "Smith" })