Skip to content

Instantly share code, notes, and snippets.

View hepplerj's full-sized avatar
💭
building the history web

Jason Heppler hepplerj

💭
building the history web
View GitHub Profile
@hepplerj
hepplerj / rhine.json
Created October 6, 2015 20:55
Custom Neatline base map
{
"Mapbox (Custom)": [
{
"title": "Mapbox Rhine custom",
"id": "Mapbox.mgtaylor.e25e78e6",
"type": "XYZ",
"properties": {
"urls": [
@hepplerj
hepplerj / Sublime.json
Created October 17, 2015 00:05
Sublime Text preferences
{
"auto_complete_triggers":
[
{
"characters": ".@",
"selector": "source.coffee, source.litcoffee, source.coffee.md"
}
],
"bibtex_file_path": "/Users/jheppler/Dropbox/acad/bib/master.bib",
"bold_folder_labels": true,
@hepplerj
hepplerj / data.json
Last active November 16, 2015 21:17
Punchcard Visualization
[
{
"tasks": [
[
12,
6
],
[
13,
10
@hepplerj
hepplerj / .gistup
Last active April 28, 2016 17:14
Greenland coast
gistup
@hepplerj
hepplerj / ocr-check.py
Created May 13, 2016 16:12
OCR cleanup check
#!/usr/bin/env python
import collections, pprint, re, sys
with open(sys.argv[1],'r') as file_in:
chars = re.sub('[\s\w!!"#$%&()*+,-./:;<=>?@^_`{|}~\[\]\'\\\]','', file_in.read())
counts = collections.Counter(chars)
pprint.pprint(counts.most_common())
@hepplerj
hepplerj / superfund.R
Created June 15, 2016 20:24
Data prep for DHSI
# Superfund sites CSV
calif_superfund_sites <- read.csv("./data/calif_superfund_sites.csv")
# We'll clean up the Superfund data a bit, selecting only
# the columns we want to keep.
calif_superfund_sites <- calif_superfund_sites %>%
select(NAME, CITY,STATE,ZIP,LONGITUDE,LATITUDE,STATUSDATE,HRS_SCORE)
# Let's filter out California sites.
calif_superfund_sites <- subset(calif_superfund_sites,
STATE %in% "CA")
# Convert the date into an R friendly version.
@hepplerj
hepplerj / index.html
Last active April 20, 2019 01:46
Minard map
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!-- D3.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js" charset="utf-8"></script>
<!-- Google fonts -->
<link href='https://fonts.googleapis.com/css?family=Cardo:400,400italic,700' rel='stylesheet' type='text/css'>
@hepplerj
hepplerj / README.md
Last active March 20, 2017 02:40
Using WMS in maps

Using WMS in web maps.

@hepplerj
hepplerj / index.html
Last active March 27, 2017 18:28
Threshold scale
<!DOCTYPE html>
<svg width="960" height="500"><g transform="translate(360,250)"></g></svg>
<script src="https://d3js.org/d3.v4.min.js"></script>
<script>
var formatPercent = d3.format(".0%"),
formatNumber = d3.format(".0f");
var threshold = d3.scaleThreshold()
.domain([0.11, 0.22, 0.33, 0.50])
@hepplerj
hepplerj / README.md
Last active March 27, 2017 18:36
TopoJSON merge

Testing topojson.merge to merge multiple polygons into a single polygon.