https://github.com/arup-cas/aiscr-arch14cz-backend
Backend interface for Arch14CZ - the database of archaeological radiocarbon dates of the Czech Republic
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
✓DOI references
Found 1 DOI reference(s) in README -
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.4%) to scientific vocabulary
Repository
Backend interface for Arch14CZ - the database of archaeological radiocarbon dates of the Czech Republic
Basic Info
- Host: GitHub
- Owner: ARUP-CAS
- License: gpl-3.0
- Language: C
- Default Branch: main
- Size: 6.79 MB
Statistics
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
- Releases: 3
Metadata Files
README.md
Arch14CZ - Backend
Backend interface for Arch14CZ - Czech Archaeological Radiocarbon Database
Created on 14. 12. 2021
Table of Contents 1. About Arch14CZ 1. Database Schema 2. Installation 3. Usage 1. Connecting to a Backend Database 2. Data Entry 3. Ordering Relative Datings 4. Importing Excel Data 5. Choosing a Radiocarbon Calibration Curve 6. Publishing Data 7. Restoring from Backup 4. Developer Notes 1. Preparing the Virtual Environment 2. Cloning the GitHub Project 3. Building a Windows Executable 5. Contact 6. Acknowledgements 7. License
About Arch14CZ - Backend
Backend graphical user interface for Arch14CZ - Czech Archaeological Radiocarbon Database.
Original repository of the author: https://github.com/demjanp/arch14cz_backend.
For the frontend interface see the arch14cz_frontend project.
Please cite this sofware as:
Demján, P. 2021: Arch14CZ - Backend, GitHub repository, Available at: https://github.com/ARUP-CAS/aiscr-arch14cz-backend
Database Schema
The database is be based on the Deposit graph model, comprised of Classes representing different types of data, Descriptors representing attributes of the particular records, Objects representing those unique records (data points) and Relations representing connections between these records.
Database schema: Classes (on grey background), their Descriptors (in frames) and Relations between them.

Installation
For a Windows installer see:
https://github.com/ARUP-CAS/aiscr-arch14cz-backend/releases/latest
Usage
The Arch14CZ backend interface is used to connect to the backend database, enter new data or import it from an Excel file, order relative datings and publish the data to the frontend database.
Note that after adding an entry or entries with a new relative dating, appropriate chronological relations have to be added to it before it can be published to the frontend database.
Connecting to a Backend Database
To connect to a backend database, use the command Backend → Connect and select a data source. The data source can be either a local file (Pickle and JSON formats) or a PostgreSQL database.
You can create a new Pickle or JSON database by entering its path (e.g. C:/data/data.pickle) and clicking Create.
You can create a new PostgreSQL database by entering the connection details (a blank database has to be already created on the server, for example using pgAdmin), choosing a new identifier and clicking Create.
PostgreSQL Relational is a special format to preserve maximum compatibility of Deposit, which is a graph database, with relational databases. In this format relations are stored using join tables which can cause loading and saving to take longer.
Note that when using a PostgreSQL backend, you need to specify a local folder. In this folder a backup will be stored each time you save the database if the option
Backend→Backup after every saveis enabled.
Data Entry
- Before entering new data, ensure that the Arch14CZ schema is created in the current database via the command
Backend→Create Schema. - Open the backend database using the command
Backend→Open. - Click on
C14 Formon theUser Toolstoolbar. - Fill in the form (see the Import section for details on different fields) and click
Submit.
Example of a filled entry form.

All field groups except Relative Dating and Source have a drop-down list, with the possibility to look up if an entry is already present in the database and use the Fill button to fill it in.
Ordering Relative Datings
For the frontend database to function properly, relative datings have to be ordered. This is done by creating before type relations between the relative dating entries, which indicate that one relative dating is earlier (before) another. Based on these relations, the Arch14CZ application can then calculate ordering of the dates which can be used to specify a relative dating range when querying the database.
- Open the backend database using the command
Backend→Open. - Open the
Relative DatingClass by double-clicking its name in the left navigator pane. Alternatively, you can click on theRelative Datings - Generaltool on theUser Toolstoolbar to list only general datings, without specified phases. - Click the
Graphtab on the query window. - Find an entry that is not yet linked to at least one other entry. All entries should have at least one link an earlier and one link to a later dating (as far as there is one).
- Find the closest dating which is later than the selected one and create a
beforetype relation to it as shown in the animation: - In a similar way, create a
beforerelation between the closest earlier entry and the selected entry. - Repeat until all entries are connected in a chronological sequence.

