markmarkoh / datamaps

Customizable SVG map visualizations for the web in a single Javascript file using D3.js
http://datamaps.github.io
MIT License
3.78k stars 1.01k forks source link

missing counties FYI #241

Closed Tuhaj closed 8 years ago

Tuhaj commented 8 years ago

When I was creating a continent scope map from countries I discovered that the worldmap is missing some countries:

missing countries in continent: AS ["BHR", "IOT", "CXR", "CCK", "HKG", "MAC", "MDV", "SGP"]
missing countries in continent: EU ["AND", "FRO", "ALA", "GIB", "VAT", "LIE", "MLT", "MCO", "SMR", "SJM", "GGY", "JEY", "IMN"]
missing countries in continent: AN ["BVT", "SGS", "HMD"]
missing countries in continent: AF ["CPV", "COM", "MYT", "MUS", "REU", "SHN", "STP", "SYC"]
missing countries in continent: OC ["ASM", "COK", "PYF", "KIR", "GUM", "NRU", "NIU", "NFK", "MNP", "UMI", "FSM", "MHL", "PLW", "PCN", "TKL", "TON", "TUV", "WLF", "WSM"]
missing countries in continent: NA ["ATG", "BRB", "BMU", "VGB", "CYM", "DMA", "GRD", "GLP", "MTQ", "MSR", "ANT", "CUW", "ABW", "SXM", "BES", "UMI", "BLM", "KNA", "AIA", "LCA", "MAF", "SPM", "VCT", "TCA", "VIR"]

This information is based on that list: https://en.wikipedia.org/wiki/List_of_sovereign_states_and_dependent_territories_by_continent_(data_file)

cap0 commented 8 years ago

I'd really like to have the missing EU countries in my project

sitz commented 8 years ago

+1 Seems like 178 out of existing 196 are mapped properly in the dataset.

mauro-midolo commented 8 years ago

+1

magic890 commented 8 years ago

I've found that Lonely Planet is using DataMaps on user profile trips / living countries (e.g. https://auth.lonelyplanet.com/profiles/wunderbart/trips).

Their map is more detailed than the default world implementation present in DataMaps. Here is the TopoJSON file: https://assets.staticlp.com/assets/world_by_iso_topo-e3d32348133833e5e7fea4b128ef5f92.json

To use this custom map I suggest using this (partial) configuration:

var defaultOptions = {
    scope: "worldByIso",
    done: drawMapContents,
    setProjection: function(e, n) {
        var r, i, s = n.width || e.offsetWidth, o = n.height || e.offsetHeight;
        return r = d3.geo[n.projection]().scale((s + 1) / 2 / Math.PI).translate([s / 2, o / 1.45]), i = d3.geo.path().projection(r), {
            path: i,
            projection: r
        }
    },
    projection: "mercator",
    geographyConfig: {
        dataUrl: 'https://assets.staticlp.com/assets/world_by_iso_topo-e3d32348133833e5e7fea4b128ef5f92.json',
        borderWidth: 0.3,
        highlightBorderWidth: 0.5
    }
}

All the missing countries listed before:

missing countries in continent: AS ["BHR", "IOT", "CXR", "CCK", "HKG", "MAC", "MDV", "SGP"] missing countries in continent: EU ["AND", "FRO", "ALA", "GIB", "VAT", "LIE", "MLT", "MCO", "SMR", "SJM", "GGY", "JEY", "IMN"] missing countries in continent: AN ["BVT", "SGS", "HMD"] missing countries in continent: AF ["CPV", "COM", "MYT", "MUS", "REU", "SHN", "STP", "SYC"] missing countries in continent: OC ["ASM", "COK", "PYF", "KIR", "GUM", "NRU", "NIU", "NFK", "MNP", "UMI", "FSM", "MHL", "PLW", "PCN", "TKL", "TON", "TUV", "WLF", "WSM"] missing countries in continent: NA ["ATG", "BRB", "BMU", "VGB", "CYM", "DMA", "GRD", "GLP", "MTQ", "MSR", "ANT", "CUW", "ABW", "SXM", "BES", "UMI", "BLM", "KNA", "AIA", "LCA", "MAF", "SPM", "VCT", "TCA", "VIR"]

are present in the custom map linked, except for ANT (Netherlands Antilles), because that was dissolved back in the 2010 as stated here.

Related to: #76

magic890 commented 8 years ago

Fixed in version 0.5.0. @markmarkoh This issue can be closed.