Public
Edited
Dec 6, 2023
Insert cell
Insert cell
genderData = FileAttachment("gender_by_country@1.csv").csv({typed: true})
Insert cell
countries = genderData.map(d => d.country_full_name)
Insert cell
uniqueCountries = [...new Set(countries)];
Insert cell
viewof cntry = Inputs.select(uniqueCountries, {value: "United States", label: "Choose country/region here"})
Insert cell
filteredGenderData = genderData.filter(d => d.country_full_name === cntry)
Insert cell
genderplot = Plot.barY(filteredGenderData, {x: "genderpred", y: "freq", fill: "steelblue"}).plot()
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