Jump to content

I've been teaching myself to code and built a Roman coin reference website


Recommended Posts

I purchase many bulk lots of Roman coins and find myself spending a lot of time CTRL+F'ing through Wildwinds for the specific types. I thought it would be easier to have a program/app where you can type out any information about a coin - the denomination, ruler, inscription, moneyer, deity, design description, etc. - and have it spit out all possible matches in real-time, as you type.

I've been learning Python (programming language) and Flask (web framework) as I look to reenter the corporate world after a year off, and thought it would be a fun resume-building project to put together a little coin web app. Using the OCRE and CRRO databases provided by the ANS, I built a web page that will allow you to easily look up any coin from the Roman Republic or Empire. 

This is mainly something I just built for myself, but I found a free web hosting platform for Python programs and published it online in case others find it useful.

Here's the link: https://breitemk.pythonanywhere.com/

(if viewed on a mobile device, some of the formatting may be wonky but all of the functionality should still work)

And here's a quick video demo of how it works: 

 

You can use any combination of these attributes to search for coins:

  • Ruler, moneyer, or issuer
  • Portrait (e.g. herennia etruscilla)
  • Deity (gods/goddesses featured on the coin)
  • Obverse/reverse legends (inscriptions)
  • Obverse/reverse designs
  • Denomination
  • Metal
  • RIC or RRC #

You can also search for phrase exact matches by enclosing the phrase in quotation marks (e.g. "d n diocletiano felicissimo") and you can exclude results with certain words by using a hyphen before that word (e.g. caracalla denarius -septimius).

 

Future enhancements

This was just a small side project, and I probably won't spend much more time on it. But here are my thoughts on a few potential enhancements.

  1. Coin images - Right now, I just have placeholder images within the individual coin pages. I would like to gradually start adding my own coin images to display within those pages as well as within the search results, but that's no small undertaking. I have a huge image folder that I'll need to go through, labelling each image with the proper RIC/RRC numbers. I'm hopeful I can cover most of the more common coins, but there will be many more missing images - good motivation for me to add to my collection! 
  2. OR search - The app currently supports phrase exact matches (in quotation marks) and negative match (any word appended to a "-"). I'd like to add functionality for "or" searches enclosed in parentheses, like eBay search allows. e.g. "(augustus, octavian) denarius"
  3. Mobile optimization - I didn't bother to optimize the page formatting for mobile devices, as I only use this on my desktop/laptop. A little lower-priority for me, but I'll fix this eventually.
  4. Provincial coins - I don't really collect Roman provincial coins, and the ANS unfortunately doesn't have a database that covers them. I probably won't add these unless somebody ever builds an online database for them, but I'm not holding my breath. Incorporating the Greek alphabet could also be a bit difficult.

 

All that said, let me know what you think! Please also let me know if you spot any issues/bugs if you try it, or if there's anything you think it would be helpful to add. I need to do a little bit of cleanup of the underlying ANS data, as I've noticed a couple misspellings ("coliseum" vs "colosseum") or strange design descriptions.

 

  • Like 8
  • Thanks 2
  • Cookie 1
  • Heart Eyes 1
Link to comment
Share on other sites

Nice!

I'm curious what kind of development work you used to do before (not Python) ?

I understand this was mostly an exercise and for your own needs, but it'd be cool to have the option of seeing images of the results as you type as an alternative to seeing the matches and having to click through.

  • Like 1
Link to comment
Share on other sites

38 minutes ago, Heliodromus said:

Nice!

I'm curious what kind of development work you used to do before (not Python) ?

I understand this was mostly an exercise and for your own needs, but it'd be cool to have the option of seeing images of the results as you type as an alternative to seeing the matches and having to click through.

I was a tech product manager, so worked with software devs but didn't have much direct coding experience (apart from SQL and HTML/CSS). I found Python pretty straightforward to pick up though, and ChatGPT helped a lot with any questions. 

I do want to eventually display images in the results and on each coin page. I don't have permissions to use the individual coin images displayed within the ANS pages (they're not included under the open database license that covers the rest of the data), so I'll probably need to use my own images (my preference) or public-licensed images though. 

Link to comment
Share on other sites

42 minutes ago, Original Skin Coins said:

I was a tech product manager, so worked with software devs but didn't have much direct coding experience (apart from SQL and HTML/CSS). I found Python pretty straightforward to pick up though, and ChatGPT helped a lot with any questions. 

Yes, this is a great use case for ChatGPT/etc!

Good luck with the job search!

 

  • Like 1
Link to comment
Share on other sites

51 minutes ago, Original Skin Coins said:

