Published
Edited
May 10, 2019
Insert cell
md`# test clase 2`
Insert cell
dataset=d3.csv("https://gist.githubusercontent.com/serman/f6a0b09269dad9130f4538b05becb124/raw/33061d9d62deba2fc01cd7fb83160d2b418fcacb/gistfile1.txt")
Insert cell
dataset[1].house
Insert cell
d3.selectAll
Insert cell
svg = d3.select(DOM.svg(800, 200));
Insert cell
{return svg.node()}
Insert cell
{
var update_Section=svg.selectAll("circle")
.data(dataset)
var enter_Section=update_Section.enter()
var g= enter_Section.append("g")
g.append("circle")
g.append("text")
.text(function(d){ return d.name})
.attr("font-family", "sans-serif")
.attr("font-size", "9px")
.attr("fill", "blue")
.attr("x", function(d, i) {
return i*80
})
.attr("y", function(d) {
return 40
})
.attr("text-anchor", "middle")
var enterAndUpdate_Section=enter_Section.merge(update_Section)
.attr('r',function(d,i){ return Number(d.appeared)/5 } )
.attr('cx',function(d,i){return i*80})
.attr('cy',10)
}
Insert cell
{
svg
.append("circle")
.attr("r",function(){return 40*Math.random()})
.attr("cx",function(){return 200*Math.random()})
.attr("cy",function(){return 600*Math.random()})
}
Insert cell
d3 = require("d3")
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more