Public
Edited
Apr 7
Insert cell
Insert cell
Insert cell
Insert cell
import {vl} from "@vega/vega-lite-api-v5"
Insert cell
import {printTable} from "@uwdata/data-utilities"
Insert cell
prisoner_data = FileAttachment("palestinian_prisoners.csv").csv()
Insert cell
child_prison_data = FileAttachment("child_prisoners_data_report.csv").csv()
Insert cell
printTable(child_prison_data.slice(0,5))
Insert cell
printTable(prisoner_data.slice(0,5))
Insert cell
fatalities = FileAttachment("btselem-fatalities-88653c5033d5e25083c6ae70512473af.csv").csv()
Insert cell
printTable(fatalities.slice(0,5))
Insert cell
female_fatalities = fatalities.filter(row => row['Gender'] === 'female')

Insert cell
child_fatalities = fatalities.filter(row => row['Age'] < '18')
Insert cell
children_under_13_fatal = fatalities.filter(row => row['Age'] < '13')

Insert cell
uniqueCategories = [...new Set(fatalities.map(item => item["Date of event"]))];
Insert cell
// Convert age column of fatality data to numerical class type for ordered axes
Math.max(...fatalities.map(d => d.Age)) // maximum age in fatality data
Insert cell
mediabias = FileAttachment("gaza-media-bias-summary-statistics-of-terms-mentioned.csv").csv()
Insert cell
printTable(mediabias.slice(0,5))
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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