Instantly share code, notes, and snippets.


d3-annotation v2.0

Updated features for d3-annotation, a full post here.

This block uses all three of the new features:

  • the nx/ny feature for placing line labels
  • default styling, no need to import an annotation css file
  • color attribute to color the annotations
  • new badge option for the HBO and Netflix nomination callouts

K-Means Centroid Deviation

Added all of the Farmers' Markets data into the kMeans Library by @emilbayes, thank you!

Exploring the idea of using the areas around the centroids to exaggerate that cluster when it deviates from the rest of the clusters. This originates from the question "Which features in each cluster differentiate it from the rest?"

View index.html
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<link href=',900' rel='stylesheet' type='text/css'>
background-color: whitesmoke;