Analysis of Prehistoric Iconography with the R package iconr

Analysis of Prehistoric Iconography with the R package iconr - Published in JOSS (2021)

https://github.com/zoometh/iconr

Science Score: 95.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
    Found .zenodo.json file
  • DOI references
    Found 10 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org, zenodo.org
  • Committers with academic emails
    1 of 4 committers (25.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

archaeology gmm graph-theory iconography network-analysis prehistoric-archaeology rpackage rproject shape-analysis

Scientific Fields

Engineering Computer Science - 60% confidence
Earth and Environmental Sciences Physical Sciences - 40% confidence
Last synced: 6 months ago · JSON representation

Repository

Formal methods to study Prehistory iconography

Basic Info
  • Host: GitHub
  • Owner: zoometh
  • License: gpl-3.0
  • Language: R
  • Default Branch: master
  • Homepage:
  • Size: 277 MB
Statistics
  • Stars: 12
  • Watchers: 2
  • Forks: 5
  • Open Issues: 1
  • Releases: 1
Topics
archaeology gmm graph-theory iconography network-analysis prehistoric-archaeology rpackage rproject shape-analysis
Created over 5 years ago · Last pushed over 2 years ago
Metadata Files
Readme Changelog Contributing License Code of conduct

README.md

CRAN status status DOI R-CMD-check Build Status

iconr R package
modeling Prehistoric iconography

Created by Thomas Huet, Jose M Pozo, Craig Alexander

The iconr R package purpose is to contribute to cross-cultural comparison of iconography through a greater normalization of quantitative analysis. The package stable version deals with composition analysis[^1], the package development version deals with both composition and geometric morphometric.


The R package iconr is grounded in graph theory, spatial analysis (composition analysis), and shape analysis (geometric morphometric) to offer concepts, measurments and functions for modeling Prehistoric iconography and preparing for further analysis (clustering, typology tree, Harris diagram, etc.). The theoretical background is as follows:
* Some objects (eg, pottery, rock panels) have a decoration; * A decoration is composed of graphical units (GUs); * GUs can be modeled as POINTS or drawn as LINES or POLYGONS (2D); * Shape analysis can measures the similarities between two GUs (eg. Procrustes distance); * GUs are considered as nodes; * Nodes have neighbourhood relations one with another depending on their spatial proximities; * A decoration is considered as a spatial graph, modeled with graph theory and analysed with network and spatial analysis;

Spatial, network and shape indices can be calculated for every nodes and every decoration (i.e. graph). Each decoration can be compared to another decoration on the basis of local or global indices (e.g. degree and degree distribution) and on the basis of their shape indices;

As favored GIS entry, GIS indices (x and y dimensions) can also be used.


See how to contribute to the next package release; how to report an issue using the issue template.

Stable version: the Analysis of Compositions

The iconr v. 0.1.0 stable version can be installed from the CRAN. It allows GUs composition analysis)

install.packages("iconr")

The v. 0.1.0 allows the analysis of compositions

![](doc/img/solana_voronoi.png)

Photograph of Solana de Cabaas (Extremadura, Spain) Late Bronze Age stele[^2] [1]. Graphical units (GUs) drawing [2]. Each GU is recorded with a vertex (POINT) [3], and each contiguous vertex (Voronoi cell) is linked with an edge [4, 5].

See the package vignette

Overview of the functions for the analysis of compositions

The iconr v. 0.1.0 functions' descriptions and examples are available on this website.

Description

The package as a sample of 5 decorations[^3]:

idf site decor img
1 Cerro Muriano Cerro Muriano 1 Cerro_Muriano.Cerro_Muriano_1.jpg
2 Torrejon Rubio Torrejon Rubio 1 Torrejon_Rubio.Torrejon_Rubio_1.jpg
3 Brozas Brozas Brozas.Brozas.jpg
4 Zarza de Montanchez Zarza De Montanchez Zarza_de_Montanchez.Zarza_De_Montanchez.jpg
5 Ibahernando Ibahernando Ibahernando.Ibahernando.jpg
1 2 3 4 5
Cerro Muriano, stele 1 Torrejon Rubio, stele 1 Brozas stele Zarza de Montanchez, stele Ibahernando stele

Plot

Set data folder, select the decoration to be plotted, read files of nodes, edges, and images and plot a decoration

dataDir <- system.file("extdata", package = "iconr") site <- "Brozas" ; decor <- "Brozas" nds.df <- read_nds(site, decor, dataDir) eds.df <- read_eds(site, decor, dataDir) imgs <- read.table(paste0(dataDir, "/imgs.tsv"), sep="\t", stringsAsFactors = FALSE) plot_dec_grph(nds.df, eds.df, imgs, site, decor, dir = dataDir, lbl.size = 0.4, nd.var = "type")

Comparisons

Common edges between pairs of decorations allow to measure the similarities in their composition. Common edges are more accurate than common nodes (see also, nds_compar() and eds_compar()) For example, we plot common edges shared by the three first decorations of the training dataset with the plot_compar() function

