Skip to content

Instantly share code, notes, and snippets.

View UNFPAmaldives's full-sized avatar
💭
the distance between what we have and what we want

UNFPA Maldives UNFPAmaldives

💭
the distance between what we have and what we want
View GitHub Profile
@mbostock
mbostock / .block
Last active May 8, 2024 16:54 — forked from mbostock/.block
Choropleth
license: gpl-3.0
height: 600
border: no
redirect: https://beta.observablehq.com/@mbostock/d3-choropleth
@susielu
susielu / .gitignore
Last active April 2, 2024 07:16
d3-annotation: Responsive Types and Hover
.DS_Store
#!/usr/bin/perl
# This filter changes all words to Title Caps, and attempts to be clever
# about *un*capitalizing small words like a/an/the in the input.
#
# The list of "small words" which are not capped comes from
# the New York Times Manual of Style, plus 'vs' and 'v'.
#
# 10 May 2008
# Original version by John Gruber:

OSRM North America route server on EC2

Overview

OSRM route server is an extremely useful tool for getting the driving distance/time through multiple locations. The route server requires data that has to be downloaded and processsed before it can be used to serve routes from.

Processing OSRM data for large region like North America can be a real challenge due to memory and disk size requirements. It's also really time consuming. If you cut and try from scratch, you will repeatedly run into some constraints and fail after hours of running.

The following are summary notes from trying this with eventual success.

@wpoely86
wpoely86 / README.md
Last active March 14, 2023 22:07
Diverging Stacked Bar Chart

Diverging Stacked Bar Chart

We create a diverging stacked bar chart to plot a 5 point Likert scale. There a lots of ways to plot a Likert scale but according to Robbins & Heiberger, a diverging stacked bar chart is the best and I agree.

I've used D3.js. There is also an R package by Robbins & Heiberger.

The original can be found at github

@ajdamico
ajdamico / survey design subsetting.R
Created February 28, 2019 17:11
incorrect standard errors when not including the full design information
library(survey)
data(api)
x <- apistrat
x <- subset( x , comp.imp == 'Yes' )
dstrat_before<-svydesign(id=~1,strata=~stype, weights=~pw, data=x, fpc=~fpc)
@mbostock
mbostock / .block
Last active January 14, 2023 04:21
Screen Recording to GIF
license: gpl-3.0
@susielu
susielu / .gitignore
Last active May 11, 2022 00:25
d3.annotation: Points of Interest
.DS_Store
@cbjuan
cbjuan / LICENSE.md
Last active March 14, 2022 15:01
Stacked Bar Chart with Legend, Text Labels and Tooltips

The MIT License (MIT)

Copyright (c) 2015 Juan Cruz-Benito. http://juancb.es

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR I

@KatiRG
KatiRG / .block
Last active March 14, 2022 11:12
d3js clickable, sortable stacked bar chart
Released under the GNU General Public License, version 3.
(or, optionlly, any higher version)