Public
Edited
Apr 10
Importers
6 stars
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
Insert cell
{
const dualDensityPlot = new moranplot.MoranDualDensity(results)
dualDensityPlot.focus(viewResult.id)
return dualDensityPlot.plot()
}
Insert cell
Insert cell
Insert cell
moranNetwork = {
const moranNetwork = new moranplot.MoranNetwork(results)
return moranNetwork.plot()
}
Insert cell
Insert cell
Insert cell
{
const lagPolarPlot = new moranplot.LagRadial(results, {featureCentroids: centroids})
lagPolarPlot.focus("30017")
return lagPolarPlot.plot()
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
{
const clusterMap = new moranplot.ClusterMap(results, usCounties, {
projection: { type: "albers-usa", domain: usCounties }
})
return clusterMap.plot()
}
Insert cell
Insert cell
Insert cell
{
const dualDensityPlot = new moranplot.MoranDualDensity(results, {
width: 480,
height: 160,
margin: 30,
centerHeight: 50,
textMode: "label_only",
fontSize: 12,

zDistribution: "auto",
// zDistribution: estimateDistribution(results.map(d => d.z), 10),
lagDistribution: undefined, // Distribution tuples or a false-y value to hide the lag distribution
// lagDistributionDisplay: "fill", // Applies only if 'lagDistribution' is not false-y. Takes "fill" or "stroke"

colors: {
distribution: "#E5E4E2",
z: "black",
connection: "blue",
positiveAutocorrelation: "green",
negativeAutocorrelation: "purple",
},
})
dualDensityPlot.focus(viewResult.id)
return dualDensityPlot.plot()
}
Insert cell
Insert cell
{
const moranNetwork = new moranplot.MoranNetwork(results, {
width: 480,
height: 480,
margin: 35,
fontSize: 12,
colors: {
highHigh: "#ff3d47",
highLow: "#f99ae4",
lowHigh: "#94d1ff",
lowLow: "#186ffb",
notSignificant: "#d1d1d1"
},

xLabel: "Value (z)",
pointOpacity: 0.5, pointOpacityDimmed: 0.05,
rSmall: 2, rMedium: 3, rBig: 5,
drawAxisConnections: false,
hideXAxis: false,
})
return moranNetwork.plot()
}
Insert cell
Insert cell
Insert cell
{
const lagRadialPlot = new moranplot.LagRadial(results, {
featureCentroids: undefined, // The centroids of the spatial features
neighborAngles: undefined, // An alternative to the feature centroids: provide the angles between features directly
//neighborAngles: neighborAngles,
size: 180,
margin: 5,
innerRadius: 15,
pointRadius: [2,5],
colors: {
axis: "#ededed",
refCircle: "#d1d1d1",
connection: "blue",
positiveAutocorrelation: "green",
negativeAutocorrelation: "purple",
highHigh: "red",
highLow: "pink",
lowHigh: "lightblue",
lowLow: "blue",
notSignificant: "grey"
},
})
lagRadialPlot.focus("30017")
return lagRadialPlot.plot()
}
Insert cell
Insert cell
{
const clusterMap = new moranplot.ClusterMap(results, usCounties, {
width: 640, height: 480,
style: { fontSize: "12px" },
colorMode: "label",
colors: {
highlight: "orange",
highHigh: "#ff3d47",
highLow: "#f99ae4",
lowHigh: "#94d1ff",
lowLow: "#186ffb",
notSignificant: "whitesmoke"
},
pointOpacity: 0.8,
projection: {type: "identity", domain: usCounties},
})
return clusterMap.plot()
}
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
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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