matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.88k stars 2.65k forks source link

User map for Liechtenstein doesnt show #321

Closed ThaDafinser closed 2 years ago

ThaDafinser commented 10 years ago

Hello,

the user map is a really great feature. For for Liechtenstein, i cant zoom in.

I see it empty: europe liechtenstein

ThaDafinser commented 10 years ago

Just seeing that there is the .svg missing https://github.com/piwik/piwik/tree/master/plugins/UserCountryMap/svg

ping @gka how can i create it?

sgiehl commented 9 years ago

There are other SVGs missing, aswell. Such for very small countries like Mauritius, Martinique,... @gka Can you generate the missing ones, or provide a way how to do that? If needed I can look up the country codes that are missing.

mattab commented 9 years ago

edit refs #11929

@sgiehl not sure if Greg is available he may be busy. Do you know if maybe the latest version of Kartograph would have the map for Liechtenstein? if so we could maybe upgrade. if not, it would be a pleasure to sponsor this improvement and others in Kartograph :-) cc @gka

sgiehl commented 9 years ago

I'll give it a try to set up kartograph and see if I'm able to generate the missing SVGs.

sgiehl commented 9 years ago

Ok. Seems https://github.com/gka/piwik-map-generator was used to create the SVGs. But I'm not able to regenerate those using that and the latest kartograph. It seems the latest shape files differ as there are errors occuring while generation. Seems the configs needs to be adjusted. Tried to fix some parts in a fork, but the generated maps differ a lot from the ones used by piwik.

ThaDafinser commented 7 years ago

Katrograph is EOL https://github.com/kartograph/kartograph.py#kartographpy

Suggested replacement https://github.com/mbloch/mapshaper

sgiehl commented 7 years ago

@ThaDafinser We're aware of this, but we have no capacities free to handle that. Would you be keen to give it a try and replace Kartograph maps with the suggested one?

ThaDafinser commented 7 years ago

No problem. Just wanted to note it here, since i just came back to some old issues.

I will give it a try, to get running.

ThaDafinser commented 7 years ago

When using the same source for the GEO data (which is also partly outdated) https://github.com/fraxen/naturalearth_wagnerVII

After installing mapshaper i could generate the 2 levels with the commands below. With some further tweaking, i think this could be a solution to generate the maps again.

step1) worldmap

mapshaper download/ne_50m_admin_0_countries.shp -proj natearth -filter-islands min-vertices=80 -simplify 30% -svg-style fill=#fff stroke=#000 -o world.svg format=svg

step2) country only

mapshaper download/ne_10m_admin_1_states_provinces.shp -proj natearth -filter-fields iso_a2 -filter '"LI" == iso_a2' -svg-style fill=#fff stroke=#000 -o country.svg format=svg

step3) region (broken in powershell...bbox needs somehow escaping)

mapshaper download/ne_10m_admin_1_states_provinces.shp -proj natearth -clip bbox=-20, -38, 53, 40 -svg-style fill=#fff stroke=#000 -o region.svg format=svg

image image

sgiehl commented 2 years ago

closing in favor of https://github.com/matomo-org/matomo/issues/11929