Published
Edited
Mar 5, 2022
Insert cell
Insert cell
ixmaps.embed("mymap", {
mapCdn: "https://gjrichter.github.io/ixmaps",
mapType: "CartoDB - Positron",
width: "100%",
height: "720px",
legend: "true",
footer: "true"},
map => map
.view([39.96449067924025,15.979614257812502],7)
.options({
objectscaling: "dynamic",
normalSizeScale: "27033",
dynamicScalePow: "3",
panhidden: "false"
})
.layer(stabilmenti_balneari_scadenza)
);
Insert cell
scadenza = function(data,options){
data.addColumn({source:"scadenza",destination:"scaduto"},(value)=>{
var valueA = value.split("/");
var scad = new Date(valueA[2]+"/"+valueA[1]+"/"+valueA[0]);
var act = new Date();
return (Math.floor((act.getTime() - scad.getTime())/(1000*60*60*24*356)));
});
return data;
};

Insert cell
stabilmenti_balneari =
ixmaps.layer("WORLD")
.data({
url: "https://s3.eu-west-1.amazonaws.com/data.ixmaps.com/ConcessioniDemaniali/concessioni.geojson.gz",
type: "geojson"
})
.binding({
value: "$item$", position: "geometry"
})
.type("CHART|DOT|NOLEGEND")
.style({
colorscheme:["#888888"],
scale: "2",
fillopacity: "0.5",
filter: "WHERE \"categoria\" = \"STABILIMENTO BALNEARE PUBBLICO\"",
showdata: "true",
title: "Concessioni & Canoni"
})
.define()


Insert cell
stabilmenti_balneari_scadenza =
ixmaps.layer("WORLD")
.data({
url: "https://s3.eu-west-1.amazonaws.com/data.ixmaps.com/ConcessioniDemaniali/concessioni.geojson.gz",
type: "geojson",
process: scadenza.toString()
})
.binding({
value: "scaduto", position: "geometry"
})
.type("CHART|BUBBLE|VALUES|NOOUTLIER|COUNT")
.style({
colorscheme: [
"green",
"orange",
"red"],
label: [
"non scaduta",
"scaduta da 1 a 10 annni",
"scaduta da più di 10 anni"
],
ranges: "-1000,0,10,1000",
units: "anni",
fillopacity: "0.5",
filter: "WHERE \"categoria\" = \"STABILIMENTO BALNEARE PUBBLICO\"",
sizefield: "scaduto",
valuefield: "scaduto",
showdata: "true",
normalsizevalue: "10",
valuesupper: "1:50000",
title: "Concessioni & Scadenze"
})
.define()

Insert cell
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