Skip to content

Instantly share code, notes, and snippets.

View mjfoster83's full-sized avatar

Mike Foster mjfoster83

View GitHub Profile
@mjfoster83
mjfoster83 / README.md
Last active November 17, 2020 18:24
D3js v4 Stacked Bar Chart - with Tooltip Hover
@mjfoster83
mjfoster83 / README.md
Last active January 16, 2020 09:40
D3js v4 Choropleth - Threshold Breaks
@mjfoster83
mjfoster83 / boston_neighborhoods.json
Last active January 16, 2020 09:40
D3 HTML Slider Map
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mjfoster83
mjfoster83 / coffee_rodents.csv
Last active March 21, 2016 21:12
D3 Transitioning Scatterplot
city rats coffee rats2 coffee2
Somerville 60 40 40 60
Cambridge 30 90 80 100
Boston 90 120 10 30
Brookline 40 50 60 30
Chelsea 10 10 100 120
@mjfoster83
mjfoster83 / ws_geo_geojson.php
Last active June 7, 2020 05:34
Dirt-Simple PostGIS HTTP Rest API: Get GeoJSON
<?php
/*
Get GeoJSON
Returns a GeoJSON from your table.
Based on:
https://github.com/bmcbride/PHP-Database-GeoJSON by Brian McBride
To be used with the Dirt-Simple PostGIS HTTP API:
https://github.com/tobinbradley/dirt-simple-postgis-http-api by @tobinbradley
*/
@mjfoster83
mjfoster83 / index.html
Created April 1, 2015 19:36
Leaflet-CartoDB Data Collection Tool
<!DOCTYPE html>
<html>
<head>
<title>Leaflet to CartoDB - Point Collection Tool Beta</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
<link rel="stylesheet" href="http://leaflet.github.io/Leaflet.draw/leaflet.draw.css" />
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<style>
@mjfoster83
mjfoster83 / index.html
Last active August 29, 2015 14:02
Color Starter - The Web Safe Palette
<!doctype html>
<html>
<head>
<title>Color Starter - A Starter Palette</title>
<script type="text/javascript" src="http://d3js.org/d3.v2.min.js"></script>
<script type="text/javascript">
function draw(data) {
"use strict";
var w=960, h=500;