Published
Edited
Apr 9, 2021
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
height = 650
Insert cell
width = 900
Insert cell
path_points = d3.geoPath().projection(projection)
Insert cell
Insert cell
Insert cell
Insert cell
//proportional symbols
//radius = d3.scaleSqrt([0, d3.max(attribute)], [0, 30])
Insert cell
Insert cell
radius = d3.scaleThreshold()
.domain(naturalbreaks)
.range(radiusArray)
Insert cell
sizeArrayForLegend = Array.from(radiusArray, d=>Math.PI*Math.pow(d, 2))
Insert cell
radiusArray = [10, 15, 20, 25]
Insert cell
circleLabels = Array.from(naturalbreaks, d=> format(Math.pow(d, 2)))
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
attributeName = "FHH_CHILD"
Insert cell
idName = "STATE_NAME"
Insert cell
md`Below is where I placed the JSON files that were joined together using QGIS at the very beginning of this notebook. The points function holds the centered dots in each state shape, and the basepolygons has the shapefile for the lower 48. `
Insert cell
//import the point data (geojson)
points = FileAttachment("states48_points (1).geojson").json()
Insert cell
//import the polygon base map data
basepolygons = FileAttachment("STATES48 (1) (1).json").json()
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