Public
Edited
Feb 15, 2023
8 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
table = bertin.properties.table(world)
Insert cell
Insert cell
Insert cell
geojson1 = bertin.properties.remove({ geojson: world, field: "FID" })
Insert cell
Insert cell
Insert cell
geojson2 = bertin.properties.remove({
geojson: world,
field: ["CNTR_ID", "CNTR_NAME", "FID", "year", "countrycode", "country"]
})
Insert cell
Insert cell
Insert cell
Insert cell
geojson3 = bertin.properties.keep({
geojson: world,
field: ["CNTR_ID", "CNTR_NAME"]
})
Insert cell
Insert cell
Insert cell
Insert cell
geojson4 = bertin.properties.add({
geojson: world,
field: "gdppc",
expression: "gdp/pop*1000000"
})
Insert cell
Insert cell
Insert cell
geojson5 = bertin.properties.add({
geojson: geojson4,
field: "NAME_ENGL",
expression: "NAME_ENGL.toUpperCase()"
})
Insert cell
Insert cell
Insert cell
Insert cell
geojson6 = bertin.properties.filter({
geojson: world,
expression: "NAME_ENGL != 'Antarctica'"
})
Insert cell
Insert cell
Insert cell
geojson7 = bertin.properties.filter({
geojson: world,
expression: "pop >= 1000000"
})
Insert cell
Insert cell
Insert cell
Insert cell
geojson8 = bertin.properties.subset({
geojson: world,
field: "ISO3_CODE",
selection: ["MEX", "USA", "CAN"]
})
Insert cell
Insert cell
Insert cell
geojson9 = bertin.properties.subset({
geojson: world,
field: "ISO3_CODE",
selection: ["MEX", "USA", "CAN"],
inverse: true
})
Insert cell
Insert cell
Insert cell
Insert cell
geojson10 = bertin.properties.head({
geojson: world,
field: "pop",
nb: nb1
})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
geojson11 = bertin.properties.tail({
geojson: world,
field: "pop",
nb: nb2
})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
geo.head({
x: world,
field: "pop",
nb: 10
})
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