Public
Edited
Nov 30, 2023
1 star
Insert cell
Insert cell
seoul = FileAttachment("Seoul_Gu.topojson").json();
Insert cell
gu = topojson.feature(seoul, seoul.objects.Seoul_Gu);
Insert cell
Plot.plot({
projection: { type: "mercator", domain: gu },
marks: [
Plot.geo(
gu,
{fill: (d) => gu_count_access.get(d.properties.SIG_ENG_NM)},
)],
color: {
scheme: "spectral", // Change color scheme
unknown: "#ddd", // Polygons with unknown broadband values are gray
type: "linear", // Linear scale for color progression
legend: true, // Add the legend
label: "% of county population with home broadband", // Update legend label
percent: true, // Convert value to a percent (from a proportion)
domain: [20000, 100] // Update the value domain to span 0 to 100% access
}
})
Insert cell
insta_data = FileAttachment("organized_insta_data_per_gu.csv").csv().then(data => data.filter(d => d.gu_eng !== "").map(d => ({
gu: d.gu,
gu_eng: d.gu_eng,
gu_count: d.gu_count,
season: d.season,
hashtags: d.hashtags
})))
Insert cell
organized_insta_data_per_gu.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
gu_count_access = new Map(insta_data.map(({gu_eng, gu_count}) => [gu_eng, gu_count]))
Insert cell
gu_count_access.get("Gangnam-gu")
Insert cell
Jongno = gu.features[0]
Insert cell
Jongno_name = gu.features[0].properties.SIG_ENG_NM
Insert cell
Jongno_access = gu_count_access.get(Jongno_name)
Insert cell
gu.features[0].properties.SIG_ENG_NM == insta_data[22].gu_eng
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