Coding
Coding
In the wake of new language models and AI's like ChatGPT-4, Google Bard and Bing I started to develop an interest in coding - particularly in Python. Coming from a humanities background - and being born a decade or two too soon to have coding as a part of the elementary school curriculum - coding has never been part of my curriculum. And even if I've wanted to learn how to code for years, I never managed to get started. However, with the aid of GPT-4 coding suddenly became accessible even to the ones of us who never learned how to write a Python script. I am still very much a novice and still have lots to learn. But it is exciting to be able to write a piece of code that actually works. Even if I didn't write 100 % of it myself.
For my PhD, I had to sample several zooarchaeological remains for ZooMS analysis. However, my main concern was to avoid sampling the same individual twice. To avoid that I wanted to develop a simple script that could take the information in a zooarchaeological dataset and automatically identify which sample IDs were likely to represent bone elements from a single individual. However, to do so, I had to develop a second script that generated a theoretical zooarchaeological dataset to use in the script.
To test mni_analyser.py I developed a script that would "simulate" a theoretical Viking Age zooarchaeological assemblage of ovicaprines, cattle and pigs. The script generates between 50 and 500 sample IDs in the relative numbers one would expect to observe on an average Danish Viking Age site (~30 % ovicaprines, ~30 % cattle and ~40 % pig). The ratios were calculated from the average prevalence of ovicaprines, cattle and pigs from 18 Danish sites dated to the Viking Age.
Notes
All of my scripts are available from GitHub and you are free to use and modify them as you see fit. They are very much still a work in progress and might not suit everyone's needs.