Hungarian county map#222
Conversation
- svg edited: - added <g> around <path>-s - moved class attribute from <path> to <g> - formatted class attribute so that BaseMap could find & color parts - added viewBox - copied frenchmap.py to hungarianmap.py and edited - exported the new class from pygal/__init__.py
|
Hi thank you very much for your pull request. I am moving maps into external packages (#225). |
|
@paradoxxxzero Is it possible to make the pygal package a daughter of github a group? and then to have the map modules also listed there? I understand the architecture choice to move maps to their own packages, and to be independently maintained. It seems a bit dis-organized to have maps in several (200+) repositories... It seems that little thought has been given to: When we (pygal users) want 1) to see what maps do work with with pygal (informational, i.e there is no map for Nepal) and 2) what map modules there are for use with pygal (I am assuming that these are separate download modules), where are we supposed to go? I suggest that it would be great to have all these resources in one place. |
This is a county map (~NUTS-3) implementation for Hungary.
It would be fantastic if you could integrate it into pygal.
The svg map is from wikimedia (exact location is in the commit message), its license says "public domain", it is there since 2007, I have hand-adjusted it to work with pygal.
The support code is copy-paste-edit derived from
frenchmap.py.I can do some adjustments still if needed.
The following are things I wanted/planned to do, but could not (mostly time constraint).
Using NUTS based area addressing (http://en.wikipedia.org/wiki/NUTS_of_Hungary) instead of county names.
Write tests. It is a bigger effort: I felt copying
test_frenchmap.pywould not add real value.The pygal map implementation has some strict assumptions about the .svg used for displaying the map, so when expectations are changed, the country map might no longer work until updated. My feeling is that svg files should be checked against the assumptions in a test.
Current assumptions such a test could check for (I have run into these specific problems):
map-elementsbeing iterable (e.g.<g>elements, not<path>-s)Demo code/documentation: have not found the place to put. Please find below the code I wanted to add (edit it as you please).