Skip to content

Instantly share code, notes, and snippets.

Mark DiMarco markmarkoh

Block or report user

Report or block markmarkoh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@markmarkoh
markmarkoh / gist:2969317
Created Jun 21, 2012
World Map Geo JSON data
View gist:2969317
var countries_data = {"type":"FeatureCollection","features":[
{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[74.92,37.24],[74.57,37.03],[72.56,36.82],[71.24,36.13],[71.65,35.42],[71.08,34.06],[69.91,34.04],[70.33,33.33],[69.51,33.03],[69.33,31.94],[66.72,31.21],[66.26,29.85],[62.48,29.41],[60.87,29.86],[61.85,31.02],[60.84,31.5],[60.58,33.07],[60.94,33.52],[60.51,34.14],[61.28,35.61],[62.72,35.25],[63.12,35.86],[64.5,36.28],[64.8,37.12],[66.54,37.37],[67.78,37.19],[69.32,37.12],[70.97,38.47],[71.59,37.9],[71.68,36.68],[73.31,37.46],[74.92,37.24]]]]},"properties":{"name":"Afghanistan"},"id":"AF"},
{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[19.44,41.02],[19.37,41.85],[19.65,42.62],[20.07,42.56],[20.59,41.88],[20.82,40.91],[20.98,40.86],[20.01,39.69],[19.29,40.42],[19.44,41.02]]]]},"properties":{"name":"Albania"},"id":"AL"},
{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[2.96,36.8],[8.62,36.94],[8.18,36.52],[8.25,34.64],[7.49,33.89],[9.06,3
@markmarkoh
markmarkoh / index.html
Last active May 15, 2019 — forked from mbostock/.block
Animated line graph ( curtain approach )
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font: 10px sans-serif;
margin: 0;
}
path.line {
@markmarkoh
markmarkoh / gist:2969316
Created Jun 21, 2012
World Map with D3.js
View gist:2969316
(function(window) {
var data,
xy = d3
.geo
.equirectangular()
.scale($('#map_container').width())
.translate([$('#map_container').width() / 2, $('#map_container').height() / 2]),
path = d3
.geo
.path()
@markmarkoh
markmarkoh / gist:2341576
Created Apr 9, 2012
Example Ember.StateManager
View gist:2341576
App.stateManager = Ember.StateManager.create({
//Swap state within this element
rootElement: "#appRoot",
//Simple State
overview: Ember.ViewState.create({
view: App.Overview
}),
@markmarkoh
markmarkoh / README.md
Last active Jun 10, 2018
Custom Map Data in Datamaps
View README.md
@markmarkoh
markmarkoh / README.md
Last active May 14, 2018 — forked from jefffriesen/README.md
US Zip Codes
View README.md

This is a d3.js visualization of US zip codes.

Original zip code dataset from Geocommons.

5MB shapefile with properties such as zipcode, state, name, population, area, more.

http://geocommons.com/overlays/54893 (Thank you Bill Greer)

This converts it nicely:

@markmarkoh
markmarkoh / README.md
Last active Mar 23, 2017
Datamaps with custom map data
View README.md

This example uses custom map data that includes counties in the state of New York. Custom map data is specified with geographyConfig.dataUrl, which will attempt to make d3.json request to that URL.

In this example, counties are referred to by their FIPs code.

The data was converted from a .SHP file to TopoJSON, instructions to do that here

More DataMaps examples here

@markmarkoh
markmarkoh / README.md
Last active Sep 18, 2016 — forked from mbostock/.block
Draw This Graph!
View README.md

Example 'draw this chart' workflow

@markmarkoh
markmarkoh / partials.jsx
Created Jul 2, 2014
Fun with React.js and ES6 Module Transpiler
View partials.jsx
/**
* @jsx React.DOM
*/
import React from 'react';
var ImagePlaceholder = {
imgLoadError: function() {
this.getDOMNode().querySelector('img').src = '/img/no-image.jpg';
}
};
You can’t perform that action at this time.