O'Reilly logo

Expert Data Visualization by Jos Dirksen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Converting the data from the database

To create the visualization we saw at the beginning of this section, we need the data in a different format. We need to determine which people appear in a specific location. For that, we're going to create a single JSON file that looks like this:

{     "links": [     {         "source": "c_1",         "target": "l_2",         "value": 1     },     {         "source": "c_2",         "target": "l_2",         "value": 2     },     ...     ] , "characters": [     {         "id": "c_16",         "name": "DOCTOR ZITSOFSKY",         "normalized_name": "doctor zitsofsky",         "gender": "",         "created_at": "2016-09-29 15:24:21.041002",         "updated_at": "2016-09-29 15:24:21.041002",         "type": "character"     },     ... ], "locations": [     {         "id": "l_2",         "name": "Car",         "normalized_name": "car",  "created_at": ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required