config.json


The file config.json contains key specifications for your Lookout site:

Field Description
site required The name of your site
description optional The description of your site
pathogens required The pathogens that are supported by your site
layouts required The layout file(s) for your site and what views they pertain to
timeline optional Timeline granularity information. Defaults to 1-day intervals
minimap optional Configuration for a minimap display
labels optional Human-readable labels for fields in your data
datasets optional Dataset filenames, if you are using multiple datasets

Site Name

The name shown on the left side of the header. Most commonly a geographic entity.

Example

"site": "Cote d' Cronan"


Site description

Additional information that appears under the * info icon next to the site title.

Example

"description": "Data reported by sources x, y, and z."

Pathogens

Information about the pathogens in your data.

Example

"pathogens": ["disease-a", /* additional pathogens */]

Note: see Labels to attach human-readable names to your pathogens (e.g. “Hepatitis B”)

Layouts

Each Lookout view is laid out according to a layout file, and these assignments are specified here. Lookout always looks for the provided layout file paths in the site/layouts directory. The Displaying Your Data section walks through how to write layout files.

Field Description
single_pathogen required Contains one or more layout files for single-pathogen views.
multi_pathogen optional Contains one or more layout files for multi-pathogen views.

Example

  "layouts": {
    "multi_pathogen": [{ "layout_file": "multi-pathogen-overview.json" }],
    "single_pathogen": [{ "layout_file": "single-pathogen-view.json" }],
  }

multi_pathogen and single_pathogen are both arrays, where each item corresponds to one page of your Lookout site. There is one required field:

Field Description
layout_file required Contains the filename of the layout file, located at ./site/layouts.

The content below walks through other fields that can be used when configuring layouts.

Pathogen-specific layouts (single view)

If your site has a multi-pathogen view set up, you can assign different single-pathogen views to different pathogens to display when they are clicked into.

  • pathogens: assigns specific layout files to specific pathogens for their detailed single-pathogen view.
  "layouts": {
    "multi_pathogen": { "layout_file": "multi-pathogen-overview.json" },
    "single_pathogen": [
      {
        "layout_file": "single-pathogen-view.json" // Used for all pathogens except Dengue and Lassa
      },
      {
        "layout_file": "single-with-sequences.json",
        "pathogens": [ "dengue", "lassa" ] // Used only for Dengue and Lassa
      }
    ]
  }

Multiple views

If config.json includes multiple multi- or single-view layouts, you can toggle between them.

The layout file configuration requires two additional fields:

  • id: unique ID for view.
  • name: unique name for view, shown on toggle button.

Example

"layouts": {
  "multi_pathogen": [{
    //... 
  }],
  "single_pathogen": [
    {
      "id": "cases",
      "name": "Case Counts",
      "layout_file": "overview.json"
    },
    {
      "id": "patients",
      "name": "Patient Information",
      "layout_file": "patients.json"
    }
  ]
}

Timeline

Configuration for the header timeline and charts with time on the x-axis.

  • dataInterval: The temporal resolution in which data appears, in days. Use 1 to show data by day, 7 by week, etc.
  • selectionCount: The number of dataIntervals to include in the initial timeline selection window. For example, with dataInterval: 7 and selectionCount: 4, the selection window will span four weeks.

Example

  "timeline": {
    "dataInterval": 7,  // data aggregated by week
    "selectionCount": 4, // initial selection spans 4 weeks
  }

Labels

Instead of displaying your data as it appears in records.json, you can define human-readable labels as labels in config.json.

  "labels": {
    "fields": {
      "disease-a": "Disease A",
    },
    "tests": {
      "pcr": "PCR",
      "positive": "Positive"
    },
    "province": {
      "DE": "Delta", // e.g. "province": "DE" in records.json -> displayed as "Delta"
      "ES": "Escarpement",
      "IM": "Iles de la Mer"
    },
    "occupation": {
      "00": "Teacher",
      "01": "Farmer",
      "02": "Businessperson"
    }
  }

Minimap

Clickable map in the upper right corner of the page that allows you to filter by geography.

  • field: Data field to visualize.
  • uri: Path to SVG map file.
  • admin_sublevel_name and admin_sublevel_name_pl (optional): a label for the geographic units shown. By default, “state” and “states.”

    Example

    "minimap": {
      "field": "geo",
      "uri": "nation.svg",
      "admin_sublevel_name": "Province",
      "admin_sublevel_name_pl": "Provinces"
    }
    

Start view

The layout that appears by default. If unspecified, the start view will be a multi-pathogen view or the first single-pathogen view.

  • view: a single-pathogen layout id specified in config.json.
  • pathogen: the pathogen to show first.
"startView": {
    "view": "single",
    "pathogen": "disease-a"
  } 

Multiple datasets

If your site contains multiple records datasets in site/data, list their names (minus the .json extension) here.

Example:

"datasets": [ "records", "hospitals" ]