Skip to content

Instantly share code, notes, and snippets.

View mbertrand's full-sized avatar

Matt Bertrand mbertrand

  • MIT Office of Digital Learning
  • Massachusetts
View GitHub Profile
@mbertrand
mbertrand / es.json
Last active August 28, 2019 12:03
Filtered nested reverse aggregate search
{
"from": 0,
"size": 6,
"query": {
"bool": {
"should": [
{
"bool": {
"filter": {
"bool": {
@mbertrand
mbertrand / trail_extraction.sh
Created January 5, 2018 21:39
Extracting Trails and Campsites from OSM
osmium tags-filter new-hampshire-latest.osm.pbf nwr/highway=path,footway,track nwr/ford=yes nwr/tourism=alpine_hut,wilderness_hut,camp_site nwr/amenity=shelter -o nhoutdoors.pbf
osmium export -o nhoutdoors.json nhoutdoors.pbf
<html>
<head>
</head>
<body>
<video id=example-video width=600 class="video-js vjs-default-skin" controls>
<source
src="https://d3p30yeni206w0.cloudfront.net/transcoded/1/26325823-6405-4423-8e54-f893ec815300/video__index.m3u8"
type="application/x-mpegURL">
</video>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/video.js/5.20.1/video-js.min.css" />

Keybase proof

I hereby claim:

  • I am mbertrand on github.
  • I am mattbert (https://keybase.io/mattbert) on keybase.
  • I have a public key ASBJHKHpn25dRpAMLjc2LtxblWR4vxuBSqQVSGipfypUVQo

To claim this, I am signing this object:

@mbertrand
mbertrand / ZonalStats example.ipynb
Last active November 4, 2016 01:17
IMED2016 RasterStats Example
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mbertrand
mbertrand / Chained_clipVector.xml
Last active November 19, 2015 15:24
WPS Examples - Subsetting raster or vector layers by a specific feature from another vector layer.
<?xml version="1.0" encoding="UTF-8"?>
<wps:Execute version="1.0.0" service="WPS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opengis.net/wps/1.0.0" xmlns:wfs="http://www.opengis.net/wfs" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:wcs="http://www.opengis.net/wcs/1.1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd">
<ows:Identifier>vec:Clip</ows:Identifier>
<wps:DataInputs>
<wps:Input>
<ows:Identifier>features</ows:Identifier>
<wps:Reference mimeType="text/xml" xlink:href="http://geoserver/wfs" method="POST">
<wps:Body>
<wfs:GetFeature service="WFS" version="1.0.0" outputFormat="GML2" xmlns:geonode="http://www.geonode.org/">
<wfs:Query typeName="geonode:quakes_weekly"/>
from TileStache import WSGITileServer, splitPathInfo
import re
#
# Decorator for the WSGITileServer that allows for custom tilestache configuration.
#
# Takes in a tilestache config file and a series of parameter names. They'll be sent to the p
@mbertrand
mbertrand / mapconfig.json
Last active August 29, 2015 14:22
Windshaft mapconfig example
{
"version": "1.2.0",
"layers": [
{
"type": "mapnik",
"options": {
"sql": "select * from jsoncn3857",
"geom_column": "wkb_geometry",
"geom_type": "geometry",
"cartocss": "#layer {line-color:black; line-width:2;polygon-fill:green}",
@mbertrand
mbertrand / index.html
Last active February 16, 2021 01:50
China Provinces - TopoJSON version
<!DOCTYPE html>
<html>
<head>
<title>HTML5</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=650, user-scalable=yes">
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
</script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
@mbertrand
mbertrand / gmap_d3.css
Last active August 29, 2015 14:17
D3.js + Google Maps: USGS Earthquake data
body, html, #map {
font-family: Arial, Helvetica, sans-serif;
margin: 0;
width: 100%;
height: 100%;
}
.SvgOverlay {
position: relative;