Multiple Datasets
If you have data from multiple sources, or representing different units—such as patients and hospital capacity—you can use include multiple Lookout format record files in your /data folder.
| File | Description |
|---|---|
records.json | required An array of records in the Lookout data format. |
Additional record datasets (e.g. hospital.json) | optional Additional records in the Lookout data format, with separate fields from the records in records.json. Each separate dataset should be in its own JSON. |
| Additional data files | optional Any additional data you want to display on the site, e.g., Newick trees. |
For example, in records.json:
[
// CASE DATA
{
"date": "2022-01-01",
"gender": "male",
"covid": "positive",
}]
Then, in a separate file (hospitals.json):
[
// HOSPITAL CAPACITY DATA
{
"date": "2022-01-01",
"name": "hospital_name",
"city": "city_name",
"beds_available": 4
}]
It’s perfectly fine for there to be fields with the same name in multiple datasets, but they must be the same type of data as well. Then, in config.json, you need to add a datasets key, with a list of the datasets you’re using:
config.json
"datasets": [ "records", "hospitals" ]