Table of Contents

Vistorian

Test

> wdir <- "C:/Users/vlado/DL/data/multi/vistorian"
> setwd(wdir)
> N <- read.csv("nodes.csv")
> str(N)
'data.frame':   8 obs. of  2 variables:
 $ NODE: chr  "A" "B" "C" "D" ...
 $ TYPE: chr  " male" " male" " female" " female" ...
> N$TYPE <- trimws(N$TYPE)
> names(N)[1] <- "ID"
> L <- read.csv("data1_weight.csv")
> str(L)
'data.frame':   18 obs. of  5 variables:
 $ SOURCE  : chr  "A" "A" "B" "B" ...
 $ TARGET  : chr  " B" " G" " D" " E" ...
 $ LINKTYPE: int  1 2 1 2 3 3 3 4 4 4 ...
 $ DATE    : int  1957 1957 1958 1959 1959 1959 1959 1957 1958 1957 ...
 $ WEIGHT  : int  1 1 2 3 1 2 2 1 3 2 ...
> id <- N$ID
> L$SOURCE <- as.integer(factor(L$SOURCE,levels=id))
> L$TARGET <- as.integer(factor(trimws(L$TARGET),levels=id))
> y <- factor(L$DATE)
> L$DATE <- as.integer(y)
> info <- list(network="VisTest",title="Vistorian test",by="Benjamin Bach",
+   url="https://github.com/networkcube/networkcube-traces-sept2018/tree/master/test",
+   creator="V. Batagelj",date=date())
> ways <- list(SOURCE="source node",TARGET="target node",
+   LINKTYPE="relation",DATE="year",WEIGHT="weight")
> nodes <- list(SOURCE=N,TARGET=data.frame(ID=N$ID),
+   LINKTYPE=data.frame(ID=paste("R",1:4,sep="")),DATE=data.frame(ID=levels(y)))
> links <- L
> data <- list()
> NM <- list(format="MWnets",info=info,ways=ways,nodes=nodes,links=links,data=data)
> str(NM)
List of 6
 $ format: chr "MWnets"
 $ info  :List of 6
  ..$ network: chr "VisTest"
  ..$ title  : chr "Vistorian test"
  ..$ by     : chr "Benjamin Bach"
  ..$ url    : chr "https://github.com/networkcube/networkcube-traces-sept2018/tree/master/test"
  ..$ creator: chr "V. Batagelj"
  ..$ date   : chr "Mon Jan  9 21:36:32 2023"
 $ ways  :List of 5
  ..$ SOURCE  : chr "source node"
  ..$ TARGET  : chr "target node"
  ..$ LINKTYPE: chr "relation"
  ..$ DATE    : chr "year"
  ..$ WEIGHT  : chr "weight"
 $ nodes :List of 4
  ..$ SOURCE  :'data.frame':    8 obs. of  2 variables:
  .. ..$ ID  : chr [1:8] "A" "B" "C" "D" ...
  .. ..$ TYPE: chr [1:8] "male" "male" "female" "female" ...
  ..$ TARGET  :'data.frame':    8 obs. of  1 variable:
  .. ..$ ID: chr [1:8] "A" "B" "C" "D" ...
  ..$ LINKTYPE:'data.frame':    4 obs. of  1 variable:
  .. ..$ ID: chr [1:4] "R1" "R2" "R3" "R4"
  ..$ DATE    :'data.frame':    4 obs. of  1 variable:
  .. ..$ ID: chr [1:4] "1956" "1957" "1958" "1959"
 $ links :'data.frame': 18 obs. of  5 variables:
  ..$ SOURCE  : int [1:18] 1 1 2 2 2 2 2 3 3 3 ...
  ..$ TARGET  : int [1:18] 2 7 4 5 6 7 8 1 6 8 ...
  ..$ LINKTYPE: int [1:18] 1 2 1 2 3 3 3 4 4 4 ...
  ..$ DATE    : int [1:18] 2 2 3 4 4 4 4 2 3 2 ...
  ..$ WEIGHT  : int [1:18] 1 1 2 3 1 2 2 1 3 2 ...
 $ data  : list()
> write(toJSON(MN),"VisTest.json") 

Tableware

Please cite the workshop tutorial as:

