@mbostock
Building a better computational medium. Founder @observablehq. Creator @d3. Former @nytgraphics. Pronounced BOSS-tock.
Published (unlisted)
Insert cell
Insert cell
Insert cell
Insert cell
Changed in target
-
powerAug2019 = d3.json("https://gist.githubusercontent.com/gganapat/5f92acc8283e703e34421ac334ecbca4/raw/91b9e6317b5755a943743bab5fe2237eb8765837/powerAug2019")
+
powerAug2019 = d3.json("https://gist.githubusercontent.com/gganapat/5f92acc8283e703e34421ac334ecbca4/raw/91b9e6317b5755a943743bab5fe2237eb8765837/powerAug2019").then(powerAug2019 => { convert(powerAug2019.series.values.dateValue); return powerAug2019; })
Insert cell
Insert cell
Removed in target
+objects[2300].value //convert text to number
Insert cell
Removed in target
objects.value
Insert cell
Insert cell
Removed in target
convert(objects)
Insert cell
Removed in target
objects[2000].date
Insert cell
Changed in target
viewof view = embed({ $schema: 'https://vega.github.io/schema/vega-lite/v3.json', width: 360,
-
data: objects,
+
data: {values: objects},
mark: 'line', encoding: { x: {field: 'date', type: 'temporal'}, y: {field: 'value', type: 'quantitative'}, // tooltip: {field: 'value', type: 'quantitative'}, }, } )
Insert cell