Published
Edited
Apr 1, 2020
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
md`## Appendix`
Insert cell
Insert cell
task = "419d6422-6ca7-45e5-b205-9ed91cf77bd1"
Insert cell
url = `https://ptb3ou3171.execute-api.eu-west-1.amazonaws.com/dev/ping?task=${task}&email=${email}`
Insert cell
webdata = d3.json(url)
Insert cell
data = webdata.message.filter(judge => judge.value > 0)
Insert cell
myData = data.filter(judges => judges.me == 'yes')
Insert cell
myInfit = myData.length == 1 ? myData[0].value : 0
Insert cell
x = d3.scaleLinear()
.domain(d3.extent(data, d => d.value))
.range([margin.left, width - margin.right])
Insert cell
xAxis = g => g
.attr("transform", `translate(0,${height - margin.bottom})`)
.call(d3.axisBottom(x).tickSizeOuter(0))
Insert cell
regions = ['yes', 'no']
Insert cell
color = d3.scaleOrdinal(["#e41a1c", "#377eb8"]).domain(regions)
Insert cell
color('yes')
Insert cell
height = 240
Insert cell
radius = 3
Insert cell
padding = 1.5
Insert cell
margin = ({top: 20, right: 20, bottom: 30, left: 20})
Insert cell
import { text } from "@jashkenas/inputs"
Insert cell
d3 = require("d3@5")
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more