QueryingSample datasets

Sample datasets

Memgraph publishes sample graph datasets that you can load to try Cypher queries, graph algorithms and Memgraph Lab visualizations. Each dataset is a CYPHERL file: Cypher queries that create its indexes, nodes and relationships.

Load a dataset

Load a dataset into an empty database. Loading it again, or into a database that already has data, adds a second copy of its nodes and relationships. To empty the database first, run:

MATCH (n) DETACH DELETE n;

You can load a dataset with mgconsole or with Memgraph Lab.

With mgconsole

If Memgraph runs in Docker, download the dataset’s file and pipe it into mgconsole inside the container. This command loads Capital cities and borders:

curl -fsSL https://download.memgraph.com/datasets/country-capitals/cypherl/dataset.cypherl.gz | gunzip | docker exec -i CONTAINER_NAME mgconsole

CONTAINER_NAME is the name of your Memgraph container: memgraph-mage if you started Memgraph with the Getting started installer. For another dataset, use its file link from the list of datasets.

Check that the counts match the dataset’s row in the list. For Capital cities and borders:

MATCH (n) RETURN count(n) AS nodes;
+-------+
| nodes |
+-------+
| 212   |
+-------+

With Memgraph Lab

In Memgraph Lab, open Datasets in the sidebar, find the dataset and click Load dataset. Lab lists the datasets from the same catalog as the list below.

Available datasets

The datasets are listed by title. The slug is the dataset’s name in its file link, and the file link is what the mgconsole command loads. The same list is available as JSON at https://download.memgraph.com/datasets/items.v1.json, with each dataset’s graph model and sample queries.

DatasetSlugDescriptionNodesRelationshipsFile
Analysis of energy management systemsenergy-management-systemEnergy management model with connected power generators across Europe.8,42211,437CYPHERL
Base station network of Zagrebbase-station-network-of-zagrebArtificially generated geographic data about 200 base stations in Zagreb, Croatia.2002,388CYPHERL
Business process managementbusiness-process-managementSample dataset of business process definitions and their recorded executions across an organization.32,594112,131CYPHERL
Capital cities and borderscountry-capitalsNetwork of capital cities connected as neighboring countries.212369CYPHERL
CORA: Scientific publications classified into seven categoriescora-scientific-publications2708 scientific publications classified into one of seven classes.2,7085,278CYPHERL
Country import and export tradescountry-trade-imports-exportsInternational merchandise and commercial services trade data per country.19027,779CYPHERL
Drug combinations databasedrug-combinationsDrug combinations database is comprehensive collection of drug combinations from various sources.2,956191,387CYPHERL
Europe backpackingeurope-backpackingTourist prices and other data for 56 of the most popular European cities. See the tutorial.92349CYPHERL
Europe gas pipelineseurope-gas-pipelines-scigridSciGRID_gas dataset of European natural gas transmission infrastructure.1,6042,181CYPHERL
Europe road networkeurope-road-networkRoad network of 999 major European cities from 39 countries. See the tutorial.1,03865,379CYPHERL
Eurovision voting resultseurovision-voting-resultsEurovision Song Contest results from 1975 to 2023.5438,415CYPHERL
F1 races from 1950 to 2022f1-racesDataset containing historic F1 race results, with individual drivers and constructors.4,37248,658CYPHERL
Football player’s transfersfootball-player-transfersFootball transfers in famous five European football leagues. See the tutorial.14,57756,622CYPHERL
Football Premier league gamesfootball-premier-league-gamesFootball matches across world’s most popular leagues. See the tutorial.78,380155,570CYPHERL
Game of Thrones deathsgame-of-thrones-deathsKills and deaths of various characters from the Game of Thrones TV show. See the tutorial.2,67711,967CYPHERL
Global supply chainglobal-supply-chainSample dataset of a multi-tier electronics supply chain, from raw materials and suppliers to customer deliveries and the risks that disrupt them.14,40061,616CYPHERL
Graph technology landscapegraph-technology-landscapeNetwork of popular graph technologies and the categories they belong to.349368CYPHERL
Hetionet: network of biology, disease, and pharmacologyhetionetHetionet is a hetnet — network with multiple node and edge (relationship) types — which encodes biology, disease, and pharmacology.47,0312,250,197CYPHERL
High-energy physics citation networkphysics-citation-networkHigh-energy physics citation graph is from the e-print arXiv and covers some of the citations within a dataset of 395 nodes and 1106 edges.3951,106CYPHERL
Identity and access managementiam-memgraphA sample of identity and access management model on Memgraph.2737CYPHERL
Karate club friendship networkkarate-club-friendship-networkZachary’s karate club as a social network of a university karate club.3478CYPHERL
Knowledge graph of parts dependenciesdependencies-knowledge-graphA sample of Knowledge Graph of parts dependencies.3857CYPHERL
Marvel Cinematic Universemarvel-cinematic-universeSocial network of various comics interactions between heroes from MCU. See the tutorial.21,732682,943CYPHERL
MovieLens: Movies, genres and usersmovielensMovieLens dataset of users, genres and movie ratings. See the tutorial.32,436122,920CYPHERL
Music genres social networkmusic-genres-social-networkNetwork of users and genres from the music streaming platform Deezer.2,0015,170CYPHERL
Network of air trafficair-trafficDataset containing airways, airports and waypoints.188559CYPHERL
Protein-protein interaction networkprotein-interactionsProtein-protein interaction (PPI) networks are mathematical representations of the physical contacts between proteins in the cell.262784CYPHERL
Python dependency vulnerabilitiespython-dependency-vulnerabilitiesSample dataset used for cybersecurity analysis of Python dependency packages.284158CYPHERL
S&P 500 stock pricessp-500-stock-pricesStock price dataset containing 503 stocks that are currently part of s&p 500.53817,639CYPHERL
Subreddit network explorersubreddit-network-explorerSubset of posts and comments from the subreddit /r/worldnews.852744CYPHERL
Supply chain analysissupply-chain-analysisSample dataset used for the analysis of a common supply chain.3449CYPHERL
TED talksted-talksShows 97 TED talks filled with interconnected speakers, talks, events, and tags. See the tutorial.3542,259CYPHERL
The Pandora Papersicij-pandora-papersA sample of the Pandora Papers containing offshore entities, world leaders and public officials.389740CYPHERL
Twitter Christmas retweetstwitter-christmas-retweetsA Twitter network of retweets that contain the hashtag #Christmas.1,8681,967CYPHERL
USA national parksnational-parksVarious data about animals, plants and details of national parks they live in.13,62943,204CYPHERL
Vehicle insurance datavehicle-insuranceGenerated sample dataset of vehicle insurance claims and policies.8,58212,128CYPHERL
Video game salesvideo-game-salesLarge amount of information on video game sales from 1980 till 2016.8,82527,065CYPHERL
Wikipedia articleswiki-articlesVarious Contents and contexts of 339 featured Wikipedia articles.78,181310,227CYPHERL