Published
Edited
Nov 1, 2021
Insert cell
Insert cell
ixmaps.embed("mymap", {
mapCdn: "https://gjrichter.github.io/ixmaps",
width: "75%",
height: "900px",
legend: "true",
align: "right"
},
map => map
// zoom and position the map
.loadProject(project())
);
Insert cell
project = () => {
return {
"$schema": "https://gjrichter.github.io/ixmaps/schema/ixmaps/v1.json",
"map": {
"map": "",
"basemap": "white",
"legend": "<h3><b>Incidenza cumulativa di 7 giorni</b> nuovi casi in 7 giorni per 100.000 abitanti</h3><h4>Visualizzazione di dati 'COVID-19 Italia' al livello provinciale, pubblicati dalla <b>Dipartimento Protezione Civile</b></h4><h4>Fonte: <a href='https://github.com/pcm-dpc/COVID-19/' target='_blank'>Protezione Civile</a><br>Licenza: <a href='https://creativecommons.org/licenses/by/4.0/' target='_blank'>CC-BY 4.0</a></h4>",
"item": "html",
"scaleParam": {
"normalSizeScale": "5000000"
},
"options": {
"featurescaling": "dynamic",
"objectscaling": "dynamic",
"panhidden":"false",
"flushChartDraw":"100000",
"legend": "true"
},
"center": {
"lat": "41.98807738309159",
"lng": "12.54638671875"
},
"zoom": "6"
},
"themes": [
theme_geo(),
theme_choro(),
theme_pointer(),
theme_text()
]
}
}
Insert cell
Insert cell
theme_geo = () => {
return {
"layer": "Province_2019",
"field": "$item$",
"field100": "",
"style": {
"type": "FEATURES|NOLEGEND",
"colorscheme": [
"#f8f8f8"],
"fillopacity": "1",
"shadow": "false",
"dbtable": "Province_2019",
"dbtableUrl": "https://s3.eu-central-1.amazonaws.com/maps.ixmaps.com/Istat/province_2019/Province_s.geojson.gz",
"dbtableType": "geojson",
"datacache": "true",
"itemfield": "COD_PROV",
"lookupfield": "geometry",
"units": "",
"refreshtimeout": "0",
"scale": "1",
"linecolor": [
"white"],
"linewidth": "0.5",
"valuescale": "1",
"title": "Province 2019"
}
}
}
Insert cell
Insert cell
theme_choro = () => {
return {
"layer": "Province_2019",
"field": "incidenza",
"field100": "",
"style": {
"type": "CHOROPLETH|QUANTILE|SIMPLELEGEND",
"colorscheme": [
"green",
"#F1D8DE",
"#F4A7BC",
"#DD0044"],
"ranges": [
"0",
"35",
"100",
"250",
"1000"],
"label": [
"< 35",
"35 - 99",
"100 - 249",
">= 250"],
"fillopacity": "0.5",
"shadow": "false",
"dbtable": "PCM_DPC_COVID_LAST_INCID_100000_CUMUL_7",
"dbtableType": "ext",
"dbtableExt": "https://gjrichter.github.io/viz/COVID-19/projects/COVID-19-PCM_DPC/databroker_PCM_DPC_COVID_Province.js",
"datacache": "false",
"lookupfield": "codice_provincia",
"lookuptonumber": "true",
"units": "",
"refreshtimeout": "0",
"scale": "1",
"dopacitypow": "2",
"dopacityscale": "3",
"titlefield": "denominazione_provincia",
"valueupper": "1:1000000",
"valuescale": "1",
"valuedecimals": "1",
"title": "Incidenza cumulativa di 7 giorni",
"description": "Visualizzazione di dati 'COVID-19 Italia' al livello provinciale, pubblicati dalla <b>Dipartimento Protezione Civile</b></h4><h4>Fonte: <a href='https://github.com/pcm-dpc/COVID-19/' target='_blank'>Protezione Civile</a><br>Licenza: <a href='https://creativecommons.org/licenses/by/4.0/' target='_blank'>CC-BY 4.0</a>"
}
}
}
Insert cell
Insert cell
theme_pointer = () => {
return {
"layer": "Province_2019",
"field": "14/4/2021|15/4/2021",
"field100": "",
"style": {
"type": "CHART|BAR|POINTER|SIZEP4|DIFFERENCE|VALUES",
"colorscheme": [
"green",
"#DD0044"],
"fillopacity": "0.7",
"fadenegative": "0.7",
"shadow": "false",
"dbtable": "PCM_DPC_COVID_SEQUENCE_INCIDENZA_100000_CUMUL_7_LAST_DIFF",
"dbtableType": "ext",
"dbtableExt": "https://gjrichter.github.io/viz/COVID-19/projects/COVID-19-PCM_DPC/databroker_PCM_DPC_COVID_Province.js",
"datacache": "false",
"lookupfield": "codice_provincia",
"lookuptonumber": "true",
"ranges": [
"-10000",
"0",
"100000"],
"units": "",
"refreshtimeout": "0",
"scale": "2",
"dopacitypow": "1",
"dopacityscale": "3",
"titlefield": "denominazione_provincia",
"linecolor":"white",
"linewidth":"1",
"valuescale": "1",
"valuedecimals": "1",
"title": "Variazione incidenza"
}
}
}
Insert cell
Insert cell
theme_text = () => {
return { "layer": "Province_2019",
"field": "incidenza",
"field100": "",
"style": {
"type": "CHART|SYMBOL|QUANTILE|TEXTONLY|NOLEGEND|VALUES",
"colorscheme": [
"green",
"#F1D8DE",
"#F4A7BC",
"#DD0044"],
"fillopacity": "0.6",
"shadow": "false",
"dbtable": "PCM_DPC_COVID_LAST_INCID_100000_CUMUL_7_ALT",
"dbtableType": "ext",
"dbtableExt": "https://gjrichter.github.io/viz/COVID-19/projects/COVID-19-PCM_DPC/databroker_PCM_DPC_COVID_Province.js",
"datacache": "false",
"lookupfield": "codice_provincia",
"lookuptonumber": "true",
"ranges": [
"0",
"35",
"100",
"250",
"1000"],
"symbols": [
"label"],
"label": [
"< 35",
"35 - 99",
"100 - 249",
">= 250"],
"units": "nuovi casi x 100 000",
"refreshtimeout": "0",
"scale": "2",
"labelfield": "denominazione_provincia",
"dopacitypow": "1",
"dopacityscale": "3",
"titlefield": "denominazione_provincia",
"labelupper": "1:3000000",
"valuescale": "1",
"valuedecimals": "1",
"title": "Incidenza"
}
}
}

Insert cell
ixmaps = require('https://gjrichter.github.io/ixmaps/ui/js/htmlgui_api.js')
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more