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
Fix Tibetan cities display on China's city map #12103
Conversation
I'm wondering if those 8 cities are the only cities that geoip is able to detect for Tibet. |
@sgiehl Yes you made the right guess. I used the CSV database from http://geolite.maxmind.com/download/geoip/database/GeoLiteCity_CSV/GeoLiteCity-latest.tar.xz and run a grep, but somehow a binary character made grep stopped at the 8th record. I just tried to open the CSV in Excel and got like 50 more records. Let me figure out how to do this. Are there any |
@sgiehl Do you think it's OK to add a get-the-protected-rowsIndexByLabel method to DataTable? I guess otherwise we will just do the GroupBy every time without checking the IF condition. |
No there isn't. Guess we should add the |
Added a new patch, again have tested to be working on my server. I'm not sure what the GroupBy does. If it's costly then I guess it's still better to run an checking iteration. We can avoid doing the GroupBy in most cases since there are not many Internet users (or simply a large population) in Tibet (I myself run a Chinese tech blog and got less than 50 visits from Tibet in 4 years). |
The GroupBy actually does this: https://github.com/piwik/piwik/blob/3.x-dev/core/DataTable/Filter/GroupBy.php#L73-L108 |
Well, to me, it does seem worth it to run a pre-check on rowsIndexByLabel. What do you think? |
I agree, but we should avoid to make |
Yes, fair point. I guess then we don't need to change the PR since adding |
Happy new year. Just had a quick follow-up: why is this out of 3.3 milestone? |
Happy new year. moved it back to 3.4 milestone |
* Fix Tibetan cities missing from the Chinese city map * Apply the filter without checking every city
#11930 only changed country and region level archive data. This PR remaps the city data so Tibetan cities are correctly displayed. Before the patch, no visits from Tibetan city is on the city level map (but visits from Tibet can be seen on the region level map).
Above is a screenshot on my server after applying the patch (Lhasa is now on the map).