Skip to content

Instantly share code, notes, and snippets.

View napo's full-sized avatar
💭
guru meditation

Maurizio Napolitano napo

💭
guru meditation
View GitHub Profile
import urllib
import json
file_url = 'https://api.datawrapper.de/v3/basemaps/rome-zip'
file_json = "rome.json"
file_output = "rome.topojson"
urllib.request.urlretrieve(file_url ,file_json)
with open(file_json, 'r') as f:
json_data = json.load(f)
topojson = dict(json_data["content"])
with open(file_output, 'w') as f:
{
"vehicles": [
{
"id": 1,
"description": "Vehicle 1",
"profile": "driving-car",
"capacity": [
250
],
"start": [
{
"vehicles": [
{
"id": 1,
"description": "Vehicle 1",
"profile": "driving-car",
"capacity": [
250
],
"start": [
for i in `seq 1 15`;
do
pdftk documento.pdf cat "$i" output "$i.pdf";
done
for i in `seq 1 15`;
do
pdftoppm $i.pdf > $i.ppm;
done
Comunità di Valle 1985 2000 2005 2010 2015 2017 2018
Val di Fiemme 85724 143186 170182 178296 203687 227016 229477
Primiero 65271 107233 127051 130268 132223 144760 147015
Valsugana e Tesino 8198 14351 18666 17987 15580 17517 18200
Alta Valsugana e Bersntol 83376 117149 125346 129094 152331 181113 182140
Valle di Cembra 1277 4079 7010 8927 10039 9979 10754
Val di Non 23498 49749 56732 63134 84327 97496 95882
Valle di Sole 115934 225292 260620 279771 300032 333072 345148
Giudicarie 124995 182705 212160 241896 268474 308712 320434
Alto Garda e Ledro 205346 396680 423123 474128 570931 606660 605375
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 14 columns, instead of 6. in line 5.
OBJECTID,ID_NLS,PROV,COMUNE,INDIRIZZO,DENOMINAZIONE,INSEGNA,RIC,INIZIO_ATT,POINT_X,POINT_Y,ISTAT,lon,lat
1,7530,LO,LODI,"CORSO VITTORIO EMANUELE II,0032",ENOTECA E DOLCERIE S.N.C. DEI FRATELLI DI TOMA NICOLA E SABRINA,enoteca e dolcerie DE TOMA,Storica Attivita',1927,9.50113006,45.31334665,98031,9.501130064783348,45.31334665167601
10,7582,CR,CREMONA,"VIA DEL GIORDANO,55-57-59",COLORIFICIO PICCIONI SAS DI PICCIONI ATTILIO E C.,COLORIFICIO PICCIONI SAS DI PICCIONI ATTILIO E C.,Storica Attivita',1962,10.01912074,45.13012024,19036,10.019120738917318,45.13012023655117
100,7700,CR,CREMONA,"VIA DANTE ALIGHIERI,80",TRATTORIA LA PICCOLA DI BOCCELLI DANIELE E C. SNC,TRATTORIA LA PICCOLA,Storica Attivita',1960,10.01985338,45.14209484,19036,10.019853376901843,45.14209483799982
101,7697,MI,MILANO,"P.ZZA DUOMO - PORT.MERIDIONALI,SNC",LABO' GIAMPIERO LUIGI,Edicola Labò,Storica Attivita',1951,9.22962973,45.68860619,15146,9.229629728622903,45.68860619352299
102,7657,VA,OLGIATE OLONA,"VIA DEL SEMPIONE,108/112",COLORIFICIO RIG
nome colonna percorso xml
codice //STATOPS/PRONTO_SOCCORSO/COD_PS_OD
località //STATOPS/PRONTO_SOCCORSO/LOCALITA
pronto_soccorso //STATOPS/PRONTO_SOCCORSO/PS
data //STATOPS/DATA_AGGIORNAMENTO
attesa //STATOPS/PRONTO_SOCCORSO/ATTESA
ambulatorio //STATOPS/PRONTO_SOCCORSO/AMBULATORIO
osservazione_bianco //STATOPS/PRONTO_SOCCORSO/OSSERVAZIONE
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<!-- inserire il titolo della mappa -->
<title>titolo della mappa</title>
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0" />
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" />
<script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet.js"></script>
<script src="http://frogcat.github.io/leaflet-tilelayer-mask/leaflet-tilelayer-mask.js"></script>
@napo
napo / attributi_spazzamento.csv
Last active April 13, 2018 09:30
attributi di spazzamento.shp - solo desvia, codice e percorso
strada desvia percorso
5290 VIA 4 NOVEMBRE 32
430 VIA BRESCIA 29
3150 VIA DEI SOLTERI 28
2495 VIA A. PRANZELORES 28
3510 VIA VITTORIO VENETO 17
3832 VIA V. DE RICCABONA 27
1630 VIA B. MALFATTI 16
1730 VIA A. MANZONI 15
1130 PIAZZA DI FIERA 7