Skip to content

Instantly share code, notes, and snippets.

@aborruso
Created May 11, 2021 09:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aborruso/99582744d9c8b1cd184da67af0af69d8 to your computer and use it in GitHub Desktop.
Save aborruso/99582744d9c8b1cd184da67af0af69d8 to your computer and use it in GitHub Desktop.
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"name": "trellis_barley",
"description": "Trellis",
"title": {
"text": "Ingressi giornalieri in Terapia Intensiva (TI) a confronto con ricoveri totali in TI",
"color": "#168CC7",
"fontSize": 18,
"anchor": "start",
"font": "Montserrat",
"subtitle": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam convallis enim ac fringilla feugiat",
"subtitleFont": "Montserrat"
},
"data": {
"url": "https://gist.githubusercontent.com/aborruso/7f3850b8db74d962124b434e1bfa0e62/raw/d225e6dbcf21b2d3c18ed101a3be5ace3584a55d/trellis_mm_naz.csv",
"transform": [{"calculate": "timeFormat(datum.data, '%B')", "as": "Month"}]
},
"mark": "point",
"height": 400,
"width": 400,
"encoding": {
"x": {
"field": "ingressi_terapia_intensiva_mm",
"type": "quantitative",
"title": "Ingressi giornalieri in TI",
"scale": {"zero": false, "padding": 10}
},
"y": {
"field": "terapia_intensiva_mm",
"type": "quantitative",
"title": "Totale ricoveri in TI",
"scale": {"zero": false, "padding": 10}
},
"tooltip": [
{"field": "data", "type": "temporal", "title": "mese", "format": "%B"},
{"field": "data", "type": "temporal", "title": "data"}
],
"color": {
"field": "Month",
"type": "nominal",
"legend": {"title": "Mesi"},
"scale": {"scheme": "tableau10"}
}
},
"resolve": {"scale": {"x": "independent", "y": "independent"}}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment