mapstarter | generating starter SVG maps from a geographic data source | Data Visualization library
kandi X-RAY | mapstarter Summary
kandi X-RAY | mapstarter Summary
Mapstarter is a tool for turning a geographic data file into a map for the web. This is a work in progress. Got ideas? Requests? Complaints? Data files that didn’t work? Let me know! (see Get in touch below).
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Generate html code
- Callback for when the new file is loaded .
- set up event handlers
- Update the projection .
- sorts the attributes of the given column order
- Populate map scaling
- Uploads a Shape file to a zip file
- Recolor nodes in map
- Adjust the map
- upload multiple shapes
mapstarter Key Features
mapstarter Examples and Code Snippets
Community Discussions
Trending Discussions on mapstarter
QUESTION
I'm sorry this is probably a very basic issue, but I just can't seem to figure it out.
I wanted to map some data using D3.js and the map shape I wanted to use is provided by the UK's Office for National Statistics. I managed to get their geojson data to display, but as soon as I try to do anything with scaling, transforms, topojson, I've been a complete failure.
I've been through many, many, different approaches and I think it's something about the map data that is causing the issue. If I open the shape files in Mapshaper it looks perfect. If I export as geo or topojson and re-import, it looks perfect. If I try to run geo2svg on the geojson export it produces a lot of data, but nothing visible. If I try to import the original shape file into mapstarter.com it produces a flat line. And if I put the topojson into the D3 v4 bounding example I end up with a load of random triangles.
So, can someone show me how do you get ONS mapping data such as http://geoportal.statistics.gov.uk/datasets/1bc1e6a77cdd4b3a9a0458b64af1ade4_3 to display in a d3 example such as https://bl.ocks.org/iamkevinv/0a24e9126cd2fa6b283c6f2d774b69a2?
Thanks
...ANSWER
Answered 2017-Jan-30 at 17:45The data that you have linked to is projected. Mapshaper supports projected data, but using d3.geoProjection with projected data will result in no data being displayed in most situations. You need to ensure your data is in lat long pairs for proper display with a d3.geoProjection.
Luckily, in Mapshaper you can reproject your data. Copy all the files of the shapefile into mapshaper, and in the console change the projection to wgs84 (unprojecting your data):
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install mapstarter
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page