Published
Edited
Apr 28, 2021
14 forks
Importers
7 stars
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
Insert cell
Insert cell
movies_grouped = movies
.filter(d => d['Worldwide Gross'] > 0 &&
1995 <= op.year(d['Release Date']) && op.year(d['Release Date']) <= 2010)
.groupby('Major Genre')
.derive({
Genre: d => d['Major Genre'] === 'Black Comedy' ? 'Comedy' // Black Comedy -> Comedy
: d['Major Genre'] == null || op.count() < 100 ? 'Other' // Null or < 100 films -> Other
: d['Major Genre'],
Profit: d => d['Worldwide Gross'] - d['Production Budget']
})
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
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
Insert cell
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