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 / california_nad83_zones_min.geojson
Last active July 27, 2023 22:24
Using geojson with Google Maps API
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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>
# code to take a PDF and scrape address information. Note that this particular script will
# only work using the specific PDF formatting my PDF had so you can use as a guide but
# it will definitely not work on your PDF!
from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter
from pdfminer.converter import HTMLConverter
from pdfminer.converter import TextConverter
from pdfminer.layout import LAParams
from pdfminer.pdfpage import PDFPage
@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 / county.json
Last active May 3, 2023 19:23
Putting TopoJSON on a Google Map
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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
Last active July 25, 2016 23:57
TopoJSON to LeafletJS Using D3.js
<html>
<head>
<title>HTML5</title>
<!--D3 code stolen from: http://bost.ocks.org/mike/leaflet/#init-->
<!--This file used in blog post Spatial data on a diet: tips
for file size reduction using TopoJSON (http://bit.ly/1jvHiqF)-->
<meta charset="utf-8" />
@zross
zross / esri-leaflet.js
Last active February 22, 2024 17:09
Adding ArcGIS services to LeafletJS
/*! Esri-Leaflet - v0.0.1-beta.4 - 2014-03-09
* Copyright (c) 2014 Environmental Systems Research Institute, Inc.
* Apache License*/
L.esri={_callback:{}},L.esri.Support={CORS:!!(window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest)},L.esri.RequestHandlers={CORS:function(a,b,c,d){var e=new XMLHttpRequest;b.f="json",e.onreadystatechange=function(){var a;if(4===e.readyState){try{a=JSON.parse(e.responseText)}catch(b){a={error:"Could not parse response as JSON."}}d?c.call(d,a):c(a)}},e.open("GET",a+"?"+L.esri.Util.serialize(b),!0),e.send(null)},JSONP:function(a,b,c,d){var e="c"+(1e9*Math.random()).toString(36).replace(".","_");b.f="json",b.callback="L.esri._callback."+e;var f=L.DomUtil.create("script",null,document.body);f.type="text/javascript",f.src=a+"?"+L.esri.Util.serialize(b),f.id=e,L.esri._callback[e]=function(a){d?c.call(d,a):c(a),document.body.removeChild(f),delete L.esri._callback[e]}}},L.esri.get=L.esri.Support.CORS?L.esri.RequestHandlers.CORS:L.esri.RequestHandlers.JSONP,L.esri.Mixins={},
@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;