{"id":15051465,"url":"https://github.com/sdam-au/sdam","last_synced_at":"2025-04-10T02:56:44.084Z","repository":{"id":58626187,"uuid":"259263152","full_name":"sdam-au/sdam","owner":"sdam-au","description":"Provides digital tools for performing analyses within Social Dynamics and complexity in the Ancient Mediterranean (SDAM), which is a research group based at the Department of History and Classical Studies at Aarhus University.","archived":false,"fork":false,"pushed_at":"2022-09-05T08:03:56.000Z","size":115161,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-11-20T15:20:58.865Z","etag":null,"topics":["aarhus-university","cartography","data-visualization","dataset","digital-humanities","encoding","extract","inscriptions","r","rest-api","temporal"],"latest_commit_sha":null,"homepage":"https://CRAN.R-project.org/package=sdam ","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc-by-4.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sdam-au.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-27T09:13:24.000Z","updated_at":"2022-11-06T19:34:01.000Z","dependencies_parsed_at":"2022-09-23T08:42:39.815Z","dependency_job_id":null,"html_url":"https://github.com/sdam-au/sdam","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdam-au%2Fsdam","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdam-au%2Fsdam/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdam-au%2Fsdam/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdam-au%2Fsdam/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sdam-au","download_url":"https://codeload.github.com/sdam-au/sdam/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248147716,"owners_count":21055545,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aarhus-university","cartography","data-visualization","dataset","digital-humanities","encoding","extract","inscriptions","r","rest-api","temporal"],"created_at":"2024-09-24T21:35:44.452Z","updated_at":"2025-04-10T02:56:44.062Z","avatar_url":"https://github.com/sdam-au.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sdam\r\n\r\n## Social Dynamics and Complexity in the Ancient Mediterranean\r\n\r\nProvides digital tools for performing analyses within Social Dynamics and complexity in the Ancient Mediterranean (SDAM), which is a research group based at the Department of History and Classical Studies at Aarhus University.\r\n\r\n\r\n\u003cbr/\u003e\r\n\r\n### Installation\r\n\r\nInstall `sdam` package from CRAN or a GitHub repository.\r\n\r\n```r\r\n## from CRAN\r\ninstall.packages(\"sdam\")\r\n```\r\n\r\n\r\n```r\r\n## development version\r\ndevtools::install_github(\"sdam-au/sdam\")\r\n```\r\nor \r\n\r\n```r\r\n## legacy version R-3.6.x\r\ndevtools::install_github(\"mplex/cedhar\", subdir=\"pkg/sdam\")\r\n```\r\n\r\n\r\n\r\n### Usage\r\n\r\n```r\r\n## Load package\r\nlibrary(\"sdam\")\r\npackageVersion(\"sdam\")\r\n#[1] '1.1.1'\r\n```\r\n\r\n```r\r\n## Load epigraphic data\r\ndata(\"EDH\")\r\n```\r\n\r\n```r\r\n# Look at how many inscriptions?\r\nlength(EDH)\r\n# [1] 84701\r\n```\r\n\r\n\r\n```r\r\n# Also look at the object structure\r\nstr(EDH)\r\n```\r\n\r\n\r\n### Get particular inscriptions\r\n\r\nStarting with `sdam` v0.8.0, it is possible to extract inscriptions from the *new* `API` of the `EDH` database. \r\nFor instance, the following commands extract people named in Roman inscriptions in Iudaea and record them with \r\na `list` data object in `iud`.\r\n\r\n\r\n```r\r\n# obtain epigraphic data from Iudaea\r\niud \u003c- get.edh(search=\"inscriptions\", province=\"Iud\")\r\n```\r\n\r\n```r\r\n# how many inscriptions in Iudaea?\r\nlength(iud)\r\n# [1] 187\r\n```\r\n\r\n\r\n### Relative dating\r\n\r\nIn `sdam` there is the option  to extract variables from a `EDH` dataset *fragments* with function `edhw()`, \r\nwhich allos making transformations as weel. For instance, te ode snippet below is to place Roman inscriptions \r\nin lists from Iudaea into a data frame in object `iud_df`.\r\n\r\n```r\r\n# extract variables of interes from object `iud` and convert it into a data frame\r\niud_df \u003c- edhw(x=iud, vars=c(\"not_after\", \"not_before\"), as=\"df\", na.rm=FALSE)\r\n\r\n# what object types is?\r\nis(iud_df)\r\n#[1] \"data.frame\" \"list\"       \"oldClass\"   \"vector\"  \r\n```\r\n\r\n\r\nTo remove missing data form `iud_df`, we activate `na.rm` argument in the function as for `iud_df0`\r\n\r\n```r\r\n# extract variables of interes from object `iud` and convert it into a data frame\r\niud_df0 \u003c- edhw(x=iud, vars=c(\"not_after\", \"not_before\"), as=\"df\", na.rm=TRUE)\r\n```\r\n\r\nNow we compare outcomes with these two options.\r\n\r\n```r\r\ncbind(head(iud_df,10), head(iud_df0,10))\r\n#         id not_before not_after       id not_before not_after\r\n#1  HD001461       0071      0130 HD001461       0071      0130\r\n#2  HD001958       0301      0400 HD001958       0301      0400\r\n#3  HD001964       0132      0135 HD001964       0132      0135\r\n#4  HD001973       0071      0130 HD001973       0071      0130\r\n#5  HD001985       0198      0209 HD001985       0198      0209\r\n#6  HD002376       0051      0220 HD002376       0051      0220\r\n#7  HD004074       0026      0036 HD004074       0026      0036\r\n#8  HD004735       0070      0079 HD004735       0070      0079\r\n#9  HD006228       0212      0220 HD006228       0212      0220\r\n#10 HD007068       \u003cNA\u003e      \u003cNA\u003e HD011646       0117      0138\r\n```\r\n\r\nHence, not available data is removed in `iud_df0`.\r\n\r\n\r\n\r\n### People\r\n\r\nIt is possible to extract the `people` component from the `EDH` API dataset, which is an integrated list with their own items.\r\n\r\nFor instance, the following commands extract people named in Roman inscriptions in Iudaea and Syria into a data frame object \r\nwith a *long* (default) and a data frame with a *wide* format:\r\n\r\n```r\r\nedhw(x=get.edh(search=\"inscriptions\", province=\"Iud\"), vars=\"people\", as=\"df\")\r\nedhw(x=get.edh(search=\"inscriptions\", province=\"Syr\"), vars=\"people\", as=\"df\", wide=TRUE)\r\n```\r\n\r\nThe same can apply to the rest of Roman provinces recorded in the `EDH` dataset.\r\n\r\n\r\n#### Specifying output\r\n\r\nIt is also possible to `limit` the amount of records to process, and with the following example we can extract the first four \r\ninscriptions by `hd_nr` id in a data frame with a long format.\r\n\r\n```r\r\nedhw(vars=\"people\", as=\"df\", limit=4)\r\n#        id age: years             cognomen gender                                              name    nomen person_id praenomen           status   tribus\r\n#1 HD000001       \u003cNA\u003e               Optata female                               Noniae P.f. Optatae    Nonia         1      \u003cNA\u003e             \u003cNA\u003e     \u003cNA\u003e\r\n#2 HD000001       \u003cNA\u003e               Artemo   male                                 C. Iulio Artemoni   Iulius         2        C.             \u003cNA\u003e     \u003cNA\u003e\r\n#3 HD000001       \u003cNA\u003e              Optatus   male                            C. Iulius C.f. Optatus   Iulius         3        C.             \u003cNA\u003e     \u003cNA\u003e\r\n#4 HD000002         70                Paris   male                                  C. Sextius Paris  Sextius         1        C.             \u003cNA\u003e     \u003cNA\u003e\r\n#5 HD000003       \u003cNA\u003e Sisenna+ Rutilianus+   male      [P. M]ummio [P.f. Gal. S]isenna[e Rutiliano] Mummius+         1       P.+ senatorial order Galeria+\r\n#6 HD000004       \u003cNA\u003e                [---]   \u003cNA\u003e [---?]AV(?)S(?)[---]L(?)L(?)A M. Porci Nigri ser.     \u003cNA\u003e         1      \u003cNA\u003e           slaves     \u003cNA\u003e\r\n#7 HD000004       \u003cNA\u003e                Niger   \u003cNA\u003e                                    M. Porci Nigri  Porcius         2        M.             \u003cNA\u003e     \u003cNA\u003e\r\n```\r\n\r\nwhile a specific record is retrieved by using the `id` argument as follows:\r\n\r\n\r\n```r\r\nedhw(vars=\"people\", as=\"df\", id=4444)\r\n#        id     cognomen gender                   name    nomen person_id praenomen           status\r\n#1 HD004444    Gordianus   male     M. Antoni Gordiani Antonius         1        M.             \u003cNA\u003e\r\n#2 HD004444 Tranquillina female Sabiniae Tranquillinae  Sabinia         2      \u003cNA\u003e             \u003cNA\u003e\r\n#3 HD004444  Mercurialis   male       Iul. Mercurialis  Iulius*         3      \u003cNA\u003e equestrian order\r\n```\r\n\r\n\r\n### Probability of existence\r\n\r\nSince `sdam` v0.3.0 there is a dedicated function to compute probability of existence of date points or intervals. \r\nWe obtain inscriptions from Iudaea in EDH data base, and then compute the aoristic sum with a 5-bin chronological phases. \r\n\r\n```r\r\nprex(x=get.edh(search=\"inscriptions\", province=\"Iud\"), vars=c(\"not_before\", \"not_after\"), cp=\"bin5\")\r\n#   Arch     Class      Hell       Rom       Byz \r\n#    0.000     0.000  1337.904 13405.017     0.000\r\n```\r\n\r\nSince most of the inscriptions are within the Roman period, we try an eight-bin chronological phases option. \r\n\r\n```r\r\nprex(x=get.edh(search=\"inscriptions\", province=\"Iud\"), vars=c(\"not_before\", \"not_after\"), cp=\"bin8\")\r\n#   Arch     Class      Hell      ERom      MRom      LRom      EByz      LByz \r\n#   0.0000    0.0000 1337.9040 2396.4529 1200.5623  320.5379    0.0000    0.0000\r\n```\r\n\r\n\r\n\r\n\r\n### Vignettes\r\n\r\n* [Datasets in `\"sdam\"` package](https://sdam-au.github.io/sdam/articles/Intro.html)\r\n* [Dates and missing dating data](https://sdam-au.github.io/sdam/articles/Dates.html)\r\n* [Re-encoding `people` in the `EDH` dataset](https://sdam-au.github.io/sdam/articles/Encoding.html)\r\n* [Cartographical maps and networks](https://sdam-au.github.io/sdam/articles/Maps.html)\r\n\r\n\r\n\r\n### See also\r\n* [Social Dynamics and complexity in the Ancient Mediterranean Project](https://sdam-au.github.io/sdam-au/)\r\n* [`\"sdam\"` manual](https://github.com/mplex/cedhar/blob/master/typesetting/reports/sdam.pdf)\r\n* [Code snippets using `\"sdam\"`](https://github.com/sdam-au/R_code)\r\n  + [Shipwrecks network in the Mediterranean Basin (23-June-2022)](https://htmlpreview.github.io/?https://github.com/sdam-au/R_code/blob/master/HTML/Shipwrecks%20Network%20in%20the%20Mediterranean%20Basin.html)\r\n  + [Centrality measures in ORBIS Roman transport network (24-Nov-2021)](https://htmlpreview.github.io/?https://github.com/sdam-au/R_code/blob/master/HTML/Centrality%20measures%20in%20ORBIS%20Roman%20transport%20network.html)\r\n  + [ORBIS Roman World transport network (14-Sep-2021, update: 22-Sep-2021)](https://htmlpreview.github.io/?https://github.com/sdam-au/R_code/blob/master/HTML/ORBIS%20Roman%20World%20transport%20network%20centrality%20measures.html)\r\n  + [Plotting Roman Roads (update: 14-Sep-2021)](https://htmlpreview.github.io/?https://github.com/sdam-au/R_code/blob/master/HTML/Plotting%20Roman%20Roads%20(update).html)\r\n  + [Plotting Roman Roads and Time (17-Aug-2021)](https://htmlpreview.github.io/?https://github.com/sdam-au/R_code/blob/master/HTML/Plotting%20Roman%20Roads%20and%20Time.html)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsdam-au%2Fsdam","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsdam-au%2Fsdam","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsdam-au%2Fsdam/lists"}