Skip to content

Instantly share code, notes, and snippets.

Hubbin it up @ Esri

Dave Bouwman dbouwman

Hubbin it up @ Esri
View GitHub Profile
View app.scss
// Base dependencies
// compass, config, classes, mixins
@import "tailcoat/imports";
// Base
@import "tailcoat/base/reset";
// Layout
@import "tailcoat/layout/helpers";
@import "tailcoat/layout/grid";
dbouwman / example.json
Created May 28, 2014
Example Site w/ Links for Groups, Themes and Layouts
View example.json
"links": {
"sites.groups": "{}/groups",
"theme": "{}",
"layout": "{}",
"title": "Boston Open Data",
"org_id": "abc123xfh123",
View Gruntfile-snippet.js
grunt.task.registerTask('export-status','export json file with git status', function(){
var info = grunt.config.get('gitinfo');
delete info.remote;
info.changesUrl = "" + info.local.branch.current.SHA + "...master";
var infoString = JSON.stringify( info , null, '\t' );
grunt.file.write('app/status.json', infoString);
View gist:d5ba2c26b5c974c5a5fb
<esri-map id="map" center="" zoom="map.zoom" basemap="topo">
View gist:a720c36c07e82a2a1d8e
@font-face {
font-family: 'icomoon';
src: url('../fonts/tailcoat/tailcoat.eot');
src: url('../fonts/tailcoat/tailcoat.eot?#iefix') format("embedded-opentype"), url('../fonts/tailcoat/tailcoat.woff') format("woff"), url('../fonts/tailcoat/tailcoat.ttf') format("truetype"), url('../fonts/tailcoat/tailcoat.svg#icomoon') format("svg");
font-weight: normal;
font-style: normal;
dbouwman /
Created May 5, 2015
Harvester Dataset Output


This is a first cut, and just the dataset, no messages yet. Consistent behavior coming from a group w/ 174 items, creating 172 datasets


  • row_count
  • supported_extensions
  • display_field default to first string if not specified
  • updated_at needs to be added to fields
  • statistics should be null if not computed
dbouwman / dataset.json
Created May 7, 2015
Dataset Fields output
View dataset.json
"_id" : ObjectId("554bc5addebd6e3428f8d5ae"),
"advanced_query_capabilities" : {
"supportsPagination" : "true",
"supportsQueryWithDistance" : "true",
"supportsReturningQueryExtent" : "true",
"supportsStatistics" : "true",
"supportsOrderBy" : "true",
"supportsDistinct" : "true"
View json.json
"sql": "UPDATE jobs SET id = 'ASB123', data = '{\"created_at\":\"2015-05-18T16:07:48.734Z\",\"created_by\":\"layer\",\"delay\":\"\",\"duration\":2501.706172004342,\"errors\":[],\"fingerprint\":\"a4d21bc9befc77aa1ef96a8eee9b6864\",\"id\":\"aac7de9c-1f09-4c1b-999e-69aba6075c19\",\"inputs\":{\"item_id\":\"ed2289c75ac244f8a2a5ce7ff1395b77\",\"service_id\":\"f4cf6e3aa83c1de12b4f400cb483a81130b9dcd6\",\"layer_info\":{\"currentVersion\":\"10.3\",\"id\":\"0\",\"name\":\"幼児園_幼稚園_その他保育施設\",\"type\":\"Feature Layer\",\"displayField\":\"名称\",\"description\":\"\",\"copyrightText\":\"\",\"defaultVisibility\":\"true\",\"editingInfo\":{\"lastEditDate\":\"1413708740396\"},\"isDataVersioned\":\"false\",\"supportsCalculate\":\"true\",\"supportsAttachmentsByUploadId\":\"true\",\"supportsRollbackOnFailureParameter\":\"true\",\"supportsStatistics\":\"true\",\"supportsAdvancedQueries\":\"true\",\"supportsValidateSql\":\"true\",\"supportsCoordinatesQuantization\":\"true\",\"advancedQueryCapabilities\":{\"supportsPagination\":\
dbouwman / fs.json
Created May 29, 2015
featurelayer json
View fs.json
"dataset": {
"meta": {
"host": "",
"host_hash": "f8d30c32dc6a53c331441200698fe56e",
"server": "",
"server_hash": "14e3725a8d19c7b013c16ecc81bc5168",
"service": "",
"service_hash": "fabb612b256a367928e5fc98cd52f2c9",
"layer": "",
dbouwman /
Last active Aug 29, 2015
Cluster at Centroid

The basic idea is to end up with cluster points at the centroids of a set of polygons... as per this tweet:


This is pretty straight forward "geo-processing"

  • forEach polygon
    • get the centroid
    • get the count of all the points that intersect the polygon Note: pre-compute the intersection - most traffic stations are stationary
    • create a feature at the centroid, with a COUNT property
    • use a cluster-style renderer
You can’t perform that action at this time.