Graphic Total serology test numbers logs

API
Timestamp User Remote address User agent Added keys Updated items Removed items
2024-02-19T07:06:54.324Z liane 10.42.5.232 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.3 Safari/605.1.15
[]
{
  "specification": {
    "$schema": "https://vega.github.io/schema/vega-lite/v4.json",
    "data": {
      "url": "https://datagraphics.dc.scilifelab.se/api/dataset/6d6f551abc10413a97a6ab64ebac46bd.csv"
    },
    "transform": [
      {
        "calculate": "if(datum.class === 'R&D', 'R&D*', datum.class)",
        "as": "classUpdated"
      },
      {
        "calculate": "if(datum.class === 'positive', datum.count, 0)",
        "as": "onlyPositive"
      },
      {
        "calculate": "if(datum.class === 'negative', datum.count, 0)",
        "as": "onlyNegative"
      },
      {
        "joinaggregate": [
          {
            "op": "sum",
            "field": "onlyPositive",
            "as": "onlyPositiveSum"
          },
          {
            "op": "sum",
            "field": "onlyNegative",
            "as": "onlyNegativeSum"
          }
        ]
      },
      {
        "calculate": "datum.onlyPositiveSum/((datum.onlyPositiveSum+datum.onlyNegativeSum)/100)",
        "as": "frPos"
      }
    ],
    "hconcat": [
      {
        "width": 500,
        "height": 60,
        "title": "Total number of tests",
        "encoding": {
          "y": {
            "field": "classUpdated",
            "axis": {
              "title": null
            },
            "type": "nominal",
            "sort": [
              "positive",
              "negative",
              "R&D*"
            ]
          },
          "x": {
            "field": "count",
            "aggregate": "sum",
            "type": "quantitative",
            "title": null,
            "scale": {
              "padding": 10
            }
          },
          "color": {
            "field": "classUpdated",
            "legend": null,
            "type": "nominal",
            "scale": {
              "domain": [
                "negative",
                "positive",
                "R&D*"
              ],
              "range": [
                "#8fd7f9",
                "#ef9292",
                "#c7c7c7"
              ]
            }
          }
        },
        "layer": [
          {
            "mark": {
              "type": "bar"
            }
          },
          {
            "mark": {
              "type": "text",
              "align": "left",
              "baseline": "middle",
              "dx": 3,
              "fill": "black"
            },
            "encoding": {
              "text": {
                "field": "count",
                "aggregate": "sum",
                "type": "quantitative"
              }
            }
          }
        ]
      },
      {
        "title": "Sum total",
        "width": 100,
        "height": 60,
        "mark": {
          "type": "text",
          "baseline": "middle",
          "fontSize": 14,
          "fill": "black"
        },
        "encoding": {
          "text": {
            "field": "count",
            "aggregate": "sum",
            "type": "quantitative"
          }
        }
      },
      {
        "title": "Proportion positive**",
        "width": 100,
        "height": 60,
        "mark": {
          "type": "text",
          "baseline": "middle",
          "fontSize": 14,
          "fill": "black"
        },
        "encoding": {
          "text": {
            "field": "frPos",
            "aggregate": "mean",
            "type": "quantitative",
            "format": ".2f"
          }
        }
      }
    ]
  },
  "error": null
}
{}
2021-01-13T11:35:56.178Z arnold 10.42.3.0 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36
[]
{
  "public": false
}
{}
2021-01-12T15:34:13.399Z arnold 10.42.3.0 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36
[
  "doctype",
  "dataset",
  "created",
  "public",
  "title",
  "description",
  "error",
  "owner",
  "specification"
]
{}
{}

DataGraphics 1.0.4