Public
Edited
Nov 10, 2023
3 stars
Insert cell
Insert cell
Plot.plot({
insetTop: 150,
marginTop: 30,
insetBottom: 20,
marginBottom: 0,
projection: {
type: "azimuthal-equal-area",
rotate: [-10, -52],
domain: {type: "MultiPoint", coordinates: [[-16, 52], [42, 52], [10, 32], [10, 70]]}
},
width: 800,
marks: [
Plot.image(stakeoverflow_europe1.slice(0,1),{x:12.6, y: 49, opacity: .6, width: 1200, src: "https://images.unsplash.com/photo-1603484477859-abe6a73f9366?auto=format&fit=crop&q=80&w=1887&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D" }),
Plot.image(stakeoverflow_europe1.slice(0,1),{x:-19, y: 57, opacity: .5, width: 400, src: "https://images.unsplash.com/photo-1519709042477-8de6eaf1fdc5?auto=format&fit=crop&q=80&w=2992&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D" }),
Plot.sphere({fill: "white", opacity: .1}),
Plot.geo(land, {fill: "#9c6f44", fillOpacity: .1, stroke: "#ccc", strokeOpacity: 1}),
Plot.geo(countries, {fill: (d)=> (d.properties.median_comp), opacity: .8, stroke: "gray",title: (d)=> d.properties.name + "\n" + (d.properties.median_comp)}),
Plot.text(['EUROPE'],{x:15, y: 75, fontSize: 150, fontFamily: "italic", fontStyle: "italic", fill: "#836539", opacity: .3, lineHeight: 1.2}),
Plot.graticule({stroke: "gray", strokeOpacity: .4}),
Plot.text(['Compass: Honey Yanibel Minaya Cruz on Unsplash\nBackground image: SJ Objio on Unsplash'],{x:22, y: 34, dx:250, dy: 20, fontSize: 14, fill: "#836539", opacity: .8, lineHeight: 1.2, textAnchor: "end"}),
Plot.text(['Stackoverflow developer survey, median compensation, 2023\nDesign: Deepsha Menghani | Threads: IandLoveandData | Mastodon: Deepsha'],{x:22, y: 34, dx:-530, dy: 20, fontSize: 14, fill: "#836539", opacity: .8, lineHeight: 1.2, textAnchor: "start"}),
],
color: {type: "sequential", legend: false,
range: ["white", "#836539"],
style: {fontSize: 20}, width: 700, ticks: 7},
})
Insert cell
stakeoverflow_europe@1.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
import {land} from "ff0a83b495637684"
Insert cell
import {countries} from "ff0a83b495637684"
Insert cell
countries
Insert cell
function mergeData() {
countries.features = countries.features.map(feature => {
const matchedState = stakeoverflow_europe1.find(row => row.country == feature.properties.name);
if (matchedState) {
feature.properties.median_comp = matchedState.median_comp;
feature.properties.mean_comp = matchedState.mean_comp;
}
return feature;
});
}
Insert cell
mergeData()
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