Published
Edited
Mar 2, 2019
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
VegaLite({
data: {values: twoGender},
mark: {type: "bar"},
encoding: {
column: {field: "Victim Sex"},
x: {aggregate: "count", field: "Crime Code Description", type: "nominal"},
y: {field: "Crime Code Description", type: "nominal"},
color: {field: "Victim Sex", type: "nominal", scale:{ range:["#ea5585","#297abb"]} },
legend:{value:"F(Female)",fillColor:""}
}

})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
crime = d3.csv("https://gist.githubusercontent.com/Jongwonim/107be698151302de213ff5779ce34f74/raw/0bd586afbc5d83020c4f11b4fcc47fd8bcc5c542/LA%2520crime%25202019.csv")
Insert cell
df = dfjs.DataFrame.fromCSV('https://gist.githubusercontent.com/Jongwonim/107be698151302de213ff5779ce34f74/raw/0bd586afbc5d83020c4f11b4fcc47fd8bcc5c542/LA%2520crime%25202019.csv')
Insert cell
Insert cell
Insert cell
Insert cell
validAge = df.filter(row => row.get('Victim Age') > 0)
Insert cell
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