Skip to content

Instantly share code, notes, and snippets.

View zross's full-sized avatar

Zev Ross zross

View GitHub Profile
result<-createCensusTable(
seqnum=c(
"B17010" # Population
),
state="ny",
yr=2010,
span=5,
thetype="e",
sumlevel="BLOCKGROUP",
lineNumbers=list(
@zross
zross / index.html
Last active August 29, 2015 13:58
rCharts D3 Spatial Packages
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<link rel='stylesheet' href='http://nvd3.org/assets/css/nv.d3.css'>
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js' type='text/javascript'></script>
<script src='http://d3js.org/d3.v3.min.js' type='text/javascript'></script>
<script src='http://timelyportfolio.github.io/rCharts_nvd3_tests/libraries/widgets/nvd3/js/nv.d3.min-new.js' type='text/javascript'></script>
<script src='http://nvd3.org/assets/lib/fisheye.js' type='text/javascript'></script>
@zross
zross / index.html
Last active August 29, 2015 13:59
Leaflet Map Created With R Package leafletR
<!DOCTYPE html>
<html>
<head>
<title>Leafletmap</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.css" />
<script src="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.js?2"></script>
<style type="text/css">
body {
@zross
zross / index.html
Last active August 29, 2015 14:00
Put topojson on LeafletJS map
<html>
<head>
<title>HTML5</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=650, user-scalable=yes">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.css" />
<script src="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.js"></script>
<script src="http://d3js.org/topojson.v1.min.js"></script>
@zross
zross / index.html
Created June 18, 2014 13:53
cartodb infowindow trouble
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="">
<head>
<style>
#map1{
height: 400px;
width: 400px;
@zross
zross / exp_sidewalkcafes.js
Created August 4, 2014 20:28
qgis2leaf Example
var exp_sidewalkcafes = {
"type": "FeatureCollection",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { "id_qgis2leaf": 0, "color_qgis2leaf": '#4b8217', "radius_qgis2leaf": 2.5, "transp_qgis2leaf": 1.0, "transp_fill_qgis2leaf": 1.0, "CafeType": "All Cafes", "Shape_Leng": 1246.829238 }, "geometry": { "type": "LineString", "coordinates": [ [ -73.995864681742205, 40.70931879343253 ], [ -73.995719955343887, 40.709341590415235 ], [ -73.994206733869348, 40.709579942150661 ], [ -73.994259568461672, 40.709977648269344 ], [ -73.995971438079593, 40.70971603950121 ], [ -73.995880255834521, 40.709376748462233 ], [ -73.995864681742205, 40.70931879343253 ] ] } },
{ "type": "Feature", "properties": { "id_qgis2leaf": 1, "color_qgis2leaf": '#4b8217', "radius_qgis2leaf": 2.5, "transp_qgis2leaf": 1.0, "transp_fill_qgis2leaf": 1.0, "CafeType": "All Cafes", "Shape
@zross
zross / index.html
Created September 29, 2014 19:33
Path on Leaflet Map with odd zoom behavior
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7/leaflet.css" />
<script src="http://d3js.org/d3.v3.min.js" type="text/javascript"></script>
<script src="http://cdn.leafletjs.com/leaflet-0.7/leaflet.js"></script>
<script src='https://api.tiles.mapbox.com/mapbox.js/v1.6.4/mapbox.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox.js/v1.6.4/mapbox.css' rel='stylesheet' />
@zross
zross / index.html
Created October 15, 2014 14:18
Leaflet Boilerplate (MapBox tiles, Bootstrap, jQuery)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0" />
<title>Leaflet Boilerplate</title>
@zross
zross / index.html
Created October 21, 2014 16:13
Example of Google Places Library (grab cafes within 500m)
<!DOCTYPE html>
<html>
<head>
<title>Place searches</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<style>
html, body, #map-canvas {
height: 100%;
margin: 0px;
@zross
zross / businesses.json
Last active August 29, 2015 14:07
Leaflet.js Tips, Step 5 (specialized icons)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.