I was a tech product manager, so worked with software devs but didn't have much direct coding experience (apart from SQL and HTML/CSS). I found Python pretty straightforward to pick up though, and ChatGPT helped a lot with any questions. 

I do want to eventually display images in the results and on each coin page. I don't have permissions to use the individual coin images displayed within the ANS pages (they're not included under the open database license that covers the rest of the data), so I'll probably need to use my own images (my preference) or public-licensed images though. 

You can reach out to them and ask about the image permissions, they also have this page that discusses it. I did that when I used the images from PELLA on my website, they just had a few requirements on how to attribute them. For example, each image had to have the ANS or other institution's accession number below it with the name of the collection it was from (e.g. ANS, BM) with a link to the entry in PELLA for that coin. I also added some generic text stating that I wasn't affiliated with the ANS and used the photos under a particular copyright licence etc.

The annoying thing is having to reach out to the different institutions that host their coins in the ANS databases. I only did a handful, such as the British Museum, Berlin Muenzkabinett, and BnF. Coins from other collections I don't show images for. For the most part, they were all very accommodating and friendly and even though I went out of my way to make sure they were happy with what I was doing, they didn't seem too concerned.

  • Like 5
Link to comment
Share on other sites

7 hours ago, Kaleun96 said:

You can reach out to them and ask about the image permissions, they also have this page that discusses it. I did that when I used the images from PELLA on my website, they just had a few requirements on how to attribute them. For example, each image had to have the ANS or other institution's accession number below it with the name of the collection it was from (e.g. ANS, BM) with a link to the entry in PELLA for that coin. I also added some generic text stating that I wasn't affiliated with the ANS and used the photos under a particular copyright licence etc.

The annoying thing is having to reach out to the different institutions that host their coins in the ANS databases. I only did a handful, such as the British Museum, Berlin Muenzkabinett, and BnF. Coins from other collections I don't show images for. For the most part, they were all very accommodating and friendly and even though I went out of my way to make sure they were happy with what I was doing, they didn't seem too concerned.

Oh neat, thanks for the info! I'll reach out to them. 

Link to comment
Share on other sites

That's a very useful project you created there, @Original Skin Coins.

As for the images, as long as you are just embedding them and not hosting them on your own servers, you do not need their permission. It's basically the same as a text link to a remote site and doesn't require permission. Google does the same thing with their image search. Seeing the images directly in your search results would definitely be a big advantage.

  • Like 3
Link to comment
Share on other sites

3 hours ago, SimonW said:

As for the images, as long as you are just embedding them and not hosting them on your own servers, you do not need their permission. It's basically the same as a text link to a remote site and doesn't require permission. Google does the same thing with their image search. Seeing the images directly in your search results would definitely be a big advantage.

As an alternative, I think you could load OCRE/CRRO into an iframe (URL for OCRE for example https://numismatics.org/ocre/results?q={search term here}) and update the URL on keypress or similar. This way you avoid having to maintain your own database and avoid most of your infrastructure costs, if any.

I also like to create bookmarklets for certain sites, which allow you to insert your own JavaScript code into websites by clicking on a bookmark in your browser. This way, you could "update" OCRE/CRRO so that they automatically load results immediately when the search term changes.

Edited by SimonW
  • Like 1
Link to comment
Share on other sites

Posted (edited)
17 hours ago, SimonW said:

As an alternative, I think you could load OCRE/CRRO into an iframe (URL for OCRE for example https://numismatics.org/ocre/results?q={search term here}) and update the URL on keypress or similar. This way you avoid having to maintain your own database and avoid most of your infrastructure costs, if any.

I also like to create bookmarklets for certain sites, which allow you to insert your own JavaScript code into websites by clicking on a bookmark in your browser. This way, you could "update" OCRE/CRRO so that they automatically load results immediately when the search term changes.

Will take a look into iframes - that could certainly make things easier. I also found that CNG allows their images to be used with attribution, so I may try to figure out an easy/respectful way to pull those at scale as in many cases their photos/coins are better than the ANS examples. 

I've started messing around on my local version testing images in the search results, including some sort of mouse-over expansion effect. Larger images will display once you actually click into one of the coin detail pages.

I still need to figure out how to allow the mouse-over expanded images to break out of the search results container instead of getting partially obstructed, but here's what I have currently:

 

Edited by Original Skin Coins
  • Heart Eyes 1
  • Yes 1
Link to comment
Share on other sites

Great work! Now do that for Greek coinage!  Here are the datasets: 

Yes, I'm being glib (and a little bit selfish), but I like the simplicity of your interface. The nomisma standard, used for your online datasets 

makes many things possible. 

PS: Here's something I just stumbled upon:

Edited by Anaximander
Added new datasets.
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...