Skip to content

Instantly share code, notes, and snippets.


Mark DiMarco markmarkoh

View GitHub Profile
markmarkoh / arcs.js
Created Feb 4, 2014
Add Arcs in a timed fashion
View arcs.js
var arcs = new Datamap({
scope: 'world',
element: document.getElementById('arcs'),
projection: 'mercator',
geographyConfig: {
highlightBorderColor: '#bada55',
popupTemplate: function(geography, data) {
if ( data )
return '<div class="hoverinfo" style="max-width: 300px;"><strong>' + + '</strong> <br />' + data.desc + ' </div>'
markmarkoh /
Last active Aug 29, 2015
Texas vs the North East

If my hometown in Montgomery, New York were to overlay my current location in Austin, Texas.

Experimenting with qGIS, ogr2ogr and TopoJSON.

View gist:9749481
### Keybase proof
I hereby claim:
* I am markmarkoh on github.
* I am markmarkoh ( on keybase.
* I have a public key whose fingerprint is 3E98 C273 2434 4AB1 832C DD4C 7875 6107 8850 09AE
To claim this, I am signing this object:
View chart_usda.html
<script id='popup-template' type='text/x-handlebars-template'>
{{{ popup_template }}}
var chartParams = {{{ chartParams }}}
chartParams.element = document.getElementById('{{chartId}}')
{{# popup_template }}
var tmplFn = Handlebars.compile(
document.getElementById("popup-template").innerHTML.replace(/\"#!(.*?)!#\"/g, "\\$1")
markmarkoh /
Last active Aug 29, 2015
State Centered Bubbles

Center Bubbles in each state

Instead of passing a distinct latitude/longitude with each bubble, you can optionally pass a centered property which should be the ISO ID ( 2 character for US states (like NY), 3 character for Countries (like USA) ). The bubbles will appeared in the centermost point of each geography.

More DataMaps here

markmarkoh / index.html
Last active Aug 29, 2015 — forked from pachevalier/datamaps.html
Datamaps with custom data and custom projection
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<script src=""></script>
<script src=""></script>
<script src=""></script>
<div id="container" style="position: relative; width: 500px; height: 300px;"></div>
markmarkoh /
Last active Aug 29, 2015
Fetching remote data with Datamaps

Remote Data with Datamaps

If you have data in CSV or JSON format on your server, you can now ( v0.2.7 ) fetch that data remotely.


To specify CSV, set dataType to "csv" and specify the dataUrl for the resource.

The format for this data should be:

markmarkoh /
Last active Aug 29, 2015 — forked from markmarkoh/
Centering bubbles with custom map data
View index.html
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8" />
<title>Realtime Traffic Mapper</title>
<link rel="stylesheet" href="" media="all" type="text/css" />
html, body, #map {
height: 100%;
You can’t perform that action at this time.