Classics, data

If You Want Something Done, Part 2: Getting Ovid Into a Database

Continuing this month’s “make an Ovid API” saga, this weekend I loaded my Ovid data into a database using a Django app. It was surprisingly quick and painless*, which must mean I did something right in the JSON data structure I made. See this nice bit of nested loops? That’s what I couldn’t do with the original XML schema, because it was so inconsistent.

So, yeah, using that script to populate the database, I loaded the data in pretty easily, and was soon rewarded with the Dadaesque sight of poetry in the Django admin.

I even got the basic API up and running locally:

Deploying it will surely be another weekend’s work, and I also have to make the API’s URLs and relationships work the way I want. And I’d eventually like to put the whole project up on Github, in case anyone wants their own local Ovid database; that will happen after I review how to scrub the right data in addition to deployment stuff.

*When I say “pretty painless”, this assumes you know something about Django, which is a Python web app system I grudgingly admit is the best way to deal with data. Acquiring Django knowledge if you don’t already have it is not IMHO quick or painless, but I like the Django Girls tutorial for a start, especially since it talks about deployment. I recommend Tango With Django for more in-depth exploration.