To display a world map, Numista dashboard generates a PNG file. But there is another way to create such maps, namely using Google JS API. I took few lines of JavaScript code from other coin site (ucoin), where a similar map is generated using Google's API, and wrote a Python script that takes exported collection data (CSV) and generates a HTML file that shows a world map.
Now I can customize my map with chronological filters. For example, this is a full map of my collection:
And here is a map of my modest pre-1940 coin collection:
Map of my coins from year 2000 and later:
This is just a proof of concept. Various developments and improvements are possible. If you understand what Python is, you can take these files and generate your own maps:
Quote: "smoked_caramel"This has to be moved to Numista Website section and made a feature request. I'm sure it will get lots of votes.
The point of my post was that everyone who has at least rudimentary understanding about Python scripting can draw a world map for himself, right now, and there is no need to wait until the members of Numista's programming team will have time to implement this as a new feature of the website. But I agree that this would be a nice feature.
Also if a user has a list of her/his coins with additional information (metal composition, size, shape, price, origin, whatever), then, using my script, it is easy to make maps with more additional filters, for example "map of my aluminium coins".
re: "everyone who has at least rudimentary understanding about Python scripting can draw a world map for himself, right now, and there is no need to wait until the members of Numista's programming team will have time to implement this as a new feature of the website."
I don't have any understanding of Python. Is this something I can learn how to do from a how-to post, or would I need to have a type of special software and some background knowledge? Thanks!
I think it would be really interesting to have a date slider and have the map change to reflect the different national boundaries and entities over time, but I can only imagine what an enormously complex task that would be!
Quote: "Jesse11"I think it would be really interesting to have a date slider and have the map change to reflect the different national boundaries and entities over time, but I can only imagine what an enormously complex task that would be!
that would be exactly what I would want to have! To see the world change and your coin amounts as well. That would be amazing!
Quote: "Pott"I don't have any understanding of Python. Is this something I can learn how to do from a how-to post, or would I need to have a type of special software and some background knowledge? Thanks!
Yes, you need software called Python: https://www.python.org/
I used version Python 2.7.3.
Unfortunately, contemporary distributions are very bloated. The simplest Python distribution would suffice for this.
If you are a Linux user, possibly you already have Python.
Quick how-to:
Download two files from Pastebin.com (see my post above). You need to rename the second file to map_template.html
Put your file with the coins list (CSV, not XLSX) in the same directory where the two downloaded files are located. Rename it to numista_coins.csv
Execute the following shell command: "python map_of_coin_collection.py"
New file named map_output.html will be generated. Open it in your browser.
If you want chronological filter, open the file map_of_coin_collection.py with a text editor (such as Notepad) and remove the symbol "#" from this line:
#if year >= 1940: continue
Also you can change the number 1940 to other number. Then execute the shell command "python map_of_coin_collection.py" again.
Does it sound complicated?
QuoteI think it would be really interesting to have a date slider and have the map change to reflect the different national boundaries and entities over time, but I can only imagine what an enormously complex task that would be!
IMHO generating new map on the fly when you move a slider would be slow (given that the map is generated in the way described above). It would take too long to scan the whole coin list every time when a slider is moved.
You should take into account that this script regards Austria-Habsburg and Austria as the same country. The same with Russia - Empire and Russia. Just an interesting fact. No problem for me here.
Quote: "druzhynets"You should take into account that this script regards Austria-Habsburg and Austria as the same country. The same with Russia - Empire and Russia. Just an interesting fact. No problem for me here.
You are right. The map is divided into countries in a peculiar way, not exactly like Numista's map. There are various differences. Some can be corrected by modifying the template, some by modifying the script itself. This is one of the reasons why I wrote that this is just a proof of concept.
It works great ! And right, running on Linux python is there.
Though 3 details:
- you have to say that the first condition "if year > 1940" refers to what you don't want on the map.
So if you want to map coins between 1800 and 1900, then you have to type "if year<1800 or year >1900" right ?
- then there is a second place with year conditions I did not touch it and was ok.
- calender !!! My pre 1800 map includes Muslim countries
Now what we need with that is the possibility to export subsets of our coins from Numista (ex. a search on a keyword) and with that too we can produce a map.
You have a trick to plot that on G Earth ??
Quand l'Histoire et la Géographie se croisent sur nos pièces de monnaie ...
In my mind best implementation is with a simple slider where you can choose the year and the map should display the map of that period. That would be such a simple way to use the map. I'am talking about something like this.
I didn't noticed that US is missing.
I use a special software where I can digitize the maps and all kind of options to edit maps, It's possible to delete US by mistake. Sorry about that but you got the idea: timeline slider
Quote: "Ecapoe"- you have to say that the first condition "if year > 1940" refers to what you don't want on the map.
So if you want to map coins between 1800 and 1900, then you have to type "if year<1800 or year >1900" right ?
Yes, that condition specifies what coins will be omitted.
Quote: "Ecapoe"- then there is a second place with year conditions I did not touch it and was ok.
Don't pay attention to that (that part of the script can be used for list exported from ucoin.net).
Quote: "Ecapoe"- calender !!! My pre 1800 map includes Muslim countries
In principle this can be fixed by adding many lines like this:
if country=="Egypt": year+=580
(Probably inexact formula, but you got the idea.)
(Also there is a bug with coin names that contain comma; that's why some Canada coins are listed as pre-1800 in your example.)
Quote: "Ecapoe"Now what we need with that is the possibility to export subsets of our coins from Numista (ex. a search on a keyword) and with that too we can produce a map.
A list exported from Numista does not contain much information, but some filters can be added to my script, for example, this would omit all non-Euro coins: