Skip to content

DuckDB Spatial and Observable Framework/Plot geo #1825

Answered by Fil
fundef1 asked this question in Q&A
Discussion options

You must be logged in to vote

There are a couple of difficulties here.

The coordinates in this dataset are already projected to a metric plane, so you should not use another projection (which would map from longitude/latitude in degrees), but use linear scales for x and y, with an aspectRatio of 1 to avoid distorsion. (Or use the "identity" or "reflect-y" projection to be explicit and remove the axes. See https://observablehq.com/plot/features/projections.)

The DuckDB client does not decode JSON, which is returned as a string, so you have to parse it on the side (this could be improved in the future, when a geometry is a string?). I recommend parsing this into a proper GeoJSON FeatureCollection, even though it's not s…

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@fundef1
Comment options

@Fil
Comment options

Fil Nov 17, 2024
Collaborator

@Fil
Comment options

Fil Nov 17, 2024
Collaborator

@fundef1
Comment options

@fundef1
Comment options

Answer selected by fundef1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants