Skip to content

Instantly share code, notes, and snippets.

View frodrigo's full-sized avatar

Frédéric Rodrigo frodrigo

  • Bordeaux, France
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<script src="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.js"></script>
<script src="http://techblog.mappy.com/Leaflet-active-area/src/L.activearea.js"></script>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.css" />
<script src="http://leaflet.github.io/Leaflet.markercluster/dist/leaflet.markercluster-src.js"></script>
<style>
body { margin:0; padding:0; }
@frodrigo
frodrigo / run.java
Created September 19, 2015 16:44
sprit mapotempo optimizer
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import jsprit.analysis.toolbox.AlgorithmSearchProgressChartListener;
import jsprit.core.algorithm.VehicleRoutingAlgorithm;
import jsprit.core.algorithm.box.Jsprit;
@frodrigo
frodrigo / healthcare_FR_finess.sh
Created August 8, 2018 12:12
Reformatage de l'Extraction Finess des Etablissements Geolocalisés en un seule section
# Install csvkit before, on Ubuntu python2-csvkit or python3-csvkit
cat etalab_cs1100507_stock_20180608-0437.csv | grep 'structureet;' | iconv -f ISO-8859-15 -t utf-8 | csvcut -d ';' -C 1 > finess-structureet.csv
cat etalab_cs1100507_stock_20180608-0437.csv | grep 'geolocalisation;' | iconv -f ISO-8859-15 -t utf-8 | csvcut -d ';' -C 1 > finess-geolocalisation.csv
echo "nofinesset,nofinessej,rs,rslongue,complrs,compldistrib,numvoie,typvoie,voie,compvoie,lieuditbp,commune,departement,libdepartement,ligneacheminement,telephone,telecopie,categetab,libcategetab,categagretab,libcategagretab,siret,codeape,codemft,libmft,codesph,libsph,dateouv,dateautor,datemaj,numuai,coordxet,coordyet,sourcecoordet,datemajcoord" > finess.csv
csvjoin --no-header-row --columns 1,1 --left finess-structureet.csv finess-geolocalisation.csv | tail -n +2 >> finess.csv
@frodrigo
frodrigo / index.html
Last active May 12, 2020 08:15
Teritorio - Demo - Lang
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title>Change a map's language</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v1.9.1/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v1.9.1/mapbox-gl.css' rel='stylesheet' />
<script src="https://cdn.klokantech.com/openmaptiles-language/v1.0/openmaptiles-language.js"></script>
@frodrigo
frodrigo / README.md
Last active May 12, 2020 08:16
Change a map's boundaries

Experiment on Disputed and Claimed OSM boundaries

I made an attempted to display boundaries according to some countries official point of view. Most of boundary are consensual. But some are de facto with no recognition from one or two of the neighbors. This facto are the ground mapped in OSM. But some countries have different political claims over the territories. Display this claim is often mandatory in these countries. So some boundaries or territories are disputed by countries. Disputed here meaning, that the country is not officially recognized the de facto ground status. Some other boundaries or territories are claimed. The idea here is partially based on the rejected proposed features “Mapping disputed boundaries”.

Consensual borders does not require more details.

Disputed boundaries are here treated as way level. As only a part of the de facto boundary is rejected.

@frodrigo
frodrigo / index.html
Last active May 12, 2020 08:16
Teritorio - Demo - Click
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title>Highlight & Popup</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v1.9.1/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v1.9.1/mapbox-gl.css' rel='stylesheet' />
<style>
@frodrigo
frodrigo / index.html
Last active May 12, 2020 09:09
Teritorio - Change icon style
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title>Change a map's boundaries</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v1.9.1/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v1.9.1/mapbox-gl.css' rel='stylesheet' />
<style>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{"tiles":["https://openmaptiles.geo.data.gouv.fr/data/cadastre/{z}/{x}/{y}.pbf"],"name":"cadastre","format":"pbf","basename":"cadastre.mbtiles","id":"cadastre","description":"dist/parcelles.mbtiles","version":"2","minzoom":11,"maxzoom":16,"center":[55.445251,-20.902437,16],"bounds":[-63.154907,-21.391705,55.838013,51.089723],"type":"overlay","attribution":"<a href=\"https://cadastre.data.gouv.fr/datasets/cadastre-etalab\">Données cadastrales Etalab (janvier 2020)</a>","generator":"tile-join v1.34.2","generator_options":"tippecanoe --no-tile-stats --detect-shared-borders --simplify-only-low-zooms --generate-ids --read-parallel --force --layer batiments --drop-densest-as-needed -Z14 -z16 --output dist/batiments.mbtiles; tippecanoe --no-tile-stats --detect-shared-borders --simplify-only-low-zooms --generate-ids --read-parallel --force --layer sections --coalesce-densest-as-needed -Z11 -z16 --output dist/sections.mbtiles; tippecanoe --no-tile-stats --detect-shared-borders --simplify-only-low-zooms --generate-ids
git clone https://github.com/trahay/bbb-downloader.git
cd bbb-downloader/
virtualenv venv
source venv/bin/activate
pip install -r python-requirements.txt
./download_bbb_data.py https://osmrecordings.cloud68.co/playback/presentation/2.0/playback.html?meetingId=8e094cae9607d20acc55dea61c142ee3f61facdf-1620153757937
./integrate_soundtrack.sh 8e094cae9607d20acc55dea61c142ee3f61facdf-1620153757937/Videos mapcontrib-202010504.mp4