Detailed relative datings where e.g., a phase of a culture is specified, can also be linked to more general datings by a contains relation. For example the dating Linear Pottery Culture can contain the dating Linear Pottery Culture, phase IIa. A dating which only has a contains relation will be ordered in the same way as the dating by which it is contained.
The command Backend → Update Datings automatically links all general and detailed datings by a contains relation. For example Linear Pottery Culture, phase IIa would generate two linked datings Linear Pottery Culture → contains → Linear Pottery Culture, phase IIa.
Importing Excel Data
Data can be imported from an Excel (.xlsx) file via the menu Backend → Import Excel Data. For an example, see import_sample.xlsx.
The file has to contain the following columns: 1. Lab Code The laboratory code is unique for each sample and serves to identify it. It also carries information about the laboratory that measured the sample. 2. C-14 Activity BP: C-14 measurement in radiocarbon (uncalibrated) years BP 3. C-14 Uncertainty 1 Sigma: 1-sigma uncertainty of the measurement 4. C-14 Method: AMS or conventional 5. Delta C-13: Delta C-13 measurement 6. C-14 Analysis Note 7. Country 8. Cadastre 9. Cadastre Code: Code of the cadastre (see https://www.czso.cz/csu/rso/katastralniuzemirso). 10. District 11. Site Name Unique name of the site where the sample was collected. 12. Site Coordinates: WGS 84 standard, format XX.XXXXXXXN, XX.XXXXXXXE 13. Site Note 14. Fieldwork Event ID Identifier of a Fieldwork Event in the Archaeological Map of the Czech Republic associated with the Site 15. Activity Area: Type of the archaeological activity area according to the AMCR dictionary. Validated against activity_area.csv. 16. Feature: Type of the archaeological feature according to the AMCR dictionary. Validated against feature.csv. 17. Context Description Description of the position of the sample within the feature. 18. Context Depth cm: Depth at which the sample was retrieved. 19. Context Name: Unique identifier of the context within the site (e.g., Feature 123). 20. Relative Dating Name 1: Relative dating of the context, as detailed as possible in the format "[General Dating], [phase]" (e.g., Lengyel Culture, phase I). The general dating is validated against relative_dating.csv. 21. Relative Dating Name 2: Additional relative dating. 22. Sample Number: ID assigned by the submitter of the dated sample. 23. Sample Note Includes collagen values and other accompanying measurements. 24. Material Name General type of the material of the sample (e.g., animal bone, charcoal). Validated against material.csv. 25. Material Note Detailed description of the material (e.g. sus scrofa, triticum monococcum) 26. Reliability: Reliability of the C-14 dating in respect to the archaeological context. Possible values:
no problems declared
in contradiction with archaeological chronology/sequence
no archaeological finds associated
context disturbation
other problems
sample contamination
27. Reliability Note
28. Source Description:
Citation of the source.
29. Source Reference:
Reference to page or figure.
30. Source URI:
DOI or aleph link (where applicable).
31. Source Acquisition:
Original source of the data (Arch14CZ, C14.sk or other database)
32. Submitter Name
In the format [First name] [Last Name]
33. Submitter Organization
34. Public:
1 or 0, indicates whether the date can be published (if set to 0, the values of C-14 activity and uncertainty will be set to -1 when publishing to the frontend database)
Choosing a Radiocarbon Calibration Curve
The software is supplied with the IntCal20 calibration curve by Reimer et al. [^1].
You can download the latest calibration curves from the IntCal website.
To load the calibration curve:
1. In the Arch14CZ program, open the menu Settings and click on Calibration Curve.
2. Select the file containing the calibration curve data.
[^1]: Reimer, P., Austin, W., Bard, E., Bayliss, A., Blackwell, P., Bronk Ramsey, C., Butzin, M., Cheng, H., Edwards, R., Friedrich, M., Grootes, P., Guilderson, T., Hajdas, I., Heaton, T., Hogg, A., Hughen, K., Kromer, B., Manning, S., Muscheler, R., Palmer, J., Pearson, C., van der Plicht, J., Reimer, R., Richards, D., Scott, E., Southon, J., Turney, C., Wacker, L., Adolphi, F., Büntgen, U., Capano, M., Fahrni, S., Fogtmann-Schulz, A., Friedrich, R., Köhler, P., Kudsk, S., Miyake, F., Olsen, J., Reinig, F., Sakamoto, M., Sookdeo, A. and Talamo, S. (2020) The IntCal20 Northern Hemisphere radiocarbon age calibration curve (0–55 cal kBP). Radiocarbon, 62(4), pp.725-757. doi:10.1017/RDC.2020.41
Publishing Data
To publish data to the frontend database, follow these steps:
1. Connect to the frontend database using the command Frontend → Connect.
2. Enter the connection details (a PosgreSQL database must already exist on the server).
3. Publish the database using the command Frontend → Publish.
This will automatically calculate the order of relative datings and 95% ranges of calibrated dates for each C-14 date. The data will be then uploaded to the frontend database.
Restoring from Backup
If the option Backend → Backup after every save is enabled, a backup copy of the database is stored before each save. You can return to a previous version of the database simply by loading one of the backups in the Arch14CZ - backend application.
Backups can be found in the subdirectory _backup of the local folder, which can be accessed by clicking the link next to Local Folder on the main interface.
To save a database restored from a file format in PostgreSQL format, open the Deposit inteface via the menu Backend → Open and save it via the menu Data → Save As PostgreSQL.
Developer Notes
Preparing the Virtual Environment
Arch14CZ - Backend requires Python 3 and a Windows environment. To prepare a Python virtual environment for development:
- Open a terminal or command prompt window.
- Navigate to the Arch14CZ - Backend root directory:
cd [path to local Arch14CZ - Backend dir] - Create the virtual environment:
python -m venv [VE dir name e.g. '.venv'] - Install and update required libraries:
python -m pip install --upgrade pip python -m pip install --upgrade build - Activate the virtual environment:
.venv\Scripts\activate.bat - To exit the virtual environment:
deactivate
Cloning the GitHub Project
To clone the aiscr-arch14cz-backend GitHub project, follow these steps:
- Make sure you have Git installed on your computer.
- Open a terminal or command prompt window.
- Navigate to the Arch14CZ - Backend root directory.
- Run the following command:
git clone https://github.com/ARUP-CAS/aiscr-arch14cz-backend.git - The repository will be cloned to a new directory named
aiscr-arch14cz-backendin your current directory. - Change into the newly created directory:
cd aiscr-arch14cz-backend - To install dependencies run the following command:
pip install -e . - To start the GUI run the following commands:
cd bin python start_arch14cz.py
Building a Windows Executable
- Make sure you have InstallForge installed on your computer.
- Update absolute paths in
installer\arch14cz_installer.tplin the following sections:[Graphics] Wizard image Header image [Build] File SetupIconPath UninstallIconPath - Update virtual environment path in
installer\arch14cz.specin the partpathex=['..\\venv\\Lib\\site-packages'],. - Activate the virtual environment.
- Execute the following command once per virtual environment:
pip install pyinstaller==5.6.2 - Deactivate the virtual environment.
- Run
build.bat. - Run InstallForge and open the file
installer\arch14cz_installer.ifp. - Use the Build command in InstallForge to build the installer.
Contact:
Peter Demján (peter.demjan@gmail.com)
Institute of Archaeology of the Czech Academy of Sciences, Prague, v.v.i.
Acknowledgements
Development of this software was supported by OP RDE, MEYS, under the project "Ultra-trace isotope research in social and environmental studies using accelerator mass spectrometry", Reg. No. CZ.02.1.01/0.0/0.0/16_019/0000728.
This software uses the following open source packages: * Deposit * Deposit GUI * NetworkX * NumPy * openpyxl * Psycopg * PySide2 * Qt * SciPy
License
This code is licensed under the GNU GENERAL PUBLIC LICENSE - see the LICENSE file for details
Owner
- Name: Institute of Archaeology CAS, Prague
- Login: ARUP-CAS
- Kind: organization
- Email: amcr@arup.cas.cz
- Location: Prague, Czech Republic
- Website: http://www.arup.cas.cz/
- Repositories: 14
- Profile: https://github.com/ARUP-CAS