Skip to content

Instantly share code, notes, and snippets.

View jmcbroom's full-sized avatar

Jimmy McBroom jmcbroom

View GitHub Profile
@jmcbroom
jmcbroom / mcds.csv
Created December 18, 2014 21:34
Michigan cities, townships, villages (from v14 Michigan Geographic Framework)
FIPSCODE FIPSNUM NAME LABEL TYPE SQKM SQMILES ACRES VER LAYOUT PENINSULA
01040 1040 Alcona Alcona Township Township 170.108 65.679 42034.053 14a landscape lower
12460 12460 Caledonia Caledonia Township Township 188.086 72.620 46476.564 14a landscape lower
54740 54740 Mitchell Mitchell Township Township 371.289 143.355 91746.459 14a portrait lower
37380 37380 Haynes Haynes Township Township 90.690 35.016 22409.857 14a landscape lower
37220 37220 Hawes Hawes Township Township 184.906 71.392 45690.897 14a landscape lower
36880 36880 Harrisville Harrisville Township Township 78.543 30.326 19408.279 14a portrait lower
35740 35740 Gustin Gustin Township Township 92.810 35.834 22933.627 14a landscape lower
54060 54060 Millen Millen Township Township 184.839 71.367 45674.334 14a landscape lower
36860 36860 Harrisville City of Harrisville City 1.637 0.632 404.510 14a portrait lower
@jmcbroom
jmcbroom / gist:e948b50faa725e7ee311
Last active August 29, 2015 14:14
field calculator stuff
#### for everywhere BUT detroit
# in pre-script codeblock
rec=0
def autoIncrement(cityid):
# get something to add the incremented number to
citystart = cityid * 10000
global rec
pStart = 1
pInterval = 1
if (rec == 0):
import arcpy
mxd = arcpy.mapping.MapDocument('current')
# this is just a helper function for UpdateCursor. Don't worry about it right now.
def rows_as_update_dicts(cursor):
colnames = cursor.fields
for row in cursor:
row_object = dict(zip(colnames, row))
yield row_object
cursor.updateRow([row_object[colname] for colname in colnames])
@jmcbroom
jmcbroom / fileformats.html
Created March 31, 2015 21:25
my presentation at maptime 3/31
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<style type='text/css'>
body {
font-family: 'Seravek', 'Source Code Pro';
<option value="5784">16TH DISTRICT-LIVONIA - Authority</option>
<option value="5798">17TH DISTRICT-REDFORD CHARTER TOWNSHIP - Authority</option>
<option value="5785">18TH DISTRICT-WESTLAND - Authority</option>
<option value="5809">19TH DISTRICT COURT-DEARBORN - Authority</option>
<option value="5786">20TH DISTRICT-DEARBORN HEIGHTS - Authority</option>
<option value="5787">21ST DISTRICT-GARDEN CITY - Authority</option>
<option value="5832">22ND DISTRICT COURT-INKSTER - Authority</option>
<option value="5810">23RD DISTRICT COURT-TAYLOR - Authority</option>
<option selected="selected" value="5806">24TH DISTRICT COURT-ALLEN PARK - Authority</option>
<option value="5788">25TH DISTRICT-LINCOLN PARK - Authority</option>
5988 Branch County Conservation District - Drain District
5989 Eaton County Medical Care Facility - Hospital Finance Authority
5982 LOWELL AREA FIRE & EMERGENCY SERVICES AUTHORITY
5983 PARK WEST DRAIN DRAINAGE DISTRICT - Drain District
5980 ANN ARBOR CITY EDC - Authority
5981 EDC OF CHARTER TWP GRAND RAPIDS - Authority
5986 ADRIAN CITY DOWNTOWN DEVELOPMENT AUTH TIF - Authority
5987 SAULT STE MARIE CITY LDFA - Authority
5984 VILLAGE OF DEXTER EDC - Authority
5985 THE EDC OF COUNTY OF LENAWEE - Authority
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.