tesselle / tabula

:bar_chart: Analysis and Visualization of Archaeological Count Data
https://packages.tesselle.org/tabula/
GNU General Public License v3.0
35 stars 5 forks source link

Assemblage diversity size comparison #9

Closed jayrobwilliams closed 4 years ago

jayrobwilliams commented 5 years ago

I've written an R function to calculate diversity of simulated assemblages and compare the diversity of actual assemblages to the distribution of diversities of simulations. Essentially, it implements the methods in Kintigh, 1984 and Kintigh, 1989 in R. It looks like it wouldn't take too much effort for me to rewrite the code to do the simulations from the matrix classes provided by tabula and use tabula's diversity functions for comparison. Would you have any interest in my adapting the code for this and submitting a PR?

Kintigh, K. (1984). Measuring Archaeological Diversity by Comparison with Simulated Assemblages. American Antiquity, 49(1), 44-54. doi:10.2307/280511

Kintigh, K. (1989). Sample size, significance, and measures of diversity. In R. D. Leonard, & G. T. Jones (Eds.), Quantifying diversity in archaeology (pp. 25-36). Cambridge University Press.

nfrerebeau commented 5 years ago

This idea has been in my head for some time, but I haven't had time to fully implement it. Feel free if you want to submit a PR (please create a Git branch for your PR), I'll see how to merge your code with the draft I have on my side.

jayrobwilliams commented 5 years ago

Cool. I'll take a crack at adapting my code and submit a PR hopefully in the next week or two.

nfrerebeau commented 4 years ago

I had some time this week to implement the methods proposed by Kintigh. @jayrobwilliams let me know if that's what you had in mind. I will add the visualization methods that go with it by Friday.

jayrobwilliams commented 4 years ago

Looks awesome! Classes/methods are still a little above my level, so I'm not sure I'd be able to tackle visualization functions on my own, but they shouldn't take too much work for you to implement.