This is the complete workflow of the paper “Cardillo, M A Venzi Zanazzi and F Borella.2024. Archaeological record of historical–modern intertidal Octopus fishers of coastal North Patagonia, Argentina. The Journal of Island and Coastal Archaeology, 1-18. https://www.tandfonline.com/doi/abs/10.1080/15564894.2024.2349296
This study is the first exploration of the archaeological record associated with artisanal Octopus fishing along the San MatÃas Gulf west coast in RÃo Negro province, Argentina, during historical times.
#R packages
library(geoR)
## --------------------------------------------------------------
## Analysis of Geostatistical Data
## For an Introduction to geoR go to http://www.leg.ufpr.br/geoR
## geoR version 1.9-4 (built on 2024-02-14) is now loaded
## --------------------------------------------------------------
library(spatstat)
## Loading required package: spatstat.data
## Loading required package: spatstat.geom
## spatstat.geom 3.2-8
## Loading required package: spatstat.random
## spatstat.random 3.2-2
## Loading required package: spatstat.explore
## Loading required package: nlme
## spatstat.explore 3.2-6
## Loading required package: spatstat.model
## Loading required package: rpart
## spatstat.model 3.2-10
## Loading required package: spatstat.linnet
## spatstat.linnet 3.1-4
##
## spatstat 3.0-7
## For an introduction to spatstat, type 'beginner'
library(sp)
library(maptools)
## Please note that 'maptools' will be retired during October 2023,
## plan transition at your earliest convenience (see
## https://r-spatial.org/r/2023/05/15/evolution4.html and earlier blogs
## for guidance);some functionality will be moved to 'sp'.
## Checking rgeos availability: TRUE
##
## Attaching package: 'maptools'
## The following object is masked from 'package:sp':
##
## sp2Mondrian
library(dplyr)
## Warning: package 'dplyr' was built under R version 4.3.3
##
## Attaching package: 'dplyr'
## The following object is masked from 'package:nlme':
##
## collapse
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(ggmap)
## Loading required package: ggplot2
## ℹ Google's Terms of Service: <https://mapsplatform.google.com>
## Stadia Maps' Terms of Service: <https://stadiamaps.com/terms-of-service/>
## OpenStreetMap's Tile Usage Policy: <https://operations.osmfoundation.org/policies/tiles/>
## ℹ Please cite ggmap if you use it! Use `citation("ggmap")` for details.
library(ggplot2)
library(sf)
## Linking to GEOS 3.11.2, GDAL 3.7.2, PROJ 9.3.0; sf_use_s2() is TRUE
library(tidyr)
## base map
map<-get_googlemap(center = c(Longitude =-65.055979, Latitude = -41.439486),maptype = "satellite", zoom=15)
## ℹ <https://maps.googleapis.com/maps/api/staticmap?center=-41.439486,-65.055979&zoom=15&size=640x640&scale=2&maptype=satellite&key=xxx-0>
#Survereyed site
Site <- data.frame(lon = -65.055819, lat = -41.439482)
ggmap(map) +
geom_point(data = Site, aes(x = lon, y = lat), color = "red", size = 5)
#Spatial analysis using Spatstat
#read. coordinates
cords<-read.table("Cord.txt",T)# spatial coordinates
plot(cords)
#read polygon
tkm <- getKMLcoordinates("SA.kml", ignoreAltitude=T)
## Warning: Code moved to https://github.com/rsbivand/spkml - seeking maintainer
## https://github.com/r-spatial/evolution/issues/6
##jitter redundant coordinates
jitcords <- jitterDupCoords(cords, max=0.00001)
##get point patterns object
complete_pp<- ppp(jitcords$Long,jitcords$Lat, poly=tkm)
plot(complete_pp, cex=0.5)
##plot densities for entire dataset
plot(density(complete_pp, sigma=0.00002), box=F)
den=density(complete_pp, sigma=0.00002)
#Descriptive statistics of the datasets
Artype=read.table("Artype.txt", header=T)
a=Artype
##barplot
a$Artifact <- reorder(a$Artifact, a$Percent)
ar_type <- ggplot(a) +
geom_col(aes(Percent, Artifact), col = "blue", width = 0.6) +
labs(title = "Artifact percent",
x = "Percent",
y = "Artifact type")
ar_type
# Table by material type and conservation status
data <- read.table("Material.txt", header = TRUE)
# Reshape to long format
data_long <- gather(data, key = "Condition", value = "Count", -Material)
data_long
##barplot by material integrity cand conservation
ar_type <- ggplot(data_long, aes(x = Material, y = Count, fill = Condition)) +
geom_bar(stat = "identity", position = "dodge", width = 0.8) +
labs(title = "Percentage of materials by their condition",
x = "Material",
y = "Count")
# Mostrar el gráfico
print(ar_type)
Curated and published: Marcelo Cardillo. IMHICIHU-CONICET-UBA