Skip to content

Commit 624094f

Browse files
authored
Merge pull request #9 from lsteinmann/packagedoc
documentation, corrections
2 parents 0b1f1aa + f37d333 commit 624094f

15 files changed

Lines changed: 169 additions & 67 deletions

.Rbuildignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
^\.Rproj\.user$
33
^\.github$
44
^data-raw$
5+
^\.travis\.yml$
6+
^codecov\.yml$

.travis.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ language: R
44
cache: packages
55

66

7-
r_packages:
8-
- covr
9-
10-
after_success:
11-
- Rscript -e 'library(covr); codecov()'
7+
addons:
8+
apt:
9+
packages:
10+
- libgit2-dev

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ Suggests:
2121
reshape2,
2222
covr
2323
Depends:
24-
R (>= 2.10)
24+
R (>= 3.3)
2525
VignetteBuilder: knitr

R/datplot_utility.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,9 @@ create.sub.objects <- function(DAT_mat, stepsize) {
196196
result <- as.data.frame(matrix(ncol = 6, nrow = outputrows+100))
197197

198198
diffs <- DAT_mat[,"datmax"]-DAT_mat[,"datmin"]
199+
diffs[diffs == 0] <- 1
199200

200201
if (any(diffs < stepsize)) {
201-
diffs <- diffs[diffs < stepsize]
202202
warning(paste("stepsize is larger than the range of the closest dated object at Index = ",
203203
paste(which(diffs < stepsize), collapse = ", "), "). For information see documentation of get.step.sequence().", sep = ""))
204204
}

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,32 @@ Converting date ranges into dating 'steps' eases the visualization of changes in
1111

1212
A rather common problem in archaeology is the fuzzyness of dates assigned to objects. If one wants to visualize overall changes in - let's say - pottery consumption, bar charts often fall short in that regard. If, e.g., the Phases a -- f are employed, then some of the objects can usually be dated to a, c, and f, as an example, but others will by classified as "a to c" or "b to c". But how can these data still be used for examining changes in a large set of objects without completely disregarding the information added by providing multiple phases for one object?
1313

14-
This package proposes a method to prepare archaeological data for the visualization using density plots. An example is shown in /vignettes/. Density plots are easy to understand and are usually aesthetically pleasing. They do omit a some information, such as individual counts, that bar histograms can communicate better. On the other hand, ranges can be incorporated into the visualization as well to regard the variety of timespans archaeological objects may be dated to.
14+
This package proposes implements the concepts of aoristic analysis to prepare archaeological data for the visualization using density plots. An example is shown in the vignettes, which can be found at
1515

16-
I imagine this to be mostly useful for surveys and other analysis aimed at the longue duree.
16+
browseVignettes("datplot")
17+
18+
after installing the package, or on GitHub in the /vignettes/ directory. Density plots are easy to understand and are usually aesthetically pleasing. They do omit a some information, such as individual counts, that bar histograms can communicate better. On the other hand, ranges can be incorporated into the visualization as well to regard the variety of timespans archaeological objects may be dated to.
19+
20+
I imagine this to be mostly useful for surveys and other analysis aimed at the longue duree. The package has been published along with a case study on the Inscriptions of Bithynia, which are now included as a Data object in the datplot-package itself, in (citation).
1721

1822
![Attic Pottery from BAPD by Date](inst/extdata/demo_readme.png "Attic Pottery from BAPD by Date")
1923

20-
Installation
21-
-------
22-
'datplot' can be installed from GitHub directly with devtools:
2324

24-
devtools::install_github("lsteinmann/datplot")
2525

2626
Recommendation
2727
-------
28-
People interested in employing this method should also consider taking a look at [ISAAKiel's package aoristAAR](https://github.com/ISAAKiel/aoristAAR/).
28+
People interested in employing this method should also consider taking a look at [ISAAKiel's package aoristAAR](https://github.com/ISAAKiel/aoristAAR/), or at [archSeries](github.com/davidcorton/archSeries), [tabula](github.com/nfrerebeau/tabula/) and [rtefact](github.com/ahb108/rtefact).
29+
2930

3031
Installation
3132
-------
32-
'datplot' can be installed from GitHub directly with devtools:
33+
'datplot' is not currently on CRAN. It can be installed from GitHub with devtools:
3334

3435
devtools::install_github("lsteinmann/datplot")
3536

36-
Recommendation
37-
-------
38-
People interested in employing this method should also consider taking a look at [ISAAKiel's package aoristAAR](https://github.com/ISAAKiel/aoristAAR/).
37+
Or via downloading the latest release and installing from the file:
38+
39+
install_local(path = "../datplot_0.2.4.tar.gz")
3940

4041
Contact
4142
-------

data-raw/Inscr_Bithynia.R

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,17 @@ join_dating <- rbind(join_dating, num_dating[!is.na(num_dating$DAT_min),])
129129
num_dating <- num_dating[which(is.na(num_dating$DAT_min)),]
130130
unique(num_dating$Dating)[1:20]
131131

132+
join_dating$DAT_min[which(join_dating$DAT_min == 0)] <- 1
133+
join_dating$DAT_max[which(join_dating$DAT_max == 0)] <- -1
134+
135+
132136
#write.csv(num_dating, file = "num_dating.csv", fileEncoding = "UTF-8")
133137
num_dating <- read.csv(file = system.file('extdata', 'num_dating_edit.csv', package = 'datplot', mustWork = TRUE),
134138
encoding = "UTF-8",
135139
row.names = 1,
136140
colClasses = c("character", "character", "integer", "integer"))
137141

142+
138143
join_dating <- join_dating %>%
139144
mutate(DAT_min = as.integer(DAT_min),
140145
DAT_max = as.integer(DAT_max)) %>%
@@ -174,4 +179,7 @@ attr(inscriptions$DAT_max, "descr") <- "uppper border of the dating timespan"
174179

175180
Inscr_Bithynia <- inscriptions
176181

182+
#inscriptions[which(inscriptions$DAT_min == 0),c(1,2,4,5,8,9)]
183+
#inscriptions[which(inscriptions$DAT_max == 0),c(1,2,4,5,8,9)]
184+
177185
usethis::use_data(Inscr_Bithynia, overwrite = TRUE)

data/Inscr_Bithynia.rda

3 Bytes
Binary file not shown.

inst/extdata/num_dating_edit.csv

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@
22
1,end of the 2nd c. AD,180,199
33
2,end of 1st c. BC – beg. of 1st c. AD,-20,20
44
3,end 2nd c. BC,-120,-100
5-
4,early 1st c. AD,0,20
6-
7,after 212 AD,212,250
5+
4,early 1st c. AD,1,20
6+
7,after 212 AD,212,222
77
8,AD 531,531,531
88
10,5th/6th century AD,400,599
99
14,3rd/4th century AD,200,399
1010
19,2nd – 3rd c. AD,100,299
11-
20,2nd – 1st c. BC,-199,0
12-
27,1st – beg. of the 2nd c. AD,0,120
13-
28,1st – 2nd c. AD,0,199
11+
20,2nd – 1st c. BC,-199,-1
12+
27,1st – beg. of the 2nd c. AD,1,120
13+
28,1st – 2nd c. AD,1,199
1414
35,2nd century AD,100,199
1515
38,late 3rd – early 2nd c. BC,-220,-180
1616
43,5th – 6th c. AD,400,599
1717
50,3rd quarter of the 6th c. BC,-550,-525
1818
51,3rd – 2nd c. BC,-299,-100
1919
52,340/339 BC,-340,-339
2020
54,27 BC–14 AD,-27,14
21-
56,1st century AD,0,99
21+
56,1st century AD,1,99
2222
57,1st c. BC – 1st c. AD,-99,99
2323
60,middle 2nd c. AD,140,160
2424
61,end of the 3rd c. AD,280,299
@@ -33,19 +33,19 @@
3333
84,end of the 2nd - end of the 4th century AD,180,380
3434
87,2nd century BC,-199,-100
3535
88,2nd century AD ,100,199
36-
89,1st/2nd century AD,0,199
36+
89,1st/2nd century AD,1,199
3737
92,mid. 2nd c. AD,140,160
3838
93,mid. 1st c. AD,40,60
3939
94,late 2nd c. AD,180,199
4040
95,end of the 1st c. AD,80,99
4141
96,AD 123,123,123
42-
100,1st - 3rd century AD,0,299
42+
100,1st - 3rd century AD,1,299
4343
102,2nd/3rd century AD or 4th - 5th century AD ,100,499
4444
104,mid. 3rd c. AD,240,260
4545
105,late 3rd century AD,280,299
4646
106,late 2nd century AD,180,199
4747
107,end of the 2nd/beg. of the 3rd century AD,180,220
48-
108,after 98 AD,98,120
48+
108,after 98 AD,98,108
4949
111,AD 209,209,209
5050
113,6th century AD,500,599
5151
114,5th - 6th century AD,400,599
@@ -58,18 +58,18 @@
5858
147,beg. of the 3rd c. AD,200,220
5959
148,beg. of the 2nd c. AD,100,120
6060
149,after ca. 70–79 AD,70,79
61-
150,after 128 AD,128,150
61+
150,after 128 AD,128,138
6262
152,AD 243/244,243,244
6363
154,97/98–98/99 AD,97,99
6464
158,5th/4th century BC,-499,-300
6565
160,4th – 5th c. AD,300,499
6666
168,2nd/3rd century AD ,100,299
6767
169,2nd half of the 2nd c. AD,150,199
6868
170,2nd – 3rd C. AD,100,299
69-
183,1st century BC,-99,0
69+
183,1st century BC,-99,-1
7070
200,102–114,102,114
7171
201,early 3rd century AD,200,220
72-
203,after 138 AD,138,150
72+
203,after 138 AD,138,148
7373
207,3rd/4th century AD (or later),200,450
7474
208,3rd or 4th century AD,200,399
7575
209,3rd c. AD or before,180,299
@@ -80,21 +80,21 @@
8080
234,122/123–126/127 AD,122,127
8181
237,early 3rd c. AD,200,220
8282
238,ca. 2nd century AD,100,199
83-
239,before 212 AD,200,212
84-
240,before 211 AD,200,211
85-
241,after 202 AD,202,250
83+
239,before 212 AD,202,212
84+
240,before 211 AD,201,211
85+
241,after 202 AD,202,212
8686
259,mid – end of 3rd c. AD,240,299
8787
263,281 or 190 BC,-281,-190
8888
270,AD 288/289,288,289
8989
271,mid – end of 2nd c. AD,140,199
9090
272,late 2nd century AD ,180,199
9191
273,end of the 2nd – 3rd c. AD,180,299
9292
274,beg. of the 2nd c. BC,-200,-180
93-
275,"after 171 BC, ca. 188 BC",-188,-171
93+
275,"after 171 BC, ca. 188 BC",-188,-161
9494
279,7th century AD,600,699
9595
281,5th – 6th C AD,400,599
9696
283,4th – 6th c. AD,300,599
9797
284,3rd c. AD (after 211 AD),211,299
98-
285,1st – early 2nd c. AD,0,120
98+
285,1st – early 2nd c. AD,1,120
9999
288,123–131/132 AD,123,132
100100
289,AD 140,140,140

inst/extdata/periods_edit.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
11,Hellenistic period,-336,-74
1313
12,Early Roman period,-74,-31
1414
13,Chr.–Byz.,100,799
15-
14,AD,0,799
15+
14,AD,1,799
1616
15,Christian,300,799
1717
16,Antonine or Severan,96,235
1818
17,Roman period,-74,395

inst/extdata/periods_edit_AD.csv

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
,Dating,DAT_min,DAT_max
2-
1,Roman Imp. period,0,395
3-
6,Early/Middle Roman Imp. p.,0,192
4-
7,Early Roman Imp. period,0,69
5-
10,Roman Imperial period,0,395
6-
26,Roman Imp. period ,0,395
2+
1,Roman Imp. period,1,395
3+
6,Early/Middle Roman Imp. p.,1,192
4+
7,Early Roman Imp. period,1,69
5+
10,Roman Imperial period,1,395
6+
26,Roman Imp. period ,1,395

0 commit comments

Comments
 (0)