Published
Edited
May 5, 2020
Fork of Hierarchies
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
data = d3.csvParse(
await FileAttachment("lec_playerdata@1.csv").text(),
d3.autoType
)
Insert cell
render_data_table(data.slice(0, 10))
Insert cell
md`This dataset is from Kaggle and talks about the players in the 2019 LoL European Championship Season. It contains players from 10 different teams, each of which have about 5-7 players.`
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
cleanData = ({ name: `${splitSelection}`, children: nestedData })
Insert cell
Insert cell
Insert cell
Insert cell
md`## Treemap`
Insert cell
treemap
Insert cell
import { chart as treemap } with { cleanData as data } from "@d3/treemap"
Insert cell
Insert cell
md`## Sunburst`
Insert cell
sunburst
Insert cell
Insert cell
Insert cell
md`## Tree Diagram`
Insert cell
treeDiagram
Insert cell
Insert cell
md` This visualization uses position encoding to show which players played for what team, as well as which players played what position -- based on the option selected above. It's a straightforward visualization that does its job well-enough, I think since it's clear and concise. Its primary downside is being unable to communicate the match frequency of each player. `
Insert cell
md`## Circle Packing`
Insert cell
circlePacking
Insert cell
Insert cell
md` This visualization primarily uses size encodings to denote how frequent a player played for a team/position. I think it quite accurately represents what it's trying to do, though a downside could be the relatively small size of players who didn't play as much as starters -- which could cause visibility issues. `
Insert cell
Insert cell
Insert cell
Insert cell
d3 = require("d3")
Insert cell
height = 1000
Insert cell
_ = require("lodash@4")
Insert cell
import { select, radio } from "@jashkenas/inputs"
Insert cell
Insert cell
html`<style>
body {
font-family: Montserrat;
color: black;
}
</style>`
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