Skip to content

Instantly share code, notes, and snippets.

@tonyfast
tonyfast / index.html
Created March 4, 2015 16:03
mathjs + jwerty + d3
<!doctype html>
<html>
<head>
<script src="https://ia902601.us.archive.org/18/items/javascriptlibrariesandtools/jwerty.js"></script>
<script src="http://d3js.org/d3.v3.min.js" type="text/javascript"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/mathjs/1.4.0/math.min.js" type="text/javascript"></script>
<style>
@import "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css";
</style>
</head>
@tonyfast
tonyfast / app.css
Last active August 29, 2015 14:16
ArchieML test with a ArchieML version of flare.json
.node {
cursor: pointer;
}
.node circle {
fill: #fff;
stroke: steelblue;
stroke-width: 1.5px;
}
@tonyfast
tonyfast / index.html
Last active August 29, 2015 14:16
Image Browser in d3
<!doctype html>
<html>
<head>
<script type="text/javascript" src="//cdn.jsdelivr.net/g/d3js"></script>
<script type="text/javascript" src="https://cdn.rawgit.com/newsdev/archieml-js/master/archieml.js"></script>
<style>
@import "https://cdnjs.cloudflare.com/ajax/libs/materialize/0.95.3/css/materialize.min.css";
</style>
</head>
<body>
@tonyfast
tonyfast / d3.ml.js
Last active August 29, 2015 14:17
d3.ml - a YAML based syntax for creating a hybrid data and DOM descriptions
;( function(){
// an extension for d3 that iterates over Javascript objects
// to build a DOM derived from data.
d3.ml = {
// YAML templates that execute d3ml
templates: {},
requests: {},
scripts: {},
build:
function(s, template, state){
@tonyfast
tonyfast / template.yaml
Last active August 29, 2015 14:17
Palette IV-1
display:
palette: mount
palette:
mount:
- append: $div.container
- template: :svg.mount
- call:
- datum:
y: 0
c: teal
@tonyfast
tonyfast / plate.yaml
Last active August 29, 2015 14:17
Plate VIII-2
display:
svg-container: container
svg-container:
container:
- append: $div.container
- call:
- template: :svg-container.svg
- call:
- template: :compress.two-squares
@tonyfast
tonyfast / d3.ml.js
Last active August 29, 2015 14:17 — forked from bollwyvl/d3.ml.js
;( function(){
// an extension for d3 that iterates over Javascript objects
// to build a DOM derived from data.
d3.ml = {
// YAML templates that execute d3ml
templates: {},
requests: {},
scripts: {},
build:
function(s, template, state){
@tonyfast
tonyfast / requests-plate.yaml
Last active August 29, 2015 14:17
Requests plate for d3.ml
display:
- template: :d3templates.gist-list
gist-list:
- append: $div.row
- selectAll: div.col
- requests:
gist.json: https://api.github.com/users/tonyfast/gists
call:
- data: :d3.requests.gist
@tonyfast
tonyfast / .movie-domain.yml
Last active August 29, 2015 14:17
Template for Movie Data
display:
- template: :d3.templates.foo
foo:
- append: $div.container
- template: :d3.templates.other
other:
- requests:
movies.csv: https://gist.githubusercontent.com/tonyfast/49e2e2cbab5cf92fbe9f/raw/e6f4a2bc5d37276522865b02065eba556d8b0e99/movies.csv
@tonyfast
tonyfast / d3.gridder.coffee
Last active August 29, 2015 14:17
What is d3? - overlay svg on top of DOM nodes containing data - compiled with coffeescript
#{ create a button to explore nodes with datum}
d3.select 'body'
.append 'div'
.style 'width', 60
.style 'height', 60
.style 'position', 'fixed'
.style 'right', 0
.style 'top', 0
.style 'background-color', 'green'
.style 'z-index',100