Public
Edited
Nov 12, 2022
5 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
bubbles = d3.select(map).select("g#bubbles").selectAll("circle")
Insert cell
Insert cell
Insert cell
value_domain = d3.extent(intellij2021, (d) => d["count"])
Insert cell
scaleMaxRadiusWorld = d3
.scaleLinear()
.domain([320, 480, 600, 700])
.range([5, 7, 8, 15])
Insert cell
scaleMinRadiusWorld = d3
.scaleLinear()
.domain([320, 480, 600, 700])
.range([0.5, 0.5, 1, 1])
Insert cell
maxRWorld = scaleMaxRadiusWorld(width)
Insert cell
minRWorld = scaleMinRadiusWorld(width)
Insert cell
scaleRadiusWorld = d3
.scalePow()
.exponent(k)
.domain(value_domain)
.range([minRWorld, maxRWorld])
Insert cell
tippytheme = "light-border"
Insert cell
tippy_style = html`<link rel="stylesheet" href="${await require.resolve(
`tippy.js/themes/` + tippytheme + `.css`
)}">`
Insert cell
tippy = require("tippy.js@6")
Insert cell
Insert cell
height = (width * 2) / 3.3
Insert cell
devices_breaks = [320, 560, 1024]
Insert cell
margin = ({ top: 50, bottom: 30, left: 30, right: 30 })
Insert cell
scaleScaleMap = d3.scaleLinear().domain(devices_breaks).range([50, 90, 150])
Insert cell
scaleMap = scaleScaleMap(width)
Insert cell
Insert cell
geoPath = d3.geoPath().projection(myProjection)
Insert cell
Insert cell
Insert cell
Insert cell
_sharing_data_outside.filter(function (d) {
return d["country.live"] != null;
})
Insert cell
pythondevcountries = d3
.flatRollup(
_sharing_data_outside.filter(function (d) {
return d["country.live"] != null && d["country.live"] != "Other country";
}),
(v) => v.length,
(d) => d["country.live"]
)
.map(([Country, Count]) => ({ Country, Count }))
Insert cell
country_spicified_ratio = total_respondends / _sharing_data_outside.length
Insert cell
total_respondends = d3.sum(pythondevcountries, (d) => d.Count)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
countriesInfo = FileAttachment("countries-4.csv").csv()
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
import { slider } from "@jashkenas/inputs"
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