imgs <- read.table(system.file("extdata", "imgs.tsv", package = "iconr"), sep="\t", stringsAsFactors = FALSE) nodes <- read.table(system.file("extdata", "nodes.tsv", package = "iconr"), sep="\t", stringsAsFactors = FALSE) edges <- read.table(system.file("extdata", "edges.tsv", package = "iconr"), sep="\t", stringsAsFactors = FALSE) lgrph <- list_dec(imgs, nodes, edges) g.compar <- list_compar(lgrph, nd.var="type") plot_compar(g.compar, c(1, 2, 3), focus = "edges", nd.size = c(0.5, 1.5), ed.width = c(1, 2.5), dir = dataDir, img.format = "png")

The same result, but in the form of a coincidence matrix, can be obtained with the function same_elements()

Comparisons between sets can be based on common edges, which take into account the common combination of two nodes with their edge type, and common nodes, which take into account only the presence of common nodes

In this example, in both groupings, the Brozas stela (decoration 3) and the Ibahernando stela (decoration 5) have the highest proximities (i.e. the lowest Euclidean distance)

Citation

Use the canonical form to cite the package in R (citation("iconr")): @Manual{Huet21pckg, title = {iconr: Graphical and Spatial Analysis for Prehistoric Iconography}, author = {Thomas Huet and Jose Pozo}, year = {2021}, note = {R package version 0.1.0}, url = {https://CRAN.R-project.org/package=iconr}, }

The iconr v. 0.1.0 package has also been published in the Journal of Open Source Software under this BibTex reference:

@article{Huet21joss, doi = {10.21105/joss.03191}, url = {https://doi.org/10.21105/joss.03191}, year = {2021}, publisher = {The Open Journal}, volume = {6}, number = {61}, pages = {3191}, author = {Thomas Huet and Jose M. Pozo and Craig Alexander}, title = {Analysis of Prehistoric Iconography with the R package iconr}, journal = {Journal of Open Source Software} }

Development version: the Analysis of Compositions and Geometric Morphometry

The iconr latest version, or development version v. 0.1.1, deals with both GUs composition and GUs shapes (geometric morphometric). Currently it takes in charge POLYGON geometries to perform Geometric Morphometry measurements (GMM). This development version can be downloaded from GitHub

devtools::install_github("zoometh/iconr")

Geometric Morphometry measurements' functions overview

The iconr v. 0.1.1 functions are named morph_* (morphology) and conv_* (conversions). Find their documentation directly on R (eg, ?morph_nds_compar). They are performed with the R package Momocs

mermaid flowchart LR T[User entry]:::iconRusr ---> A[(Postgres<br>DB)]; T ---> Q[[GIS]]; T ---> R((Geo<br>JSON)); A ---> B{{"conv_pg_to_shp()"}}:::iconRpkg; B ---> C((SHP)); Q ---> C; R ---> S{{"conv_geojson_to_wkt()"}}:::iconRpkg; S ---> E((WKT)); C ---> D{{"conv_shp_to_wkt()"}}:::iconRpkg; D ---> E; E ---> F{{"conv_wkt_to_jpg()"}}:::iconRpkg; F ---> G((JPG)); G ---> J{{"morph_nds_compar()"}}:::iconRpkg; J ---> K[elemental<br>comparison]; J ---> U[User threshold]:::iconRusr; U ---> H{{"morph_nds_group()"}}:::iconRpkg; H ---> I[elemental<br>classification]; E ---> L{{"morph_resume()"}}:::iconRpkg; L ---> P[dataset<br>description]; I ---> M[[elemental<br>distance<br>matrix]]; I ---> V[[elemental<br>distance<br>matrix]]; I ---> W[[...<br>...<br>...]]; M ---> N{{"morph_aggregate()"}}:::iconRpkg; V ---> N; W ---> N; N ---> O[decor<br>classification]; classDef iconRpkg fill:#add8e6; classDef iconRusr fill:#ffa500;

Compare GUs' shapes

The sample dataset is composed on 5 decorated objects, belonging from 4 sites of the Near-East Pre-Pottery Neolithic:

Ain Ghazal, statue 2, cache 2 Ain Ghazal, statue 5, cache 2 Jericho, statue A, cache 195 Kfar Hahoresh, modelled skull Qarassa, bone wand

The graphical units 'faces' ('visages'), 'eyes' ('oeils'), and 'mouths' ('bouches') are drawn in a GIS

img-name

Resume the GUs geometries

After downloading the PPNB dataset, set 'PPN' as the current working directory (setwd("*my_path*/PPN"")), read and convert the 'nodes.csv' Well-Known Text geometries to JPG, and resume information

nodes <- read.csv2("*my_path*/PPN/_out/nodes.csv") conv_wkt_to_jpg(nodes = nodes) morph_resume(dataDir = "*my_path*/PPN", nodes = nodes)

Compare the different types of GUs

Stack the countours of 'faces' ('visages'), 'eyes' ('oeils'), and 'mouths' ('bouches')

conv_wkt_to_jpg(nodes = nodes) nodes <- read.csv2("*my_path*/PPN/_out/nodes.csv") conv_wkt_to_jpg(nodes = nodes) morph_resume(dataDir = "*my_path*/PPN", nodes = nodes)

img-name
img-name
img-name

Typology of GUs

iconr uses a hierarchical thesaurus (a tree-like structure) for GUs' typology. See for example the whole typological tree:

[![](doc/img/typology_gu.png)](https://zoometh.github.io/iconr/articles/img/typo_gu_ug.html)

Or these different subtrees: geometric, figurative, zoomorphic, technomorphic, or anthropomorphic. Such a structure is known as a with controlled vocabulary with an identity between GU name and value must be unique (URL), such a structure should also be used for other fields than the GU type (eg, 'technique'). Multi-linguism equivalences -- starting with English --, metadata insertion (IPTC) and standardization of the vocabulary (Dublin Core, CIDOC-CRM) is needed.

Superimpositions

The diachronic edge ->- allows to register the superimposition. The next iconr will integrate an on-the-fly function allowing to create Harris matrices of GUs when such an edge exists. For example here, the Ibahernando stele shows a Latin writing overlaping a spear and a shield representations

img-name

Magic wand

The selection of a colored continuous range can be done from a POINT coordinates (x, y) overlapping this colored range (ie. a GU displayed in black on white background). The next iconr will integrate a function allowing to extract automatically the shape behind the POINTS

img-name

Other documents

  • Analysis of Prehistoric Iconography with the R package iconr, Digital Archaeology seminar, 28th November 2022, University of Durham
  • Human face depictions of Early Neolithic in the Near East EAA 2021,session 238, 11th September 2021, Kiel

[^1]: Huet et al., (2021). Analysis of Prehistoric Iconography with the R package iconr. Journal of Open Source Software, 6(61), 3191, https://doi.org/10.21105/joss.03191 [^2]: credits Museo Arqueologico de Madrid [^3]: unless otherwise stated, the drawings of the steles are all from: Daz-Guardamino Uribe, M. (2010). Las estelas decoradas en la prehistoria de la pennsula ibrica [PhD thesis, Universidad Complutense de Madrid, Servicio de Publicaciones]. https://eprints.ucm.es/11070/1/T32200.pdf

Owner

  • Name: Thomas Huet
  • Login: zoometh
  • Kind: user
  • Location: 2 South Parks Road, Oxford OX1 3TG
  • Company: University of Oxford

Prehistory and Computational Archaeology

JOSS Publication

Analysis of Prehistoric Iconography with the R package iconr
Published
May 17, 2021
Volume 6, Issue 61, Page 3191
Authors
Thomas Huet ORCID
LabEx ARCHIMEDE, ANR-11-LABX-0032-01
Jose M. Pozo ORCID
Independent Researcher
Craig Alexander ORCID
Independent Researcher
Editor
Hugo Ledoux ORCID
Tags
Iconography Semiotic Prehistory Archaeology Graph Theory GIS

GitHub Events

Total
  • Watch event: 1
Last Year
  • Watch event: 1

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 1,142
  • Total Committers: 4
  • Avg Commits per committer: 285.5
  • Development Distribution Score (DDS): 0.13
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
zoometh 6****h 994
josempozo 7****o 143
Archaeocam 7****m 4
Hugo Ledoux h****x@t****l 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 2
  • Total pull requests: 74
  • Average time to close issues: 1 day
  • Average time to close pull requests: about 19 hours
  • Total issue authors: 2
  • Total pull request authors: 4
  • Average comments per issue: 4.0
  • Average comments per pull request: 1.19
  • Merged pull requests: 69
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • rsbivand (1)
  • benmarwick (1)
Pull Request Authors
  • josempozo (64)
  • Archaeocam (4)
  • zoometh (4)
  • hugoledoux (2)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 159 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 1
  • Total maintainers: 1
cran.r-project.org: iconr

Graphical and Spatial Analysis for Prehistoric Iconography

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 159 Last month
Rankings
Forks count: 11.3%
Stargazers count: 17.0%
Dependent packages count: 29.8%
Average: 33.1%
Dependent repos count: 35.5%
Downloads: 71.8%
Maintainers (1)
Last synced: 6 months ago

Dependencies

DESCRIPTION cran
  • DBI * imports
  • MASS * imports
  • Momocs * imports
  • RColorBrewer * imports
  • RPostgreSQL * imports
  • RPostgres * imports
  • dplyr * imports
  • ggplot2 * imports
  • ggrepel * imports
  • grDevices * imports
  • graphics * imports
  • gridExtra * imports
  • igraph * imports
  • magick * imports
  • rgdal * imports
  • sf * imports
  • stringr * imports
  • tibble * imports
  • utils * imports
  • data.tree * suggests
  • dendextend * suggests
  • kableExtra * suggests
  • knitr * suggests
  • rmarkdown * suggests
.github/workflows/R-CMD-check.yaml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • actions/upload-artifact main composite
  • r-lib/actions/setup-pandoc v1 composite
  • r-lib/actions/setup-r v1 composite