Files for the example in The end of CartoCSS.
The corresponding data is available here: https://www.mapbox.com/bites/00261/plants.min.json (1MB file)
#' Hatching photo filter | |
#' | |
#' @param img matrix representation of black and white image | |
#' @param N number of points to be used for hatching | |
#' @param size average size of points | |
#' @param var variability in size of points | |
#' @param step step size between shades of grey | |
#' @param pch point shape (note pch=4 is a hatch but other shapes can be used as well) | |
#' | |
#' @examples |
// Processing code by Etienne JACOB | |
// motion blur template by beesandbombs | |
// opensimplexnoise code in another tab might be necessary | |
// --> code here : https://gist.github.com/Bleuje/fce86ef35b66c4a2b6a469b27163591e | |
int[][] result; | |
float t, c; | |
float ease(float p) { |
Open up browser console, for Chrome, hit F12 and copy-paste and enter this | |
$("a").filter(function(index){return $(this).text()==="unsave"}).click();setTimeout(function(){location.reload();},500); | |
Repeat until all items are unsaved. |
// note : if you're on github gist and want to copy paste this code, you can click on the "Raw" button | |
// and then do Ctrl A, Ctrl C, Ctrl V | |
// (code below by Kurt Spencer, slightly modified code to run as Processing tab) | |
// maybe you should rather use this new (improved) version of the noise instead : https://github.com/KdotJPG/OpenSimplex2 | |
/* | |
* OpenSimplex Noise in Java. | |
* by Kurt Spencer | |
* | |
* v1.1 (October 5, 2014) |
int[][] result; | |
float t, c; | |
float ease(float p) { | |
return 3*p*p - 2*p*p*p; | |
} | |
float ease(float p, float g) { | |
if (p < 0.5) | |
return 0.5 * pow(2*p, g); |
Files for the example in The end of CartoCSS.
The corresponding data is available here: https://www.mapbox.com/bites/00261/plants.min.json (1MB file)
library(ggplot2) | |
library(reshape) | |
library(scales) | |
### INSTRUCTIONS | |
# 1. Save file to same local directory | |
# 2. Change time zone specification in third IMPORT DATA statement | |
# 3. In each top_n_for_hour or top_n_for_day, test to statistical significance by comparing the result of the top_n function and the result of the matrix t test | |