blocks by mhkeller

Convert a parquet file to bytes representing an arrow table

1f6706c445fab4ad8a6f

632527937dc4ea2b13c1

HTML, CSS and JavaScript tutorials

Bookmarklet for injecting new css

d3-array's group and groups functions

d3-hierarchy tree

054f411898341b18f89f

068484730f9ef9aa41de

056259eda10ee221b7fa

3855d61f8ee642b921d2

Rename files in linux / bash using mv command without typing the full name two times

Generate a range of dates

28069139378dee52b7d6

296e4040fdc62209ae34

count occurrences of a string across rows of a pgsql table

Throttle requests

use python 2.7 with a node install for node-gyp

Loading some sweet R packages

Basic puppeteer setup

snippets

boilerplate connect to database

promisified wget

Ways to get in touch

f55aee54aaf8c57b2b6d

a52cafcd6d35291955d8

Polylinear Time Scale

Basic node-pg connection setup

02e988596c0d08884903

Concatenate csv files

1ed0838e66ae9be6e44f

Calculat quantile amounts based on aggregate counts. Adapted from https://gist.github.com/hrwgc/5171860

Count elements in a pgsql array_agg. Adapted to work with any typed array (numeric, text etc.) and more machine-readable format from https://wiki.postgresql.org/wiki/Count_elements_in_Array

1f30238abbe94a6d1a8a

dc0b79c67bfb0aa6f746

271d40ba9963d40930d8

fd48b76f42e904c4e414

Setting a variable in pgsql

88607cdf7b20fcc495bd

Convert each row in a postgresql table to a text search vector to search across all fields in a table

05d6fb19071feab5b3db

d1d4ceb72af165e75a72

f92c54f3bab15b45fcf3

Responsive D3 chart

Responsive d3 line chart

Basic D3 Line Chart

498185ec7a75c03f1e93

broken dbf

Promise not resolved if buffer is null

My NICAR 2017 Hack Swap Projects

f33a6deffe3bf51d2773

5ce1c92055c914af5f43

e20b7f85301e012e7d9f

D3 Stacked Area Chart Example

A boilerplate client-side javascript setup

Making gifs from quicktime videos

Find replace in Postgresql

ecb614d53b61391fd986

c6d3afae6ef2796c6d2d

fa835bd7fa1c8c7fc6af

4ed4416d642b1528e9ba

Make line breaks QGIS-compliant

data vs datum

Example js workbook syntax

5b52c76cd7a79ba68eb3

A packaged version of aubergene's Scale (https://gist.github.com/aubergene/7791133)

Count elements in a pgsql array_agg. Adapted to work with any typed array (numeric, text etc.) and more readable formatting from https://wiki.postgresql.org/wiki/Count_elements_in_Array

2687d104b6ef804a275a

Setting up git

A scratch sheet for thinking about different kinds of interactive/digital stories.

fe0b80f6e1ac11facaaf

70b75cdc248c04f3cca0

d7e0cd4dc30236291622

QGIS installation

Two-way data binding experiment from https://groups.google.com/forum/#!topic/d3-js/xJVirdXdaLw

48c00b1c3cd9dad09490

A more complex setup showing how to draw arc paths on a map with D3, loading and transforming data from a csv.

A basic setup showing how to draw arc paths on a map with D3.

Regular expressions to capture candidate tweets in the 2014 election.

Great arcs in CartoDB PostGIS

State abbreviation and fips codes

Node build system for Sublime Text 2.

Google "I'm Feeling Lucky" Endpoint

Colorbrewer scales

Ubuntu prep

Merge a directory of shapefiles into one shapefile

SQL-like left joins in JavaScript

Easing

alphabits

Node scraper with require.js and cheerio.js

7899365

HTTPS Kosher S3 Endpoint

The PostGIS query powering the Syrian refugee map http://projects.aljazeera.com/2013/syrias-refugees/index.html

Document Cloud Responsiveness Hack. Sets height of viewer on page load based on screen width.

CartoCSS labels

6615601

Shapefile to PostGIS table.

PostGis query to shp

6472302

Hover window follow mouse, while respecting bounds of a given container

Browser sniffer for `position: sticky;`

Website download

Useful Raspberry Pi setup links

6313924

CMS Safe External Links

nesting a collection in a model

6199130

table_schemer

5985893

D3 + Leaflet.js making div markers from GeoJSON

Common rich text characters

backbone example

The Daily Beast is seeking an Interactive News Applications Reporter.

Converting json to csv with dsv.js for treasury.io

Create blurring of textfields for non-skinny pants browsers that don't know from 'placeholder="my pants are skinny"'

A function for creating pixel and percentage calculations for step-based scrolling interactives using Skrollr.js

Good mock-up hex colors

Remove all deleted files from git. Taken from http://stackoverflow.com/questions/6004453/how-to-remove-multiple-deleted-files-in-git-repository

An example querying the FMS Treasury database using R.

An example querying the FMS Treasury database using python.

Lat and Lng from geom

5093547

Examples of multimedia #lovetoscroll projects in reply to @jtomassini https://twitter.com/jtomassini/status/302438612937625600

4729318

Sample d3 gantt chart, sorting works, filtering broken

Open Street Map Geocoder

Text labels in Mapnik 2.0

$.ajax call for MapQues Open Geocoding API

multigeometry polygon from disparate geometried features

InnerHTML for SVG elements

State FIPS codes

Daily Beast News app / data internship

Nesting a JSON object using a value in the data. Cross-browser replacement for d3.nest() .key() .entries()

FQL Query for friend list information

Book IV, Line 639

There will be time

Create multigeometry polygon in PostGIS / CartoDB

Creating gh-pages from master branch

Stacked bar chart - http://jsfiddle.net/9pXpU/

Remove null rows

Remove row.names

A list of Amazon EC2 AMIs with R installed

How to do many updates in a single query WAY faster

assignColors.R

Polygon labels in CartoDB / Tilemill Carto

sum columns with apply

R T-shirt ideas

google maps geocoding function

Count points intersecting with polygons in PostGIS

Replace NAs with 0s

3862641

3862580

Inline media queries

iPad iPhone media queries

https://developers.google.com/maps/documentation/geocoding/#StatusCodes

Input Google Doc to R

google geocoding API, R

Point to Polygon intersect PostGIS

Stacked bar chart in HTML/CSS

[The Listserve] Against Drift, 9/25/12: Solid Ps.

3687639

XPath scraping in R

Function returns quater scores from Wikipedia Super Bown pages

Explode a columns properties into new columns with a binary value

2891550

Dates in R

Save files in ggplot2

Order dataframe by columns

Concatenate for R

Nice for grouping and summing in R

Rename columns headers in a dataframe in R

Create a new R dataframe from a subset of columns from another df