Skip to content

Instantly share code, notes, and snippets.

Eve Freeman freeeve

  • Fairfax, VA
Block or report user

Report or block freeeve

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:c1ebd6b4c0daa8064d5c678bb572af17
// merge movies
with toFloat(row.avgVote) as avgVote, toInteger(row.releaseYear) as releaseYear, split(row.genres, ":") as genres, toInteger(row.movieId) as id,
row.title as title
merge (m:Movie {id:id})
set m.title = title,m.avgVote = avgVote,m.releaseYear=releaseYear,m.genres = genres
return count(1)
// merge people
freeeve / restaurant_recommendation.adoc
Last active Jul 15, 2017 — forked from jexp/restaurant_recommendation.adoc
Restaurant Recommendation GraphGist
View restaurant_recommendation.adoc

Restaurant Recommendations

Here’s an updated gist.

Here are some changes.

View gist:badd031d18a9222e806ce2dfcc6c494a
// get an idea of schema for node properties
match (n)
with n, keys(n) as ks
limit 100000
unwind ks as k
with n, k
order by k
return distinct labels(n), collect(distinct k)
// query to get actors/directors
freeeve / .block
Last active Feb 27, 2017 — forked from mbostock/.block
Population Pyramid
View .block
license: gpl-3.0
freeeve / constraints and indexes
Last active Nov 12, 2016
for the data import
View constraints and indexes
create constraint ON ( movie:Movie ) ASSERT IS UNIQUE;
create constraint ON ( person:Person ) ASSERT IS UNIQUE;
create index ON :Movie(title);
create index ON :Person(name);
// migrate genres to nodes
match (m:Movie)
unwind m.genres as genre
merge (g:Genre {name:genre})
View gist:455002a28bafb319ba2816d5c920cf3d
create index on :Movie(movieId);
create index on :Person(personId);
load csv with headers from 'file:///people.csv' as record
merge (p:Person {personId:record.personId})
set p = record;
load csv with headers from 'file:///movies.csv' as record
merge (m:Movie {movieId:record.movieId})
View describe.cyp
match (n)
with n, keys(n) as keys
limit 100000
unwind keys as key
with n, key
order by id(n), key
with n, collect(key) as keys
return distinct labels(n), keys, count(1)
View graphgist.adoc

My First GraphGist


neo4j logo 2015
CREATE (p:Person {name:"I"})-[:LIKES]->(neo:Database {name:"Neo4j"})
View main.go
package main
import (
type Person struct {
Name string
You can’t perform that action at this time.