Brughmans, T. and Bach, B. (2018) The Vistorian: exploring archaeological networks. https://archaeologicalnetworks.wordpress.com/resources/#vistorian

The archaeological data used in this tutorial is the ICRATES database of tablewares in the Roman East. To cite this data use the following reference:

Bes, P., 2015. Once upon a Time in the East. The Chronological and Geographical Distribution of Terra Sigillata and Red Slip Ware in the Roman East. Roman and Late Antique Mediterranean Pottery 6. Archaeopress, Oxford.

> library("readxl")
> N <- as.data.frame(read_excel("vistorian_locations.xls",range="A1:D70"))
> L <- as.data.frame(read_excel("vistorian_network.xls",range="A1:G1591"))
> NN <- N[,-2]; names(NN)[1] <- "ID"
> LL <- L[,c(1,3,6,7,5)]
> LL$FROM <- as.integer(factor(LL$FROM,levels=NN$ID))
> LL$TO <- as.integer(factor(LL$TO,levels=NN$ID))
> LL$TYPE <- as.integer(factor(LL$TYPE))
> LL$PERIOD <- as.integer(factor(LL$PERIOD))
> info <- list(network="tableware",by="Philip Bes",
+   title="ICRATES database of tablewares in the Roman East",
+   url=c("https://archaeologydataservice.ac.uk/archives/view/icrates_lt_2018/index.cfm",
+     "https://archaeologicalnetworks.wordpress.com/"),
+   creator="V. Batagelj",date=date())
> ways <- list(FROM="source",TO="target",TYPE="type",PERIOD="period")
> nodes <- list(FROM=NN,TO=data.frame(ID=NN$ID),
+   TYPE=data.frame(ID=c("ESB","ESC")),DATE=data.frame(ID=10:12))
> data <- list()
> NM <- list(format="MWnets",info=info,ways=ways,nodes=nodes,links=LL,data=data)
> str(NM)
List of 6
 $ format: chr "MWnets"
 $ info  :List of 6
  ..$ network: chr "tableware"
  ..$ by     : chr "Philip Bes"
  ..$ title  : chr "ICRATES database of tablewares in the Roman East"
  ..$ url    : chr [1:2] "https://archaeologydataservice.ac.uk/archives/view/icrates_lt_2018/index.cfm"
                         "https://archaeologicalnetworks.wordpress.com/"
  ..$ creator: chr "V. Batagelj"
  ..$ date   : chr "Tue Jan 10 00:16:58 2023"
 $ ways  :List of 4
  ..$ FROM  : chr "source"
  ..$ TO    : chr "target"
  ..$ TYPE  : chr "type"
  ..$ PERIOD: chr "period"
 $ nodes :List of 4
  ..$ FROM:'data.frame':        69 obs. of  3 variables:
  .. ..$ ID       : chr [1:69] "Abdera" "Aizanoi" "Alexandreia" "Altinum" ...
  .. ..$ LONGITUDE: num [1:69] 25 29.6 29.9 12.4 33.1 ...
  .. ..$ LATITUDE : num [1:69] 40.9 39.2 31.2 45.6 34.7 ...
  ..$ TO  :'data.frame':        69 obs. of  1 variable:
  .. ..$ ID: chr [1:69] "Abdera" "Aizanoi" "Alexandreia" "Altinum" ...
  ..$ TYPE:'data.frame':        2 obs. of  1 variable:
  .. ..$ ID: chr [1:2] "ESB" "ESC"
  ..$ DATE:'data.frame':        3 obs. of  1 variable:
  .. ..$ ID: int [1:3] 10 11 12
 $ links :'data.frame': 1590 obs. of  5 variables:
  ..$ FROM  : int [1:1590] 3 3 3 3 3 3 3 6 6 6 ...
  ..$ TO    : int [1:1590] 14 9 12 65 68 15 25 12 14 49 ...
  ..$ TYPE  : int [1:1590] 2 2 2 2 2 2 2 2 2 2 ...
  ..$ PERIOD: int [1:1590] 1 1 1 1 1 1 1 1 1 1 ...
  ..$ WEIGHT: num [1:1590] 3 1 1 2 1 1 1 1 1 1 ...
 $ data  : list()
> write(toJSON(MN),"tableware.json")
vlado/work/2m/mwn/vistorian.txt · Last modified: 2023/01/10 00:55 by vlado
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki