Skip to content

Instantly share code, notes, and snippets.

@onlyjsmith
onlyjsmith / data.csv
Created September 2, 2015 00:49
data! from editdata.org!
pixie tire
Bob Ned
@onlyjsmith
onlyjsmith / data.csv
Last active September 2, 2015 13:11
data! from editdata.org!
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 2.
short_name,iso3,region,iso2,lat,lon,use_centre_point,undp_code,components,components_started,is_biofin,description,url
Botswana,BWA,africa,BW,-22.182004,23.815028,false,BOT,"BIOFIN activities in Botswana
Following the structure of the BIOFIN workbook, the following 4 components are implemented in Botswana:
Component 1: Review of biodiversity policies, institutions and expenditures
An assessment is carried out for major sectors how they impact biodiversity, which policies and institutes relate to that and how much the public and private sector are spending on biodiversity.
Status: Data collection and consultations have started
Component 2: Defining the costs of implementing National Biodiversity Strategies and Action Plan
Detailed calculations will be made to find out how much it would cost to complete all activities and reach all goals of the National Biodiversity Action Plan.
Component 3: Developing a Resource Mobilisation Strategy for Biodiversity Finance
Under this component the Botswana national team will
@onlyjsmith
onlyjsmith / README.md
Last active September 7, 2015 13:28
kimonoData - README is no longer empty

README is no longer empty. But it's not exactly overflowing with useful guidance or information either.

@onlyjsmith
onlyjsmith / README.md
Last active September 7, 2015 10:23 — forked from mbostock/.block
Epicyclic Gearing

From Wikipedia:

Epicyclic gearing or planetary gearing is a gear system consisting of one or more outer gears, or planet gears, revolving about a central, or sun gear. … Epicyclic gearing systems also incorporate the use of an outer ring gear or annulus, which meshes with the planet gears.

Use the menu in the top-left to change the frame of reference, fixing the specified gear in-place.

@onlyjsmith
onlyjsmith / Odyssey
Last active September 7, 2015 10:56
Odyssey
<!doctype><html><head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Odyssey.js Slides</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/x-icon" href="http://cartodb.github.io/odyssey.js/editor/favicon.png">
<link rel="icon" type="image/png" href="http://cartodb.github.io/odyssey.js/editor/favicon.png">
@onlyjsmith
onlyjsmith / karabiner.json
Created February 10, 2017 21:21
karabiner.json
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"name": "Default profile",
"selected": true,
@onlyjsmith
onlyjsmith / index.html
Last active May 29, 2017 08:03
Surveyjs Vue value changed hook
<!DOCTYPE html>
<html>
<head>
<title>Welcome to Vue</title>
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<link rel="stylesheet" href="http://getbootstrap.com/dist/css/bootstrap.css">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/globalize/0.1.1/globalize.min.js"></script>
<script type="text/javascript" src="http://cdn3.devexpress.com/jslib/15.1.5/js/dx.chartjs.js"></script>
@onlyjsmith
onlyjsmith / validate-vue-surveyjs.html
Last active May 29, 2017 08:16
validate-vue-surveyjs
<!DOCTYPE html>
<html>
<head>
<title>Welcome to Vue</title>
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<link rel="stylesheet" href="http://getbootstrap.com/dist/css/bootstrap.css">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/globalize/0.1.1/globalize.min.js"></script>
<script type="text/javascript" src="http://cdn3.devexpress.com/jslib/15.1.5/js/dx.chartjs.js"></script>
{
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.89 Safari/537.36",
"id": "ca59dc77-9c13-4968-be3d-8e849fb5f1c0",
"recorded_on": "2017-09-18T19:59:47.638Z",
"location": {
"coords": {
"accuracy": 100,
"longitude": 21.244202088121707,
"latitude": -18.027582610265743
},
const fs = require('fs')
const intersect = require('@turf/intersect')
const bounding_box = require('@turf/bbox')
const rbush = require('rbush')
const DEBUG = false
if (DEBUG) console.time('everything')
// Specify unique ID fields for outer and inner sets of data