Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated / New Matomo Maps #11929

Open
sgiehl opened this issue Aug 3, 2017 · 16 comments
Open

Updated / New Matomo Maps #11929

sgiehl opened this issue Aug 3, 2017 · 16 comments
Labels
c: Accessibility When something is not usable for a certain group (eg missing contrast) or devices (eg smartphones). Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. RFC Indicates the issue is a request for comments where the author is looking for feedback. Technical debt Issues the will help to reduce technical debt

Comments

@sgiehl
Copy link
Member

sgiehl commented Aug 3, 2017

Our map wasn't updated for some years and some stuff is shown wrong or is incomplete.
Unfortunately our map generator (https://github.com/piwik/piwik-map-generator) is outdated and doesn't work anymore.

We either should try to get the old generator working again or look out for some completely new maps.

Would be awesome if we would find some volunteer for this project, as we currently have more important issues and won't be able to handle this soon.

Summary of Issues that should be resolved with new maps:
#11266, #10963, #10123, #9719, #9170, #321, #13347, #18459 and maybe others

@sgiehl sgiehl added the RFC Indicates the issue is a request for comments where the author is looking for feedback. label Aug 3, 2017
@fengkaijia
Copy link
Contributor

Adding to the issue board: Hong Kong and Macao are missing from the map (not in either World/Asia/China view). I guess the same goes to a few European city-size country/regions as well, e.g. the Holy See. How about moving to Highmaps (and add an option to allow non-commercial users to switch to it).

@mattab
Copy link
Member

mattab commented Sep 21, 2017

How about moving to Highmaps (and add an option to allow non-commercial users to switch to it).

Their license is not compatible with the GNU/GPL so we can't use it

@tassoman
Copy link
Contributor

tassoman commented Nov 29, 2019

I dunno if you're interested but why overhelming the project with map building (going outside the matter of analytics) while there are already good mapping projects outta there?

I mean can be interesting having a ready made map based on leaflet.js filled with OpenStreetMap open data, or maybe a d3-geo based project?

@Findus23
Copy link
Member

@tassoman I don't know any specifics yet, but using one of those is pretty much what is planned.

@tsteur
Copy link
Member

tsteur commented Nov 29, 2019

@tassoman yes 99% likely we will use some existing solution as building a maps is a project in itself which we don't want to do. Better for us to focus on analytics :)

There is also https://github.com/markmarkoh/datamaps (based on d3 though) and https://github.com/10bestdesign/jqvmap and a few other ones.

@mattab mattab added the Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. label Jan 31, 2020
@mattab
Copy link
Member

mattab commented Feb 20, 2020

Suggested next step: research for maybe 1 or 2 days and trying quickly whether any of the libs above could work for us.

@fengkaijia
Copy link
Contributor

ECharts (https://github.com/apache/incubator-echarts) might also work, it reads GeoJSON and provides a built-in world map.

For provincial level maps, we still need to generate the GeoJSON by ourselves, from sources like shapefiles, such as naturalearthdata.com. You may refer to some examples with ECharts from https://github.com/echarts-maps/echarts-countries-js.

@Findus23
Copy link
Member

ECharts looks like a huge charting library that can also do geoplots. Maybe we should go for something simpler.

My idea would be
-> Downloading shapefiles from naturalearthdata.com
-> writing a nodejs script that converts it to geojson
-> I would recommend to use topojson as it is an extension of geojson specifically for map borders. It is able to unify borders between area and takes less space and most importantly allows to simplify the border shape while still keeping the topology intact (so no gaps between countries due to rounding).
I'm doing something similar (but simpler) here where I store parking district areas.
Topojson can be very simply converted back to geojson on the frontend.
https://medium.com/@mbostock/command-line-cartography-part-1-897aa8f8ca2c is a bit old but a good guide for all of this.
mapshaper also allows to do multiple of these steps in one tool, so it is worth looking at
For displaying the map I think we have two different directions we could go with creating the map.

Either stay with stylized simple maps, render them e.g. with d3 similar to http://bl.ocks.org/michellechandra/0b2ce4923dc9b5809922. This would probably allows a quite quick and responsive interface and nice visualizations (as the countries are just SVG shapes again and can be styled easily). But we would probably just like now have fixed views of continents, countries, etc.

Or we go the leaflet route. This would mean that we have one map where one could zoom and pan freely, clicks on countries could zoom in on them. This would allow more posibilties (like simply adding more map layers with "real' maps. But it would also take more resources (my map has quite few lines on it, but is already not that fluid) and possibly be less responsive.

http://bl.ocks.org/mpmckenna8/af23032b41f0ea1212563b523e859228 is a great demo for this.

Personally I'd go with the first method as I think it will be the nicer user experience for Matomo users (simple county maps could load very quickly into a small svg and not need slow initializing of whole map rendering which allows them to be shown in more places in Matomo), but the second method might be easier to program and is what I have more experience with.

@tsteur tsteur removed this from the 4.0.0 milestone Apr 13, 2020
@sgiehl
Copy link
Member Author

sgiehl commented May 30, 2022

@justinvelluppillai might be good to think about giving this one a higher priority at some point, as our maps are really outdated meanwhile and there are more and more issues coming in over time...

@varunKothare
Copy link

Further updates on a this topic has been added in the comments here: #12507
Regarding how the Indian Map is being represented.

@sgiehl
Copy link
Member Author

sgiehl commented Feb 9, 2023

@mattab This issue might need a higher priority at some point. It might be acceptable for an open source project to contain very very outdated map data. But as a company serving customers that might be less acceptable.
At some point we might need to consider disabling / removing the map widgets maybe as it's better not to have a feature, than having a outdated map causing more and more displeasure

@tassoman
Copy link
Contributor

I want to add a note to my previous comment about OpenStreetMap isn't very well suitable because "official" servers are set in USA and maybe a privacy constraint for certain users.

I'd rather be for a local vectorial library. Maybe the Vue Echarts v3 library, but it's based on Vue2
https://github.com/xlsdg/vue-echarts-v3

https://xlsdg.org/vue-echarts-v3-demo/#/demo02

@mattab mattab added the c: Accessibility When something is not usable for a certain group (eg missing contrast) or devices (eg smartphones). label Mar 10, 2023
@MatomoForumNotifications

This issue has been mentioned on Matomo forums. There might be relevant details there:

https://forum.matomo.org/t/how-to-add-andorra-or-monaco-in-visitors-map-or-filter/49548/2

@MatomoForumNotifications

This issue has been mentioned on Matomo forums. There might be relevant details there:

https://forum.matomo.org/t/some-french-regions-are-not-defined/50483/3

@MatomoForumNotifications

This issue has been mentioned on Matomo forums. There might be relevant details there:

https://forum.matomo.org/t/probleme-de-geolocalisation-et-statistiques-absentes/53255/2

@9joshua
Copy link
Contributor

9joshua commented Feb 20, 2024

A Cloud customer is experiencing the same region mapping issue for Norway mentioned in #20368
Visits to the majority of regions in the country table do not appear/exist on the map.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Accessibility When something is not usable for a certain group (eg missing contrast) or devices (eg smartphones). Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. RFC Indicates the issue is a request for comments where the author is looking for feedback. Technical debt Issues the will help to reduce technical debt
Projects
None yet
Development

No branches or pull requests

9 participants