overall workflow
This example demonstrates the development workflow for creating and publishing interactive data visualizations. It uses a starter template with custom D3.js and lodash utilities, and shows how to generate random data, draw axes, and render circles with tooltips. The code includes a build process with command-line tools like `degit`, `hot-server`, `gistsnap`, and `gistup` for scaffolding, local previewing, screenshotting, and publishing to bl.ocks. The visualization itself is rendered as an SVG with a scatterplot of randomized points.
AI-generated descriptionTemplate for making new bl.ocks. d3_.js contains a custom of build of d3 with jetpack and lodash.
Make a new directory and copy this code with degit:
mkdir my-example-name && cd $_
degit 1wheel/d3-init
overall workflow
Let's Make a Block is a great introduction. I use a couple of additional tools:
# update node if you don't have >= 8
npm install -g n && n latest
# install cli helpers
npm install -g degit hot-server gistclone gistsnap gistup git-go
# pick a project name and make a directory
mkdir my-example-name && cd $_
# grab starter files
degit 1wheel/d3-init
# start a local server
hot-server
# write some code...
# take a screen shot
gistsnap
# publish
gistup -m basename "$PWD"
# update
git-go this is a commit message
# download
gistclone https://bl.ocks.org/1wheel/4b9d34d74bd64a63d34028f160a71d7b