This notebook explores all the milestones in the Epigraphic Database Heidelberg (https://edh-www.adw.uni-heidelberg.de/, henceforth EDH). The primary aim is to:
The script takes the reader through all the steps of selection, descriptive statistics and through the various displays on the interactive map. Address all the questions and comments to petra.hermankova@cas.au.dk
.
devtools::install_github("sdam-au/sdam") # loading SDAM custom package, if not working try devtools::install_github("mplex/cedhar", subdir="pkg/sdam")
## Error in get(genname, envir = envir) : object 'testthat_print' not found
#devtools::install_github("mplex/cedhar", subdir="pkg/sdam")
library(tidyverse)
library(sdam)
library(jsonlite)
library(getPass)
library(formatR)
library(leaflet)
Load the dataset, if you have Sciencedata.dk credentials
resp = request("EDH_text_cleaned_2021-01-21.json", path="/sharingin/648597@au.dk/SDAM_root/SDAM_data/EDH/public", method="GET", cred=mycred_secret)
OR of you don’t have Sciencedata credentials:
resp = request("EDH_text_cleaned_2021-01-21.json", path="public/b6b6afdb969d378b70929e86e58ad975/", method="GET", anonymous = TRUE, cred = NULL)
Make a list and tibble from the downloaded dataset
list_json <- jsonlite::fromJSON(resp)
EDH_tibble = as_tibble(list_json)
Display the first six records of the dataset
head(EDH_tibble)
What attributes (columns) might contain milestone related information? Let’s display all the the attribute names.
EDH_tibble %>%
names()
## [1] "responsible_individual" "type_of_inscription"
## [3] "letter_size" "not_after"
## [5] "literature" "work_status"
## [7] "height" "diplomatic_text"
## [9] "people" "depth"
## [11] "material" "type_of_monument"
## [13] "province_label" "width"
## [15] "transcription" "country"
## [17] "uri" "findspot_ancient"
## [19] "last_update" "modern_region"
## [21] "findspot_modern" "language"
## [23] "id" "edh_geography_uri"
## [25] "commentary" "trismegistos_uri"
## [27] "not_before" "external_image_uris"
## [29] "fotos" "coordinates"
## [31] "idno_tm" "placenames_refs"
## [33] "text_edition" "origdate_text"
## [35] "layout_execution" "layout_execution_text"
## [37] "support_objecttype" "support_objecttype_text"
## [39] "support_material" "support_material_text"
## [41] "support_decoration" "keywords_term"
## [43] "keywords_term_text" "type_of_inscription_clean"
## [45] "type_of_inscription_certainty" "height_cm"
## [47] "width_cm" "depth_cm"
## [49] "material_clean" "type_of_monument_clean"
## [51] "type_of_monument_certainty" "province_label_clean"
## [53] "province_label_certainty" "country_clean"
## [55] "country_certainty" "findspot_ancient_clean"
## [57] "findspot_ancient_certainty" "modern_region_clean"
## [59] "modern_region_certainty" "findspot_modern_clean"
## [61] "findspot_modern_certainty" "findspot_clean"
## [63] "findspot_certainty" "origdate_text_clean"
## [65] "clean_text_conservative" "clean_text_interpretive_word"
## [67] "clean_text_interpretive_sentence" "findspot"
## [69] "year_of_find" "present_location"
## [71] "religion" "geography"
## [73] "social_economic_legal_history" "military"
Based on the domain expertise and previous explorations of the dataset, any milestone related information is most likely contained in the following attributes: type_of_inscription_clean
, type_of_monument_clean
, commentary
,support_objecttype
, support_objecttype_text
, keywords_term
and keywords_term_text
.
unique(EDH_tibble$type_of_inscription_clean)
## [1] "epitaph" "honorific inscription"
## [3] "votive inscription" "defixio"
## [5] "owner/artist inscription" "mile-/leaguestone"
## [7] "acclamation" "boundary inscription"
## [9] "building/dedicatory inscription" "NULL"
## [11] "military diploma" "identification inscription"
## [13] "public legal inscription" "private legal inscription"
## [15] "label" "list"
## [17] "calendar" "seat inscription"
## [19] "elogium" "assignation inscription"
## [21] "prayer" "letter"
## [23] "adnuntiatio"
EDH_tibble %>%
count(type_of_inscription_clean, sort=T)
milestone_insc <- EDH_tibble %>%
filter(type_of_inscription_clean == "mile-/leaguestone")
nrow(milestone_insc)
## [1] 1730
How many of them are certain vs uncertain?
milestone_insc %>%
count(type_of_inscription_certainty, sort=T)
What is their type of monument?
milestone_insc %>%
count(type_of_monument_clean, sort=T)
What is their material?
milestone_insc %>%
count(material_clean, sort=T)
unique(EDH_tibble$type_of_monument_clean)
## [1] "tabula" "statue base"
## [3] "altar" "stele"
## [5] "tessera" "urn"
## [7] "block" "bar"
## [9] "mile-/leaguestone" "NULL"
## [11] "herm" "instrumentum domesticum"
## [13] "tile" "jewellery"
## [15] "cippus" "instrumentum militare"
## [17] "paving stone" "sarcophagus"
## [19] "base" "architectural member"
## [21] "cupa" "statue"
## [23] "slab" "instrumentum sacrum"
## [25] "grave monument" "sculpture"
## [27] "cliff" "relief"
## [29] "diptych" "bust"
## [31] "honorific/grave/votive column" "table"
## [33] "bench" "fountain"
## [35] "honorific/votive arch" "weapon"
## [37] "shield" "olla"
## [39] "fortification"
milestone_monument <- EDH_tibble %>%
filter(EDH_tibble$type_of_monument_clean == "mile-/leaguestone")
nrow(milestone_monument)
## [1] 1735
How many of them are certain vs uncertain?
milestone_monument %>%
count(type_of_monument_certainty, sort=T)
What is their type of inscription?
milestone_monument %>%
count(type_of_inscription_clean, sort=T)
What is their material?
milestone_monument %>%
count(material_clean, sort=T)
commentary
attributeFree text commentary also contains infromation about milestones, however it is not structired in any way. Inspect the commentary for milestone related comments. Note: commentary is mostly written in German.
head(milestone_comment$commentary)
## [1] " Meilenstein der via 19 des Itinerarium Antonini. Originalpublikation: Kaiser zwischen Tiberius und Vespasian. (B): Z.1 nicht gelesen."
## [2] " (A): ILER: Herkunft irrtümlich Caldas de Montbuy. (B): CIL, ILER: Z.2: AVG PA; Z.4 u. 5 noch vorhanden. Y: Meilenstein am ehesten Carus zuzuordnen, vielleicht auch Carinus oder Probus."
## [3] " Wiederverwendung des Meilensteins, ursprünglich vielleicht von Maximinus Thrax, da MAXIM auf der Rückseite lesbar. Z. 3 (Ende) u. Z. 6 (Ende): SEM bzw. NATO auf dem Foto nicht erkennbar. (B): Corradi Cervi: Z. 2: [vic]tori; AE 1983: Z. 2: victori; Giorgi: Z. 3: [triu]mfatori; Corradi Cervi: Z. 3: [triu]mphatori; Giorgi: Z. 4: [Aug]usto; Z. 5: [terrarum]; Corradi Cervi, AE 1983: Z. 5: [terr]arum; Giorgi: Z. 6: [n]ato."
## [4] " Y: Aufstellung des Meilensteins kurz vor dem Zug gegen die Goten wegen Fehlens von Gothicus Maximus. (A): Material: Marmor statt Kalkstein. Stein zum Fundort verschleppt."
## [5] " Teilweise Rasur eines früheren Textes auf diesem Meilenstein; die erhaltenen Reste ergeben keinen Sinn."
## [6] " 1. Meilenstein im Südosten von Lucania."
milestone_comment %>%
count(type_of_inscription_clean, sort=T)
milestone_comment %>%
count(type_of_monument_clean, sort=T)
support_objecttype
attributeThe attribute support_object_type
represents code for the Eagle Europeana standard vocabulary (https://www.eagle-network.eu/voc/objtyp/lod/89.html), where the Milestone has a LOD code 89.
How many there are?
milestone_lod_object<- EDH_tibble %>%
filter(support_objecttype =="89")
nrow(milestone_lod_object)
## [1] 1730
support_objecttype_text
attributeChecking the consistency of support_objecttype
and support_objecttype_text
attributes to see if the attributes refer to the same type.
EDH_tibble %>%
select(support_objecttype, support_objecttype_text) %>%
dplyr::filter(str_detect(support_objecttype_text, "[M|m]eilen")) %>%
count(support_objecttype_text)
The results are consistent and the free text corresponds with the LOD.
keywords_term
attributeThe attribute keywords_term
represents code for the Eagle Europeana standard vocabulary (https://www.eagle-network.eu/voc/typeins/lod/102.html), where the Milestone has a LOD code 102.
How many there are?
milestone_lod_insctype<- EDH_tibble %>%
filter(keywords_term =="102")
nrow(milestone_lod_insctype)
## [1] 1725
support_objecttype_text
attributeChecking the consistency of keywords_term
and keywords_term_text
attributes to see if the attributes refer to the same type.
EDH_tibble %>%
select(keywords_term, keywords_term_text) %>%
dplyr::filter(str_detect(keywords_term_text, "[M|m]eilen")) %>%
count(keywords_term_text)
The results are consistent and the free text corresponds with the LOD.
nrow(milestone_all)
## [1] 1770
nrow(milestone_all)/(nrow(EDH_tibble)/100)
## [1] 2.172419
What different types of inscriptions belong to the discussed group of milestones?
milestone_all %>%
count(type_of_inscription_clean, sort = TRUE)
How certain the information is?
milestone_all %>%
count(type_of_inscription_clean, type_of_inscription_certainty, sort = TRUE)
What different types of monuments belong to the discussed group of milestones?
milestone_all %>%
count(milestone_all$type_of_monument_clean, sort = TRUE)
How certain the information is?
milestone_all %>%
count(type_of_monument_clean, type_of_monument_certainty, sort = TRUE)
What language were written the inscriptions belonging to the discussed group of milestones?
unnest_auto(milestone_all, language) %>%
count(language, sort=TRUE)
## Using `unnest_longer(language)`; no element has names
What different types of material is represented in the discussed group of milestones?
milestone_all %>%
count(material_clean, sort=TRUE)
What are the dimensions of the discussed group of milestones?
milestone_dims <- milestone_all %>%
dplyr::select(height_cm, width_cm, depth_cm)
milestone_dims <- as.data.frame(milestone_dims)
milestone_dims
An overview statistics for all Heights.
summary(milestone_dims$height_cm)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 5.7 72.0 119.5 124.3 170.0 330.0 454
An overview statistics for all Widths.
summary(milestone_dims$width_cm)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 6.00 35.00 43.00 45.11 50.00 279.00 523
An overview statistics for all Depths.
summary(milestone_dims$depth_cm)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 0.10 17.73 25.00 26.25 35.00 63.00 1622
library(tidytext)
milestone_all_text<- milestone_all %>%
unnest_tokens(word, clean_text_interpretive_word)
nrow(milestone_all_text)
## [1] 40816
milestone_all_text %>%
count(word, sort=T)
milestone_all_bigram<- milestone_all %>%
unnest_tokens(output = bigram, input = clean_text_interpretive_word, drop = FALSE, token = "ngrams", n = 2, collapse = FALSE)
milestone_all_bigram %>%
count(bigram, sort=T)
milestone_all_trigram<- milestone_all %>%
unnest_tokens(output = bigram, input = clean_text_interpretive_word, drop = FALSE, token = "ngrams", n = 3, collapse = FALSE, to_lower = FALSE)
milestone_all_trigram %>%
count(bigram, sort=T)
library(googlesheets4)
gs4_deauth() # de-uthorized mode, no need of authentication token (if the spreadsheet is public)
numerals<- read_sheet("https://docs.google.com/spreadsheets/d/1RKRNMlSjB3yF3FHXPLhGfnLJis63300R9x65BdAKa8o/edit?usp=sharing", sheet = "Numerals")
## Reading from "Numerals_translations"
## Range "'Numerals'"
numerals
Latin numerals on milestones:
milestone_all_text %>%
filter(word %in% numerals$Latin_num) %>%
count(word, sort = T)
Greek numerals on milestones:
milestone_all_text %>%
filter(word %in% numerals$Greek_num) %>%
count(word, sort = T)
distances<- as.data.frame(str_extract(milestone_all$clean_text_interpretive_word, "(?<=milia passuum ).+"))
distances <- distances %>%
rename(extracted = `str_extract(milestone_all$clean_text_interpretive_word, "(?<=milia passuum ).+")`)
unique(distances$extracted)
## [1] "XX"
## [2] NA
## [3] "LXVII"
## [4] "XXIII"
## [5] "XXII"
## [6] "XLIII"
## [7] "XXXXVIII"
## [8] "IIII"
## [9] "III"
## [10] "LXIIX"
## [11] "LXX"
## [12] "XXXIIX"
## [13] "VI Herennio Etrusco Messio nobilissimo Caesare"
## [14] "XXI"
## [15] "VIII ddominis nnostris Imperatori Constantino maximo et Valerio Liciniano Licinio semper Auggustis et Flavio Iulio Crispo et Valerio Liciniano Licinio iuniori et Flavio Claudio Constantino nobbilissimis Caessaribus milia passuum VIII"
## [16] "XXIIII"
## [17] "VIIII"
## [18] "XVII"
## [19] "II"
## [20] "κςʹ"
## [21] "VI"
## [22] "Impperatores Caessares Caius Aurelius Diocletianus et Marcus Aurelius Maximianus invicti Auggusti et Marcus Flavius Valerius Constantius et Caius Galerius Valerius Maximianus"
## [23] "IV"
## [24] "CCXXV"
## [25] "VII s coniugi NO E P TP E"
## [26] "L"
## [27] "LXXVIIII"
## [28] "I"
## [29] "XXII Imperatori Caesari Marco Annio Floriano Pio Felici Invicto Augusto pontifici maximo tribunicia potestate patri patriae proconsuli ab Aquinco milia passuum XXII"
## [30] "XXXVIIII"
## [31] "XLVIII"
## [32] "LI"
## [33] "XLIIII"
## [34] "Dddominis nnnostris Valenti et Gratiano et Valentiniano PPPiis FFFelicibus"
## [35] "XXXIII"
## [36] "LVII"
## [37] "XCIII"
## [38] "LXV Tiberius Caesar divi Augusti filius Divi Augustus pontifex maxumus consul VI imperator VIII tribunicia potestate XXXIIII milia passuum LXV"
## [39] "VIII"
## [40] "XIII"
## [41] "XLV"
## [42] "XI"
## [43] "Imperator Caesar Marcus Aurelius Antoninus"
## [44] "XIIII"
## [45] "XVIII"
## [46] "XXVI"
## [47] "XXXVI felicissimo principi"
## [48] "IIII Imperator Caesar Flavius Valerius Constantinus Pius Felix Invictus Augustus Augustus VIIII καὶ Κλαύδιος Κρίσπος καὶ Λικινιανὸς Κλαύδιος Λικίνιος καὶ Κλαύδιος Κωνσταντεῖνος οἱ ἐπιφφανέστατοι Καίσαρες θʹ Αὐτοκράτορσι Καίσαρσιν Φλαβίῳ Οὐαλερίῳ Κωνσταντίῳ καὶ Γαλερίῳ Οὐαλερίῳ Μαξιμιανῷ Σεβαστοῖς καὶ Φλαβίῳ Οὐαλερίῳ Σεβήρῳ καὶ Γαλερίῳ Οὐαλερίῳ Μαξιμίνῳ ἐπιφανεστάτοις Καίσαρσιν ἡ Θεσσαλονικέων πόλις Θ"
## [49] "CCCLXI"
## [50] "X"
## [51] "XLIV"
## [52] "III γ'"
## [53] "XXX Λ"
## [54] "XXVIIII"
## [55] "ζ"
## [56] "CXCIcentum nonaginta unum miliaDCCXXXXseptingentos quadraginta stravit Publio Metilio Secundo legato Augusti pro praetore consule designato per legionem III Augustam"
## [57] "LVIIII"
## [58] "XXX"
## [59] "XXXIIII"
## [60] "XLII"
## [61] "XX curante Quinto Munatio Celso viro egregio procuratore Augusti nostri"
## [62] "XXVIII Sigam milia passuum XXXVII"
## [63] "CL"
## [64] "XXXI"
## [65] "XV"
## [66] "CXX"
## [67] "VI ἀπὸ Νικαίας μείλια ς"
## [68] "XXXII"
## [69] "XL"
## [70] "CC���"
## [71] "CXXXV"
## [72] "CXXX"
## [73] "CXII"
## [74] "CXVI"
## [75] "LXXXX"
## [76] "CX"
## [77] "C X"
## [78] "XCIIX"
## [79] "LXXXIIII"
## [80] "LXXXV"
## [81] "LXI"
## [82] "XXXX"
## [83] "XXXXI"
## [84] "LX"
## [85] "XVIIII"
## [86] "a legione milia passuum"
## [87] "V"
## [88] "XXXX a legione milia passuum LVI"
## [89] "XLIIII a legione milia passuum LIII"
## [90] "XLV a legione milia passuum LI"
## [91] "LXII a legione milia passuum XXXIIII"
## [92] "XVI"
## [93] "XII"
## [94] "XXXXV"
## [95] "IX"
## [96] "XXXV"
## [97] "XLVI"
## [98] "LVI"
## [99] "IIXXX"
## [100] "XLI"
## [101] "XXXVI"
## [102] "VIIII DDominis nnostris Flavio Constantino Pio Felici Maximo victori semper Augusto bono generis humani nato Crispo et Constantino beatissimis Caesaribus a Iuvavo milia passuum VIIII"
## [103] "LVIII"
## [104] "CLX"
## [105] "CCLXXXIX ab milia passuum CLXIX ab milia passuum VII"
## [106] "C"
## [107] "LXXII"
## [108] "CLXXX"
## [109] "CLIX"
## [110] "CCLV"
## [111] "Impperatoribus Caessaribus Caio Valerio Diocletiano et Marco Aurelio Maximiano invictis Auggustis et Flavio Valerio Constantio et Galerio Valerio Maximiano nobbilissimis Caessaribus milia passuum III"
## [112] "XXVII"
## [113] "VII"
## [114] "I L XIIII"
## [115] "CC"
## [116] "CXI"
## [117] "VIII Imperator Caesar Lucius Septimius Severus Pertinax Augustus pater patriae tribuniciae potestatis III imperator VI consul II per Aelium Severianum Maximum legatum Μείλια ηʹ"
## [118] "IIII Imperatore Caesare Marco Aurelio Antonino Augusto"
## [119] "I αʹ"
## [120] "XXVII Domino nostro IovBiani victori ac triumfatori semper Augusto"
## [121] "IIII DDDominis nnnostris Imppperatoribus Constantino et Maximino et Liciniano Licinio Augggustis nnnostris res publica coloniae Sitifensium milia passuum IIII DDDominis nnnostris Imppperatoribus Constantino et ddominis nnostris Constantio et Constanti Auggustis res publica coloniae Sitifensium milia passuum IIII"
## [122] "II Imperatori Caesari Flavio Iuliano semper Augusto"
## [123] "XXII semper Auggustis milia passuum et Gratiano perpetuis Augggustis"
## [124] "DCLXXV"
## [125] "CVII"
## [126] "numero LVI"
## [127] "III Imperatori Caesari Marco Aurelio Probo Pio Felici Augusto milia passuum II"
## [128] "VIII ηʹ"
## [129] "XX κʹ"
## [130] "XVIIII θʹ Imperatori Caesari Caio Aurelio Valerio Diocletiano Pio Felici Invicto Augusto et Imperatori Caesari Marco Aurelio Valerio Maximiano Pio Felici Invicto Augusto et Flavio Valerio Constantio et Galerio Valerio Maximiano nobilissimis Caesaribus Bona Fortuna Imperatori Caesari Flavio Valerio Constantino Pio Felici Invicto Augusto et Imperatori Caesari Valerio Licinio Pio Felici Invicto Augusto milia VIIII Flavio Iuliano maximo Victori ac triumfatori semper Augusto"
## [131] "milia LXV"
## [132] "V Bona Fortuna ddominis nnostris Imperatori Caesari Caio Aurelio Valerio Diocletiano Pio Felici Invicto Augusto et Imperatori Caesari Marco Aurelio Valerio Maximiano Pio Felici Invicto Augusto et Flavio Valerio Constantio et Galerio Valerio Maximiano nobilissimis Caessaribus milia passuum Aurelius Priscianus vir perfectissimus praeses provinciae Ponti devotus numini maiestati que eorum Imperator Caesar Flavius Iulianus Pius Felix Augustus Ddominis nnostris Valentiniani et Valenti Auggustis et Gratiano Auggustis"
## [133] "Aurelius Priscianus vir egregius praeses provinciae Ponti devotus numini maiestati que aeorum"
## [134] "VI NO VII G X"
## [135] "LIII"
## [136] "numero LVII"
## [137] "XXXIIII XXXIIII"
## [138] "C Μ Ις"
## [139] "Αὐτοκράτωρ Καῖσαρ θεοῦ Οὐεσπασιανοῦ υἱὸς Σεβαστὸς Δομετιανὸς ἀρχιερεὺς μέγιστος δημαρχικῆς ἐξουσίας τὸ ιαʹ αὐτοκράτωρ τὸ καʹ ὕπατος τὸ ιϛʹ τιμητὴς διηνεκὴς πατὴρ πατρίδος τὰς ὁδοὺς ἀποκατέστησεν ἐργασαμένων Κολοψωνίων Αὐτοκράτωρ Καῖσαρ Σ ἀρχιερεὺς μέγιστος δημαρχικῆς ἐξουσίας πατὴρ πατρίδος ΤΟ Ε"
## [140] "CXIII"
## [141] "LIIII"
## [142] "XI A Flavio Valerio Severo et Galerio Valerio Maximino"
## [143] "III VIAN ope STIRP NAPOVI procuratoris Augusti"
## [144] "XXXXIIII"
## [145] "IIII DCLII fecit legio II Augusta"
## [146] "III pedum IIICCCIV"
## [147] "III DCLXVI semis"
## [148] "ab Emona"
## [149] "et Cai Iuli Veri Maximi nobilissimi Caesaris a Siscia XXX"
## [150] "LXVI"
## [151] "XLVII"
## [152] "LV"
## [153] "CCVIIII"
## [154] "XVI=N PI Imperatori Caesari Marco Aurelio Antonino Augusto Pio Felici Malata Cusum milia passuum XVI"
## [155] "VI Dominis nnostris Flavio Valerio Constantio et Galerio Valerio Maximiano nobilissimis Caesaribus DDominis nnostris Constantino"
## [156] "CXXXVII"
## [157] "LII"
## [158] "LXXIII"
## [159] "XCVII"
## [160] "CII"
## [161] "LXIII"
## [162] "LIX"
## [163] "ILX"
## [164] "XXXVII"
## [165] "XXXVIII"
## [166] "XXXXIIX"
stopwords<- c("et", "a", "ab", "ad", "per", "ac", "in", "καὶ", "τὸ", "ἀπὸ", "ἡ")
What kind of information do we have about ancient findspot of a milestone? Let’s see first 20 records.
milestone_all$findspot_ancient_clean[1:20]
## [1] "Bracara Augusta - Lucus Augusti" "Bracara Augusta - Lucus Augusti"
## [3] "Bracara Augusta" "NULL"
## [5] "NULL" "NULL"
## [7] "NULL" "NULL"
## [9] "Thibilis - Calama" "Sebatum"
## [11] "Aquae Flaviae" "Matrica"
## [13] "Matrica" "Matrica"
## [15] "Matrica" "Fanum Fortunae"
## [17] "Divodurum" "NULL"
## [19] "Libyssa" "NULL"
How many different ancient findspots do we have, including “NULL”?
length(unique(milestone_all$findspot_ancient_clean))
## [1] 431
How many milestones were found in individual Roman provinces? Display from the province containing the most to least milestones.
milestone_all %>%
count(province_label_clean, sort =TRUE)
Display all the provinces and milestones in a chart:
milestone_all %>%
count(province_label_clean) %>%
ggplot(aes(y=fct_rev(province_label_clean), x=n)) +
geom_point(color="red") +
coord_fixed(ratio = 7/1) +
labs(x = "Number of milestones", y = "Roman province", title = "Number of milestones per Roman Province", subtitle = ggtitle(paste("n =", nrow(milestone_all)), "inscriptions")) +
theme_linedraw(base_size = 12)
# selecting milestones with coordinates
coords_milestone<- as.data.frame(cbind(id = milestone_all$id,
coordinates = milestone_all$coordinates,
findspot_ancient_clean = milestone_all$findspot_ancient_clean,
type_of_inscription_clean = milestone_all$type_of_inscription_clean,
type_of_monument_clean = milestone_all$type_of_monument_clean,
not_before = milestone_all$not_before,
not_after = milestone_all$not_after,
commentary = milestone_all$commentary))
# milestones with no coordinates
coords_milestone_empty<- coords_milestone %>%
dplyr::filter(coordinates == "list()")
# milestones with coordinates
coords_milestone_full<- coords_milestone %>%
dplyr::filter(coordinates != "list()")
lat_long_milestone<- coords_milestone_full %>%
separate(col = coordinates, into = c("longitude", "latitude"), sep = ",")
lat_long_milestone$latitude <- as.numeric(str_replace(lat_long_milestone$latitude, pattern = "\\)", replacement=""))
lat_long_milestone$longitude <- as.numeric(str_replace(lat_long_milestone$longitude, pattern = "c\\(", replacement=""))
nrow(lat_long_milestone)
## [1] 1668
nrow(lat_long_milestone)/(nrow(milestone_all)/100)
## [1] 94.23729
map_milestones_dot <-leaflet(width="100%") %>%
addProviderTiles("Stamen.Watercolor")%>% # Add CartoDB map tiles
addCircles(lng = lat_long_milestone$longitude,
lat = lat_long_milestone$latitude, radius = 10, fill = TRUE, color= , fillColor = lat_long_milestone$type_of_monument_clean,
popup = paste0("<b> InscriptionID: </b>", lat_long_milestone$id,
"<br><b> Ancient findspot: </b>", lat_long_milestone$findspot_ancient,
"<br><b> Type of inscription: </b>", lat_long_milestone$type_of_inscription_clean,
"<br><b> Type of monument: </b>", lat_long_milestone$type_of_monument_clean,
"<br><b> Not before (date): </b>", lat_long_milestone$not_before,
"<br><b> Not after (date): </b>", lat_long_milestone$not_after,
"<br><b> Commentary: </b>", lat_long_milestone$commentary),
) %>%
addLegend(position = "topright",
colors = c("Blue"),
labels = c("Milestones (n=1770)"), opacity = 1,
title = "Position of all milestones (EDH)"
)
map_milestones_dot
map_milestones_cluster <-leaflet(width="100%") %>%
#addProviderTiles("Esri.WorldTopoMap", group = "Topo") %>%
addProviderTiles("Esri.WorldImagery", group = "ESRI Aerial") %>%
addMarkers(lng = lat_long_milestone$longitude,
lat = lat_long_milestone$latitude,
popup = paste0("<b> InscriptionID: </b>", lat_long_milestone$id,
"<br><b> Ancient findspot: </b>", lat_long_milestone$findspot_ancient,
"<br><b> Type of inscription: </b>", lat_long_milestone$type_of_inscription_clean,
"<br><b> Type of monument: </b>", lat_long_milestone$type_of_monument_clean,
"<br><b> Not before (date): </b>", lat_long_milestone$not_before,
"<br><b> Not after (date): </b>", lat_long_milestone$not_after,
"<br><b> Commentary: </b>", lat_long_milestone$commentary),
clusterOptions = markerClusterOptions()
) %>%
addLegend(position = "topright",
colors = c("Blue", "Green", "Yellow", "Orange"),
labels = c("Individual inscription", "Small cluster", "Medium cluster", "Large cluster"), opacity = 1,
title = "Clustering of all milestones in the EDH dataset"
)
map_milestones_cluster
## Loading required package: sp
## rgdal: version: 1.5-19, (SVN revision 1092)
## Geospatial Data Abstraction Library extensions to R successfully loaded
## Loaded GDAL runtime: GDAL 3.0.4, released 2020/01/28
## Path to GDAL shared files: /usr/share/gdal
## GDAL binary built with GEOS: TRUE
## Loaded PROJ runtime: Rel. 7.0.0, March 1st, 2020, [PJ_VERSION: 700]
## Path to PROJ shared files: /home/petra/.local/share/proj:/usr/share/proj
## PROJ CDN enabled: FALSE
## Linking to sp version:1.4-2
## To mute warnings of possible GDAL/OSR exportToProj4() degradation,
## use options("rgdal_show_exportToProj4_warnings"="none") before loading rgdal.
##
## Attaching package: 'raster'
## The following object is masked from 'package:dplyr':
##
## select
## The following object is masked from 'package:tidyr':
##
## extract
## Linking to GEOS 3.8.0, GDAL 3.0.4, PROJ 7.0.0
Source of Roads shapefile: http://awmc.unc.edu/awmc/map_data/shapefiles/ba_roads/ Source of Roman provinces (AD 200): http://awmc.unc.edu/awmc/map_data/shapefiles/cultural_data/political_shading/roman_empire_ad_200/shape/
## Warning in dir.create("../data/ba_roads"): '../data/ba_roads' already exists
## Warning in unzip("../data/ba_roads.zip", exdir = "../data/ba_roads/"): error 1
## in extracting from zip file
## Warning in dir.create("../data/roman_empire_200_ad_provinces"): '../data/
## roman_empire_200_ad_provinces' already exists
## Warning in unzip("../data/roman_empire_ad_200_provinces.zip", exdir = "../data/
## roman_empire_200_ad_provinces"): error 1 in extracting from zip file
## Reading layer `ba_roads' from data source `/home/petra/Github/epigraphic_roads/data/ba_roads/ba_roads.shp' using driver `ESRI Shapefile'
## replacing null geometries with empty geometries
## Simple feature collection with 2739 features and 26 fields (with 1 geometry empty)
## geometry type: LINESTRING
## dimension: XY
## bbox: xmin: -9.29586 ymin: 23.90006 xmax: 52.88473 ymax: 56.52055
## geographic CRS: WGS 84
## Reading layer `roman_empire_ad_200_provinces' from data source `/home/petra/Github/epigraphic_roads/data/roman_empire_200_ad_provinces/roman_empire_ad_200_provinces.shp' using driver `ESRI Shapefile'
## replacing null geometries with empty geometries
## Simple feature collection with 81 features and 11 fields (with 1 geometry empty)
## geometry type: LINESTRING
## dimension: XY
## bbox: xmin: NA ymin: NA xmax: NA ymax: NA
## geographic CRS: WGS 84
map_milestones_provinces<- leaflet(width="100%") %>%
#addProviderTiles("Esri.WorldTopoMap", group = "Topo") %>%
addProviderTiles("Esri.WorldImagery", group = "ESRI Aerial") %>%
#addProviderTiles("Stamen.Watercolor")%>% # Add CartoDB map tiles
addPolylines(data = provinces200, color = "red", weight = 2, opacity = 0.7) %>%
addCircles(lng = lat_long_milestone$longitude,
lat = lat_long_milestone$latitude, radius = 10, fill = TRUE, color = "blue" , fillColor = "red",
popup = paste0("<b> InscriptionID: </b>", lat_long_milestone$id,
"<br><b> Ancient findspot: </b>", lat_long_milestone$findspot_ancient,
"<br><b> Type of inscription: </b>", lat_long_milestone$type_of_inscription_clean,
"<br><b> Type of monument: </b>", lat_long_milestone$type_of_monument_clean,
"<br><b> Not before (date): </b>", lat_long_milestone$not_before,
"<br><b> Not after (date): </b>", lat_long_milestone$not_after,
"<br><b> Commentary: </b>", lat_long_milestone$commentary),
) %>%
addLegend(position = "topright",
colors = c("Blue", "Red"),
labels = c("Milestones", "Roman Provinces (200 AD)"), opacity = 1,
title = "Milestones in the Roman Empire"
)
map_milestones_provinces
map_milestones_roads<- leaflet(width="100%") %>%
addProviderTiles("Stamen.Watercolor")%>% # Add CartoDB map tiles
addProviderTiles("Stamen.TerrainBackground")%>% # Add CartoDB map tiles
#addProviderTiles("Esri.WorldTopoMap", group = "Topo") %>%
#addProviderTiles("Esri.WorldImagery", group = "ESRI Aerial") %>%
setView( lng = 22.326743, lat = 46.897122, zoom = 4 ) %>%
#setMaxBounds(lat1=43.633977, lng1 =-11.227926 , lat2=35.133882 , lng2=50.882336) %>%
addPolylines(data = roads, color = "purple", weight = 1, opacity = 0.7) %>%
addCircles(lng = lat_long_milestone$longitude,
lat = lat_long_milestone$latitude, opacity = 0.5, radius = 10, fill = TRUE, color = "blue" , fillColor = "red",
popup = paste0("<b> InscriptionID: </b>", lat_long_milestone$id,
"<br><b> Ancient findspot: </b>", lat_long_milestone$findspot_ancient,
"<br><b> Type of inscription: </b>", lat_long_milestone$type_of_inscription_clean,
"<br><b> Type of monument: </b>", lat_long_milestone$type_of_monument_clean,
"<br><b> Not before (date): </b>", lat_long_milestone$not_before,
"<br><b> Not after (date): </b>", lat_long_milestone$not_after,
"<br><b> Commentary: </b>", lat_long_milestone$commentary),
) %>%
addLegend(position = "topright",
colors = c("Blue", "Purple"),
labels = c("Milestones", "Roman roads (BA atlas)"), opacity = 1,
title = "Milestones and Roman roads"
)
map_milestones_roads
# inscriptions with coordinates
lat_long_EDH <- EDH_tibble %>%
separate(col = coordinates, into = c("longitude", "latitude"), sep = ",")
## Warning: Expected 2 pieces. Missing pieces filled with `NA` in 2464 rows [20,
## 34, 64, 71, 94, 149, 212, 221, 296, 311, 356, 382, 388, 390, 405, 406, 409, 412,
## 418, 421, ...].
lat_long_EDH