Skip to content

Instantly share code, notes, and snippets.

View clhenrick's full-sized avatar

Chris Henrick clhenrick

View GitHub Profile
@clhenrick
clhenrick / .gitignore
Last active January 11, 2024 12:33
Node.JS script to aggregate NYC vehicle collision data into a hexagonal grid and compute the ck means for each cell using Turf.JS and Simple Statistics.JS
node_modules/
.DS_Store
@perrygeo
perrygeo / Dockerfile
Last active February 27, 2023 12:00
Minimal debian image with Python 3.6 and geo python tools
FROM python:3.6-slim-stretch
ADD requirements.txt /tmp/requirements.txt
RUN apt-get update && \
apt-get install -y \
build-essential \
make \
gcc \
locales \
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vijithassar
vijithassar / README.md
Last active October 2, 2019 16:45
Selective Force Positioning

Overview

Force-directed positioning based on a physics simulation can help with graph readability because it minimizes node occlusion, but it comes at the expense of precision, because both the X axis and the Y axis are compromised in favor of the simulation. As an alternative, we can position the points in some other fashion, then selectively apply force positioning to declutter the layout in specific regions when the user shifts attention toward them, such as with a mouseover.

This project is written in a heavily annotated style called literate programming. The code blocks from this Markdown document are being executed as JavaScript by lit-web.

Implementation

Setup

⚠️ this is now stupidly out of date

Computers

  • 13" Macbook Pro 3.3 GHz i7 (late 2016)
  • Microsoft Surface Book (2016)

Peripherals

@fokusferit
fokusferit / enzyme_render_diffs.md
Last active April 15, 2024 09:41
Difference between Shallow, Mount and render of Enzyme

Shallow

Real unit test (isolation, no children render)

Simple shallow

Calls:

  • constructor
  • render
@benelsen
benelsen / proj.rb
Last active May 16, 2017 20:41
Winkel-Tripel with GDAL2

Requires gdal2:

brew install osgeo/osgeo4mac/gdal2
export PATH="/usr/local/opt/gdal2/bin:$PATH" # or just use /usr/local/opt/gdal2/bin/gdalwarp

And a build of bleeding-edge version of proj:

brew reinstall proj.rb --HEAD
@mbostock
mbostock / .block
Last active January 16, 2020 12:46
GeoTIFF Contours
license: gpl-3.0
height: 481
redirect: https://observablehq.com/@d3/geotiff-contours
@johan
johan / Makefile
Created January 24, 2017 06:15
Makefile of the steps in Mike Bostock's command-line cartography tutorial, parts 1-4 https://medium.com/@mbostock/command-line-cartography-part-1-897aa8f8ca2c
# request one at http://api.census.gov/data/key_signup.html and paste it below
CENSUS_API_KEY=YOUR_CODE_HERE
# a factor 1609.34 squared
SQ_M_TO_SQ_MI=2589975.2356
#prereqs:
# npm install -g shapefile # 0.6.1
# npm install -g d3-geo-projection # 1.2.1
# npm install -g ndjson-cli # 0.3.0
@mbostock
mbostock / .block
Last active April 8, 2023 19:39
Versor Dragging
license: gpl-3.0
height: 600
border: no
redirect: https://observablehq.com/@d3/d3-versor-dragging