Skip to content

Instantly share code, notes, and snippets.


Chris Henrick clhenrick

View GitHub Profile
clhenrick / script.js
Last active Oct 23, 2020
Persisting the removal of annoying stuff from web pages
View script.js
// In Chrome devtools, create live expressions for each of these code blocks
// Now when you visit a page, no more annoying thing that will bother you!
// The annoying thing contains this text
const textToSearchFor = "foo"
// Filtering by searching for the above text here but you could filter other ways too
function filterFn(node) {
return node.textContent.includes(textToSearchFor);
clhenrick / nyc_421a.sql
Last active Dec 26, 2019
Create table statement for NYC properties with 421a tax exemption status, using data from
View nyc_421a.sql
CREATE TABLE nyc_421a (
years numeric,
borough_name varchar,
borough numeric,
neighborhood varchar,
building_class_category varchar,
tax_class_at_present varchar,
block numeric,
clhenrick /
Created Dec 3, 2019
California Assembly Districts GeoJSON using ogr2ogr
#!/usr/bin/env bash
ogr2ogr -f GeoJSON ca_assembly_districts.json $URI OGRGeoJSON
clhenrick / .block
Created May 8, 2019
D3 Scatterplot without data join
View .block
license: mit
clhenrick / .block
Created May 7, 2019
Simple Scatterplot with d3@5
View .block
license: mit
View flowers.csv
sepal_length sepal_width petal_length petal_width species
5.1 3.5 1.4 0.2 setosa
4.9 3.0 1.4 0.2 setosa
4.7 3.2 1.3 0.2 setosa
4.6 3.1 1.5 0.2 setosa
5.0 3.6 1.4 0.2 setosa
5.4 3.9 1.7 0.4 setosa
4.6 3.4 1.4 0.3 setosa
5.0 3.4 1.5 0.2 setosa
4.4 2.9 1.4 0.2 setosa
clhenrick /
Last active Jul 29, 2020
Aligning GeoJSON data with us-atlas TopoJSON

This is a demonstartion of how to align arbitrary GeoJSON data to the us-atlas topojson data.

It's important to note that the TopoJSON from us-atlas has it's map projection, (d3.geoAlbersUsa), built into it. In other words, it is considered "projected" geographic data.

This is an important distinction from GeoJSON data which is most typically stored in the unprojected Coordinate Reference System WGS84, also commonly referred to as "lat, lon" (though coordinates are most often stored in the order longitude, latitude).

View prcl_shape_sample_4326.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
clhenrick / .block
Last active Dec 14, 2018
scale sqrt vs scale linear
View .block
license: mit
clhenrick / .block
Last active Oct 16, 2018
Not So Simple graph with grid lines in v4...
View .block
license: mit
You can’t perform that action at this time.