Skip to content
jazz discography represented as a neo4j graph
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cql
gml
import
screenshots
.gitignore
README.md

README.md

jazz-graph

jazz discography represented as a neo4j graph

Questions

  1. Can you produce robust jazz discographies using musicbrainz.com?

See: Model MusicBrainz Release

Alt text

  1. Can you infer recording sessions from discographies using musicbrainz and a labeled property graph?

Example cypher queries

What are the songs and performers on "The Roy Haynes Trio" release?

MATCH (r:Release { name: "The Roy Haynes Trio" })-[:HAS_TRACK]->(p)<-[:PARTICIPATED_IN]-(a)
RETURN r, a, p;

Alt text

What songs did Roy Haynes perform on September 10, 1999 and where?

MATCH (a:Person{ name: "Roy Haynes"})-[:PARTICIPATED_IN]->(p:Performance{begin: "1999-09-10"})-[:HAS_PLACE]->(plc:Place)
return DISTINCT p.name, p.begin, plc.name;

Alt text

What bassists did Roy Haynes perform the most with?

MATCH (person:Person)-[part:PARTICIPATED_IN]->(performance:Performance)<-[:PARTICIPATED_IN]-(roy:Person {name: "Roy Haynes"})
WHERE HAS (part.instruments) 
AND "bass" in part.instruments
RETURN person.name as bassist, count(*) AS performance

Alt text

What bassists did Roy Haynes perform the most with in 1960?

MATCH (person:Person)-[part:PARTICIPATED_IN]->(performance:Performance)<-[:PARTICIPATED_IN]-(roy:Person {name: "Roy Haynes"})
WHERE HAS (part.instruments) 
AND "bass" in part.instruments
AND performance.begin STARTS WITH '1960'
RETURN person.name as bassist, count(*) AS performance

Alt text

When did Roy Haynes record at Rudy Van Gelder's studio and how many performances?

MATCH (person:Person {name: "Roy Haynes"})-[part:PARTICIPATED_IN]->(performance:Performance)-[hp:HAS_PLACE]->(place:Place {name: "Van Gelder Studio"}) 
RETURN DISTINCT hp.begin as dates, place.name as place, count(performance) as performances
ORDER BY hp.begin ASC

Alt text

What Monk compositions has Roy Haynes performed?

MATCH (person:Person {name: "Roy Haynes"})-[part:PARTICIPATED_IN]->(performance:Performance)-[:PERFORMANCE_OF]->(work:Work)<-[:COMPOSED]-(composer:Person {name: "Thelonious Monk"})
RETURN DISTINCT work.name

What trios has Roy Haynes performed in and how often?

match (person:Person)-[part:PARTICIPATED_IN]->(perf:Performance)
where has (part.roles) and "musician" in part.roles
with person, perf
order by person.name desc
with perf, collect(person.name) as person_coll
where "Roy Haynes" in person_coll and length(person_coll) = 3
with count(perf) as performances, person_coll as trio
order by performances desc
return distinct trio, performances
You can’t perform that action at this time.