Published
Edited
Mar 16, 2021
Insert cell
// Phil, all of the errors seem to be geojson related. When you select the DCmuseums radio button, do none of the errors pop up for you? Do you see the museum data?

// I'm under the impression that JSON and geoJSON are interchangeable words and the only distinction between the data is whether or not it's geospatial. So should it matter that I call the museum data with .json?
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
// request error HTTP 400 indicates that I probably have bad code, rather than the server failing to deliver
Insert cell
Insert cell
// ERROR: viewof rows = RuntimeError: geojson could not be resolved
Insert cell
viewof rows = Table(geojson.features)
Insert cell
// ERROR: RuntimeError: geojson could not be resolved
Insert cell
rows
Insert cell
Insert cell
Insert cell
// ERROR: layer = RuntimeError: geojson could not be resolved
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
// bounding box, SW and NE corners
// node(38.8136, -76.9208, 38.9867, -77.1477);
Insert cell
// ERROR: geojson = [object Object]

// PHIL I THINK THIS IS THE START OF THE ERROR? MAYBE.
Insert cell
geojson = queryOverpassGeoJSON(query)
Insert cell
function queryOverpassGeoJSON(query) {
mutable report = md`Please wait...`;
return new Promise((resolve, reject) => {
queryOverpass(query, (error, data) => {
if (error) {
mutable report = error;
reject(error);
} else {
mutable report = md`${data.features.length} features returned.`;
resolve(data);
}
});
});
}
Insert cell
Insert cell
Insert cell
Insert cell
DC_Museums = d3.json("https://opendata.arcgis.com/datasets/2e65fc16edc3481989d2cc17e6f8c533_54.geojson")
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