Lemoncode / simplechart

Simplechart seed
MIT License
12 stars 13 forks source link

Create json resources for municipalities, provinces and regions #18

Closed brauliodiez closed 6 years ago

brauliodiez commented 6 years ago

We are going to reuse in several maps same geo path, How this geo paths and topojson paths works?

Some articles to get started:

https://bost.ocks.org/mike/map/

http://d3indepth.com/geographic/

We don't need to go the hard way, there are already plenty of resources that have the maps in geojson / topo json format:

https://github.com/deldersveld/topojson/tree/master/countries/spain

About already built samples:

https://bl.ocks.org/martgnz/77d30f5adf890ef7465c

https://github.com/Lemoncode/d3js-samples/tree/master/samples/04%20maps/02%20spain

The goal of this task is to generate under the src/resources/map a set of json files that will contian regions, or provinces or municipalities.

On going discussion: talk as well with @fjcalzado and @carlostxm one option is to get an existing json file with all the info and apply filtering, my concern here is size, e.g. full europe map takes 3 Mb, we need something lite weight, and not every map is going to use all the bells and whistles.

On the other hand @fjcalzado can provide you a json file that could be filetered.

One final step, check if we can store this in topo json format and save 80% of the size.

brauliodiez commented 6 years ago

Found one that contains at least region + region names, worth to take a look:

https://raw.githubusercontent.com/deldersveld/topojson/master/countries/spain/spain-comunidad-with-canary-islands.json

ClaudiaPascualGea commented 6 years ago

Found one that contains provinces: https://gist.github.com/peterlozano/3a4578f64ec9630cfefe#file-es-json

Raw file: https://gist.githubusercontent.com/peterlozano/3a4578f64ec9630cfefe/raw/b136b2c363d35cd6d76d6716144bd908b7798b98/es.json

fjcalzado commented 6 years ago

I was working on this guys, since I have plenty experience with GIS, creating maps, transforming coordinates, etc.

My plan is:

I am halfaway in the process.

fjcalzado commented 6 years ago

Please find the processed maps in https://github.com/Lemoncode/simplechart-maps-source. @juanbermudezpareja could you please integrate the final minified topojson maps into our repository?

juanbermudezpareja commented 6 years ago

Yes, of course. Good job @fjcalzado !

juanbermudezpareja commented 6 years ago

Uploaded next files in src/resources/maps: Spain-01-Regions-EPSG-4326.MIN.topojson Spain-02-Provinces-EPSG-4326.MIN.topojson Spain-03-Municipalities-EPSG-4326.MIN.topojson