that is ok ?
{
"$schema":"https://vega.github.io/schema/vega/v4.3.0.json",
"config":{
"range":{
"category":{
"scheme":"elastic"
}
},
"arc":{
"fill":"#00B3A4"
},
"area":{
"fill":"#00B3A4"
},
"line":{
"stroke":"#00B3A4"
},
"path":{
"stroke":"#00B3A4"
},
"rect":{
"fill":"#00B3A4"
},
"rule":{
"stroke":"#00B3A4"
},
"shape":{
"stroke":"#00B3A4"
},
"symbol":{
"fill":"#00B3A4"
},
"trail":{
"fill":"#00B3A4"
}
},
"data":[
{
"name":"points",
"format":{
"type":"json",
"property":"hits.hits"
},
"transform":[
{
"type":"formula",
"as":"lon",
"expr":"datum._source.cit_long"
},
{
"type":"formula",
"as":"lat",
"expr":"datum._source.cit_lat"
},
{
"type":"geopoint",
"projection":"projection",
"fields":[
{
"expr":"datum._source.cit_long"
},
{
"expr":"datum._source.cit_lat"
}
],
"as":[
"x",
"y"
]
},
{
"type":"aggregate",
"groupby":[
"cit_code_insee"
],
"fields":[
"montant_signe",
"nb_ventes",
"prix_moyen_m2"
],
"ops":[
"sum",
"sum",
"average"
],
"as":[
"CA",
"nbventes",
"prixm2"
]
}
],
"values":{
"took":7,
"timed_out":false,
"_shards":{
"total":1,
"successful":1,
"skipped":0,
"failed":0
},
"hits":{
"total":{
"value":364,
"relation":"eq"
},
"max_score":1,
"hits":[
{
"_index":"index_trecobat",
"_type":"_doc",
"_id":"06155-2019-01-01",
"_score":1,
"_source":{
"date_vente":"2019-01-01",
"nb_ventes":1,
"admin_date_signature":"2019-04-01T22:00:00.000Z",
"@version":"1",
"cit_code_insee":"06155",
"cit_lat":43.57332189473686,
"prix_moyen_m2":null,
"taille_points":357,
"montant_signe":458354,
"cit_name":"Vallauris",
"@timestamp":"2018-12-31T23:00:00.000Z",
"couleur_points":"#FF8D1A",
"location":"43.57332189473686,7.062251",
"cit_long":7.062251
},
"lon":7.062251,
"lat":43.57332189473686,
"x":564.4108899555556,
"y":343.44408324028655
}
]
}
}
}
],
"marks":[
{
"name":"marks",
"type":"symbol",
"clip":true,
"from":{
"data":"points"
},
"encode":{
"update":{
"opacity":{
"value":0.65
},
"stroke":{
"value":"black"
},
"fill":{
"field":"_source.couleur_points",
"type":"color"
},
"size":{
"field":"_source.taille_points"
},
"strokeWidth":{
"value":1
},
"strokeOpacity":{
"value":0.8
},
"tooltip":{
"signal":"{'Ville':datum._source.cit_name,'CA':datum._source.montant_signe +' €','Nombre de vente':datum._source.nb_ventes,'Prix moyen du m²': datum._source.prix_moyen_m2 + ' €'}"
},
"x":{
"field":"x"
},
"y":{
"field":"y"
}
},
"hover":{
"strokeWidth":{
"value":2
},
"stroke":{
"value":"red"
},
"strokeOpacity":{
"value":1
},
"opacity":{
"value":1
}
}
}
}
],
"padding":0,
"autosize":"none",
"signals":[
{
"name":"zoom"
},
{
"name":"latitude"
},
{
"name":"longitude"
}
],
"projections":[
{
"name":"projection",
"type":"mercator",
"scale":{
"signal":"256*pow(2,zoom)/2/PI"
},
"rotate":[
{
"signal":"-longitude"
},
0,
0
],
"center":[
0,
{
"signal":"latitude"
}
],
"translate":[
{
"signal":"width/2"
},
{
"signal":"height/2"
}
],
"fit":false
}
]
}