Published
Edited
Sep 2, 2020
1 star
Insert cell
md`# Day Three, 27 Aug 2020

I am learning Shirley Wu's *[Introduction to SVG and D3.js](https://observablehq.com/@sxywu/introduction-to-svg-and-d3-js)*`
Insert cell
html`
<svg width=100 height=100 style='overflow: visible; margin: 5px;'>
<path d='M0,0 C50,40 50,70 20,100 L0,85 L-20,100 C-50,70 -50,40 0,0'
fill='none' stroke='#000' stroke-width=2 transform='translate(50,0)' />
</svg>
`
Insert cell
Insert cell
import {penguins} from "@enjalot/palmer-penguins"
Insert cell
html`
<div style="height:2em; padding:.5em; background:#C39BD3;">
<h2 style="color:white;">Hello ! I am some HTML code page inside Observable</h2>
</div>
`
Insert cell
md `if you are not familiar with \`padding\`, read [here](https://www.w3schools.com/css/css_padding.asp).`
Insert cell
//Writing SVG code is exacly like writing HTML code.
html`
<svg width="200" height="200">
<polygon points="100,10 40,198 190,78 10,78 160,198"
style="fill:pink;stroke:purple;stroke-width:5;fill-rule:evenodd;" />
</svg>
`
Insert cell
function Program(name) {
return `Program: ${name}`;
}
Insert cell
Program("What's your name?")
Insert cell
d3 = require("d3@6")
Insert cell
Insert cell
Insert cell
flare = d3.csv("https://gist.githubusercontent.com/mbostock/4063570/raw/11847750012dfe5351ee1eb290d2a254a67051d0/flare.csv")
Insert cell
DOM.download(new Blob([d3.csvFormat(flare)], {type:"text/csv"}),"flare.csv")
Insert cell
Insert cell
Insert cell
Insert cell
ArrayofData = [5, 10, 15, 20, 25]
Insert cell
//{
// const D3DataConnection = d3.select(p).select
Insert cell
md` While I am doing this, I came across these tutorials:
- [Interactive Data Visualization for the Web](https://alignedleft.com/work/d3-book)
- [Intro to D3.js by Square](http://square.github.io/intro-to-d3/)
- [Dashing D3.js](http://square.github.io/intro-to-d3/)
- [D3 in Depth](https://www.d3indepth.com/)`
Insert cell
Insert cell
md`
- URL: Uniform Resource Locator
- HTTP: Hypertext Transfer Protocol
`
Insert cell
html`
<p> This is a <em>really</em> interesting post! </p>
`
Insert cell
html`
<h1>Amazing Visualization Tool Cures All Ills</h1>
<p>A new open-source tool designed for visualization of data turns out to have an unexpected, positive side effect: it heals any ailments of the viewer. Leading scientists report that the tool, called D3000, can cure even the following symptoms:</p>
<ul>
<li>fevers</li> <li>chills</li> <li>general malaise</li>
</ul>
<p>It achieves this end with a patented, three-step process.</p> <ol>
<li>Load in data.</li>
<li>Generate a visual representation.</li> <li>Activate magic healing function.</li>
</ol>
`
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