Skip to content

Instantly share code, notes, and snippets.

View mapmeld's full-sized avatar

Nick Doiron mapmeld

  • Chicago, IL
View GitHub Profile
@mapmeld
mapmeld / mimu.topojson
Created July 2, 2015 08:50
Topojson 2
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mapmeld
mapmeld / regions.topojson
Created July 6, 2015 07:15
MIMU-Regions
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mapmeld
mapmeld / uncommitted.md
Last active September 15, 2015 04:44
uncommitted

As an experiment, I'm setting up an instance of http://GOGS.io (sort of a GitHub clone written in Go) where your user and org must be two kanji characters (used in Chinese, Japanese, Korean languages). Over time, I'm hoping to add more significant changes:

  • hiding the git concepts
  • accepting pull requests automatically within a week
  • inviting a user to edit a section of a file, and automatically accepting that input
  • inviting members of the public to contribute content (not code) in some way, without signing in

I've always had mixed feelings about git and GitHub, from exploring GeoGit two years ago, to last year saying we needed an "Ello for GitHub" (do you remember Ello?). Generally great tools are great, but then we start to think that they are the only way of doing things. We start thinking that GitHub is the place for writing, 3D design,

@mapmeld
mapmeld / scraper-1
Created April 10, 2012 03:20
Scraping County GIS
get '/parcel' do
url = 'http://gis.co.bibb.ga.us/freeance/Server/Dzeims3.php'
url = URI.parse(url)
headers = {
"Accept" => "*/*",
"Accept-Charset" => "ISO-8859-1,utf-8;q=0.7,*;q=0.3",
"Accept-Encoding" => "gzip,deflate,sdch",
"Accept-Language" => "en-US,en;q=0.8",
"Connection" => "keep-alive",
"Content-Length" => "409",
@mapmeld
mapmeld / fieldpapers-bookmarklet.js
Created April 19, 2012 06:04
Red Pen: experimental auto-marker for FieldPapers.org
/*
Red Pen turns red (and blue!) dots on Field Papers tiles into markers automatically
Tested with Sharpie and PaperMate ballpoint pens
Write a description to save the marker
I don't understand the server-side installation or the QR-scanning, so I'm using a bookmarklet
Client-side HTML5 Canvas for tile inspection
*/
// collect the most zoomed-in tiles from the scan
var zoomimgs = document.getElementsByTagName("img");
@mapmeld
mapmeld / CalGOLD-SC.rb
Created April 30, 2012 22:50
CalGOLD Search for Santa Cruz
get '/calgold' do
if params["kywd"] == "search"
return "<!DOCTYPE html>\n<html>\n<head>\n<link href='/bootstrap-mini.css' rel='stylesheet' type='text/css'/></head>\n<body>\n<div class='well'><h3>What is your business type?</h3>\n<form action='/calgold' method='get'><input name='kywd' value='' placeholder='Category'/><input type='submit' class='btn btn-info' value='Search' style='vertical-align:top;'/></form><br/><h4>Examples</h4><i>shoe store</i><br/><i>restaurant</i><br/><i>bowling alley</i><br/>or try <i>general business information</i><br/><a href='http://calgold.ca.gov/Default.asp?VW=OUT&TOP=N&KYWD=' target='_blank'>All Business Types</a></div>\n</body>\n</html>"
end
postparams = {"kywd" => params["kywd"], "VW" => "OUT"}
catquest = Net::HTTP.post_form(URI.parse('http://www.calgold.ca.gov/Default.asp?VW=OUT'), postparams)
categories = catquest.body.split("<input type='CHECKBOX'")
index = 0
linkout = ""
categories.each do |category|
@mapmeld
mapmeld / OpenBlock_EsriMap.html
Created May 3, 2012 02:19
OpenBlock with Esri Map
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><style type="text/css">@media print { .gmnoprint { display:none }}@media screen { .gmnoscreen { display:none }}</style>
<title>Bibb County | OpenBlock Test</title>
<meta name="robots" content="noarchive">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9" />
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>
<link rel="home" title="Home" href="http://demo.openblockproject.org/">
@mapmeld
mapmeld / parking-app-hnl.html
Created May 17, 2012 17:56
Parking App using HNL data, Esri maps
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9" />
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"
/>
<title>Parcel Locator</title>
<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.8/js/dojo/dijit/themes/claro/claro.css">
<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.8/js/esri/dijit/css/Popup.css">
@mapmeld
mapmeld / xyzwms.rb
Created June 10, 2012 21:06
XYZ tile to WMS
get '/countymap/:z/:x/:y' do
x = params[:x].to_i
y = params[:y].to_i
z = params[:z].to_i
maxExtent = {
"left" => -20037508.34,
"right" => 20037508.34,
"top" => 20037508.34,
"bottom" => -20037508.34
}
@mapmeld
mapmeld / buswrite.py
Created June 10, 2012 21:59
MTA Bus Mapper
from datetime import datetime, timedelta
m31 = open('June 1.csv','r')
buses = { }
def zap(content):
return content.replace('\x00','').replace('\r\n','')
firstline = 1
minutebyminute = timedelta(minutes=1)