How do I scale a geo projection? #2323
-
Hi, Sorry I'm new to both observable and plot and I'm struggling a little with geo plots. I'm trying to plot the map of India and layer data on top of it. I found multiple GeoJson and TopoJSON files for India borders, and tried replicating the basic tutorial map (which uses US). When I put in my JSON file, and ran the topojson feature, the country came in extremely small - about 50x50px. At first I thought there could have been a problem with the JSON file, but I've seen other people use it and seems to be working fine for them. In D3, I know there's a scale function for Geo so I was wondering if there's something similar for Plot? Am I doing something wrong or missing something? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The answer was in the official docs, but I wasn't able to relate it properly until I read https://observablehq.com/@observablehq/plot-projection-domain, mainly the line "the domain should be a GeoJSON object". So once you pass the country geojson in the domain, it scales perfectly! |
Beta Was this translation helpful? Give feedback.
The answer was in the official docs, but I wasn't able to relate it properly until I read https://observablehq.com/@observablehq/plot-projection-domain, mainly the line "the domain should be a GeoJSON object". So once you pass the country geojson in the domain, it scales perfectly!