Skip to content

Instantly share code, notes, and snippets.

View jwasilgeo's full-sized avatar

Jacob Wasilkowski jwasilgeo

View GitHub Profile
@jwasilgeo
jwasilgeo / README.md
Last active December 23, 2020 02:13
top_30_longest_flights_2018
@jwasilgeo
jwasilgeo / convert_feature_class_to_features_list.py
Created October 3, 2018 20:43
Convert features in an Esri GDB feature class to an Esri JSON-style list of features, represented as a list of feature dictionaries.
def convert_feature_class_to_features_list(source_feature_class):
# convert feature class features to Esri features list
# (JSON represented as a list of feature dictionaries)
# ignore 'Geometry' field type and manually ask for JSON-formatted geometry with 'SHAPE@JSON' below
# you could also add the 'OID' field type to ignore if you need to add these features to a hosted feature service
field_types_to_ignore = ['Geometry']
# establish the out fields, minus any fields that need to be ignored
out_fields = [
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jwasilgeo
jwasilgeo / .block
Last active February 1, 2018 20:57 — forked from mbostock/.block
Bring Up State
license: gpl-3.0
height: 600
border: no
@jwasilgeo
jwasilgeo / .block
Last active September 14, 2017 21:52
When the Contours Go Marching In
license: gpl-3.0
border: no
@jwasilgeo
jwasilgeo / .block
Last active September 3, 2017 02:58 — forked from mbostock/.block
Blurry Choropleth
license: gpl-3.0
height: 600
border: no
@jwasilgeo
jwasilgeo / .block
Last active August 29, 2017 12:35
TopoJSON with Random Gaussian Blurs (counties)
license: gpl-3.0
height: 600
border: no
@jwasilgeo
jwasilgeo / .block
Last active August 29, 2017 12:30
TopoJSON with Random Gaussian Blurs (states)
license: gpl-3.0
height: 600
border: no
@jwasilgeo
jwasilgeo / angular2-esri-loader instructions.md
Last active November 2, 2017 15:46
angular2-esri-loader instructions
@jwasilgeo
jwasilgeo / dojoAmdModulesToDeepObject.js
Last active February 24, 2016 21:41
convert an array of Dojo AMD module paths and loaded modules to a deeply nested object
function createModulesObject(modulePaths, modules) {
const targetObject = {};
modulePaths.forEach(function(modulePathString, idx) {
_createNestedProperties(modulePathString.split('/'), targetObject, modules[idx]);
});
return targetObject;
}
function _createNestedProperties(modulePathArray, targetObject, moduleToAssign) {
const modulePathPart = modulePathArray.shift();