COVID-19 with GraphXR and Neo4j

Alex Law
Neo4j Developer Blog
3 min readMar 25, 2020

These days I find myself spending a lot more time in front of my laptop. It’s a source of anxiety that bombards me with constant updates on the COVID-19 pandemic. It’s a lifeline to my socially distanced friends, family, and colleagues. And it presents me with the opportunity to learn some new tools to try and make sense out of this situation. If an extrovert can adapt to quarantine, can a dancer become an analyst?

My goal was to understand how we got here or, more specifically, how SARS-CoV-2 spread to so many countries in such a short time.

I started by searching different websites for COVID-19 statistics, including this one created by 17-yr old Avi Schiffmann in Washington. I end up at the Worldometer’s Coronavirus page. It provides a daily report of new cases and deaths alongside the source news article. Sifting through the headlines, I decided to compile cases caused by cross-country travel from the available reports to create a travel log for COVID-19.

Transcribing the data was time-consuming but straight forward. Taking my first step into data visualization, having recently joined the team at Kineviz, was more daunting. You can follow my process here. Of course, there was a bit of trial and error along the way; the tutorial is just the parts that worked. The end result looks like this:

The nice thing about this process is it didn’t require any prior experience with GraphXR or expertise writing Cypher queries. By the end, I was able to spot a few trends.

First, COVID-19 may have started in China, but many countries became hubs for spreading it. Around February 21st, Italy and Iran became particularly prominent hubs.

Second, it’s apparent that COVID-19 reached the same countries from different origins. For instance, cases in Sweden have been attributed to travelers coming from China, Italy, Germany, and the US. In a very real way, we are all in this together.

To validate my conclusions, Weidong Yang wrote the following queries. You can run Neo4j algorithms like PageRank from the cypher query window in GraphXR:

Link Data for PageRank

MATCH (n:Country)-[:from_country]-(t:Transport)-[:to_country]-(m:Country)WHERE '2020–02–20' < t.date < '2020–03–01'MERGE (n)-[:transport_to_s0 {date:t.date}]->(m)

Graph PageRank

CALL algo.pageRank('Country', 'transport_to_s0',{direction: ‘INCOMING’, write:true, writeProperty:”pagerank_s1"})

Ultimately, seeing COVID-19 this way raises more questions than it answers.

  • How does it spread within a nation’s borders?
  • Are some medical systems better equipped for this kind of crisis than others?
  • How do infection rates compare amongst regions with or without the ‘shelter in place’ initiative?
  • What role does population density play?

During GraphHack 2020, Kineviz will support anyone investigating COVID-19 by curating data via our GitHub repository:

https://github.com/Kineviz/graphs4good-covid19

It’s hard to find words adequate to describe what’s going on in the world today. At least now I have a picture to help me understand it.

Alex Law is a Communications Coordinator at Kineviz. Her background combines the sciences (Bachelors in Human Biology from UCSC) and the arts (Pilot Artist at ODC/ Production Manager for DanceHack 2020) as well as experience in public healthcare and administration at Navigant.

--

--

Alex Law
Neo4j Developer Blog

Communications Coordinator for Kineviz/ Kinetech Arts. Dance artist on the move and collaborator at heart. Mantra: “Let’s give it a try.”