Skip to content

Instantly share code, notes, and snippets.

View markmarkoh's full-sized avatar

Mark DiMarco markmarkoh

View GitHub Profile
@markmarkoh
markmarkoh / arcs.js
Created February 4, 2014 18:52
Add Arcs in a timed fashion
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>' + geography.properties.name + '</strong> <br />' + data.desc + ' </div>'
@markmarkoh
markmarkoh / README.md
Last active August 29, 2015 13:56
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.

@markmarkoh
markmarkoh / gist:9749481
Created March 24, 2014 21:25
keybase.md
### Keybase proof
I hereby claim:
* I am markmarkoh on github.
* I am markmarkoh (https://keybase.io/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:
<script id='popup-template' type='text/x-handlebars-template'>
{{{ popup_template }}}
</script>
<script>
var chartParams = {{{ chartParams }}}
chartParams.element = document.getElementById('{{chartId}}')
{{# popup_template }}
var tmplFn = Handlebars.compile(
document.getElementById("popup-template").innerHTML.replace(/\"#!(.*?)!#\"/g, "\\$1")
@markmarkoh
markmarkoh / README.md
Last active August 29, 2015 13:57
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
markmarkoh / index.html
Last active August 29, 2015 13:59 — forked from pachevalier/datamaps.html
Datamaps with custom data and custom projection
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<body>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="http://d3js.org/topojson.v1.min.js"></script>
<script src="http://datamaps.github.io/scripts/datamaps.none.min.js"></script>
<div id="container" style="position: relative; width: 500px; height: 300px;"></div>
<script>
@markmarkoh
markmarkoh / README.md
Last active August 29, 2015 14:00
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.

CSV

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

The format for this data should be:

@markmarkoh
markmarkoh / README.md
Last active August 29, 2015 14:02 — forked from markmarkoh/README.md
Centering bubbles with custom map data
@markmarkoh
markmarkoh / index.html
Created July 1, 2014 02:28
Maxnet Updates
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Realtime Traffic Mapper</title>
<link rel="stylesheet" href="http://www.maxux.net/devs/maptraffic/style.css" media="all" type="text/css" />
<style>
html, body, #map {
height: 100%;