Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.py
would 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-elements
being 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).