Public
Edited
Nov 30, 2023
Insert cell
Insert cell
map = ixmaps.embed(
"map2",
{
mapCdn: "https://gjrichter.github.io/ixmaps",
maptype: "white",
width: "90%",
height: "800px",
scrollsafesilent: "true",
legend: 1,
align: "center",
mode: "info",
name: "map"
},
(map) =>
map
.view([41.82824901518532, 15.040283203125002], 6)
.attribution(attribution)
.require("../../ui/js/tools/tooltip_basic.js")
.options({
scrollSafeSilent: "true",
objectscaling: "dynamic",
normalsizescale: "10000000",
flushChartDraw: "5000",
panhidden: "false"
})
.layer(georef)
.layer(bubblechart)
)
Insert cell
Insert cell
Insert cell
query = function (data, options) {
Data.feed({
source:
"https://s3.eu-west-1.amazonaws.com/data.ixmaps.com/Amministrazioni/sesso_e%20_potere/ammcom_23_11_01.csv.gz",
type: "csv"
}).load(function (data) {
(options.type = "jsonDB"), ixmaps.setExternalData(data, options);
});
}
Insert cell
bubblechart = ixmaps
.layer("ITALIA_Comuni_2022")
.data({
query: query.toString(),
type: "ext"
})
.filter('WHERE "descrizione_carica" = "Sindaco"')
.binding({
value: "sesso",
position: "CODICE_ISTAT"
})
.type(
"CHART|SYMBOL|SEQUENCE|SIZE|ZEROISVALUE|NEGATIVEISVALUE|AGGREGATE|RELOCATE|CATEGORICAL|VALUES|INLINETEXT|COUNT|COMPACTLEGEND"
)
.style({
colorscheme: ["#0088dd", "#F05757"],
fillopacity: "0.7",
dopacitypow: "2",
dopacityscale: "3",
linecolor: ["white"],
symbols: ["circle"],
values: ["M", "F"],
label: ["Sindaci", "Sindache"],
scale: "2",
linewidth: "1.5",
valuedecimals: "0",
sizefield: "popolazione_censita",
valuefield: "nome",
titlefield: "denominazione_comune",
showdata: "true",
datafields: ["nome", "cognome", "data_nascita"]
})
.meta({
title: "Sindaci e sindache in carica al 12 novembre 2023"
})
.define()
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
ixmaps = require('https://gjrichter.github.io/ixmaps/ui/js/htmlgui_api.js')
Insert cell
Inputs = require("@observablehq/inputs@0.7.21/dist/inputs.umd.min.js")
Insert cell
Data = require('https://gjrichter.github.io/data.js/data.js')
Insert cell
$ = require('https://code.jquery.com/jquery-3.3.1.min.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