Skip to content

Instantly share code, notes, and snippets.

@pgiraud
pgiraud / leaflet-big-image-full.html
Created May 8, 2020 10:58 — forked from longhotsummer/leaflet-big-image-full.html
Full example of using leaflet to pan and zoom a big image, as described at http://kempe.net/blog/2014/06/14/leaflet-pan-zoom-image.html
<html>
<!-- See also: http://kempe.net/blog/2014/06/14/leaflet-pan-zoom-image.html -->
<head>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css"></script>
<style>
#image-map {
width: 100%;
height: 300px;
border: 1px solid #ccc;
margin-bottom: 10px;
@pgiraud
pgiraud / simple_python_datasource.py
Created August 16, 2018 07:27 — forked from linar-jether/simple_python_datasource.py
Grafana python datasource - using pandas for timeseries and table data. inspired by and compatible with the simple json datasource
from flask import Flask, request, jsonify, json, abort
from flask_cors import CORS, cross_origin
import pandas as pd
app = Flask(__name__)
cors = CORS(app)
app.config['CORS_HEADERS'] = 'Content-Type'
@pgiraud
pgiraud / README.md
Last active August 29, 2015 13:58 — forked from mbostock/.block
@pgiraud
pgiraud / README.md
Created February 17, 2014 10:36 — forked from mbostock/.block

An example of multiple pie (donut) charts created with D3. The data is represented as a two-dimensional array of numbers; each row in the array is mapped to a pie chart. Thus, each pie represents the relative value of a number (such as 1,013) within its rows. Note that in this dataset, the totals for each row are not equal.

@pgiraud
pgiraud / README.md
Last active August 29, 2015 13:56 — forked from mbostock/.block
@pgiraud
pgiraud / README.md
Last active August 29, 2015 13:56 — forked from mbostock/.block

The area of each circle in this symbol map is proportional to the population of the associated state.

<!DOCTYPE html>
<script src="http://mbostock.github.com/d3/d3.v2.js?2.8.1"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<style>
body {
font: 10px sans-serif;
}
rect {
@pgiraud
pgiraud / index.html
Last active August 29, 2015 13:56 — forked from pere/index.html
Leaflet D3js circles
<!DOCTYPE html>
<html>
<head>
<title>Testing d3.js in Leaflet.js</title>
<link rel="stylesheet" href="leaflet.css"></link>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.js"></script>
<style type="text/css">
path
@pgiraud
pgiraud / gist:1550772
Created January 2, 2012 13:57
Open Layers
var map = new OpenLayers.Map('map', {
controls: [
new OpenLayers.Control.Navigation(),
//new OpenLayers.Control.PanZoomBar(),
],
numZoomLevels: 10,
restrictedExtent: new OpenLayers.Bounds(-20037508.34 * 100,-20037508.34,20037508.34 * 100,20037508.34)
});
var osm = new OpenLayers.Layer.OSM(