Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Kverostick committed Jan 8, 2025
1 parent e52c1a9 commit 716d5f5
Show file tree
Hide file tree
Showing 9 changed files with 127 additions and 84 deletions.
Binary file modified .DS_Store
Binary file not shown.
12 changes: 9 additions & 3 deletions README.html
Original file line number Diff line number Diff line change
Expand Up @@ -354,15 +354,20 @@

<div id="forensicisotissues" class="section level1">
<h1>ForensicIsoTissues</h1>
<p>Data and scripts for forensic body tissue isotope literature
review.</p>
<p>Data and scripts for forensic body tissue isotope compilation and
data review titled “Human Tissue Oxygen and Strontium Isotope Values in
North America: A Data Compilation and Assessment for Forensic
Geolocation.”</p>
<div id="data" class="section level2">
<h2>data/</h2>
<p>Data used in analyses.</p>
<ul>
<li><strong>FIT_Dataset.xlsx</strong> Compiled Dataset of
δ<sup>18</sup>O data and <sup>87</sup>Sr/<sup>86</sup>Sr isotopic data
from human tissues in North America.</li>
<li><strong>RefIDsRefNo.xlsx</strong> Spreadsheet to used to integrate
references citations numbers with Reference.IDs in the complied
dataset.</li>
</ul>
</div>
<div id="code" class="section level2">
Expand All @@ -384,7 +389,8 @@ <h2>shapefiles/</h2>
</div>
<div id="figures" class="section level2">
<h2>figures/</h2>
<p>Figures and figure components included in the main manuscript.</p>
<p>Out bound folder for figures and figure components generated in the
script.</p>
</div>
</div>

Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
# ForensicIsoTissues
Data and scripts for forensic body tissue isotope literature review.
Data and scripts for forensic body tissue isotope compilation and data review titled "Human Tissue Oxygen and Strontium Isotope Values in North America: A Data Compilation and Assessment for Forensic Geolocation."

## data/
Data used in analyses.

- **FIT_Dataset.xlsx** Compiled Dataset of &delta;<sup>18</sup>O data and <sup>87</sup>Sr/<sup>86</sup>Sr isotopic data from human tissues in North America.
- **RefIDsRefNo.xlsx** Spreadsheet to used to integrate references citations numbers with Reference.IDs in the complied dataset.

## code/
Scripts used for data analysis and plotting.

- **FITDataSetup.R** Load data and set up for analysis. Includes some descriptive statistics.
- **FITMapping.R** Create maps of spatial distribution of data.
- **FITTapiso.R** Analyze data using isoscapes and statisics. Includes code for generation of figures.
- **FITMapping.R** Create maps of spatial distribution of data for hair and tooth enamel isotopic values.
- **FITTapiso.R** Analyze data using isoscapes and statistics. Includes code for generation of figures.

## shapefiles/
Includes all shapefiles and geospatial data required for running analyses.
Includes all shapefiles and geospatial data required for running analyses that are not pulled from other R packages.

## figures/
Out bound folder for figures and figure components generated in the script.
12 changes: 6 additions & 6 deletions code/FITDataSetup.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
library(readxl);library(dplyr)

#Read in dataset from data file from Github and merge sheets together
#Read in dataset xlsx from data file from GitHub and merge sheets together
FData1 <-read_excel("data/FIT_Dataset.xlsx", sheet = "Individual")
FData2 <-read_excel("data/FIT_Dataset.xlsx", sheet = "Site")
FData3 <-read_excel("data/FIT_Dataset.xlsx", sheet = "Sample")
Expand All @@ -11,10 +11,10 @@ Comp3 <-merge(Comp2,FData4,by= "Sample.ID")
#convert lat and long to numeric
Comp3$Lat= as.numeric(Comp3$Lat)
Comp3$Lon= as.numeric(Comp3$Lon)
#Select needed data columns
#Select needed data columns, this makes data easier to read and visualize
ForensicTisIsoData <-select(Comp3,1:3,5:15,17:21,24:29,30,32:34)
rm( FData1, FData2, FData3, FData4, Comp1, Comp2, Comp3)
#Get rid of NA in Lat and Lon
#Get rid of NAs in Lat and Lon
ForensicTisIsoData =ForensicTisIsoData[!is.na(ForensicTisIsoData$Lat),]
FTID <-ForensicTisIsoData

Expand Down Expand Up @@ -53,10 +53,10 @@ summstats4 <- FTID %>%

#Remove cities routinely dropped from isoscapes
FTID<- subset(FTID, City!="Tofino" & City!="Honolulu")
#subset and remove fingernail and bone data
#Subset data and remove fingernail and bone data
FTID <- subset(FTID, Element=="hair"|Element=="teeth")
#Make sure not duplicates have snuck in
#Make sure there are no duplicates
FTID<- FTID[!duplicated(FTID$Data.ID), ]
#Write data to csv to run FITMapping and FITTapiso
#Write data to csv to run FITMapping and FITTapiso, or run it from the FTID dataframe
write.csv(FTID, file="data/ForensicTissue.csv")

40 changes: 18 additions & 22 deletions code/FITMapping.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,89 +13,85 @@ NorAmericamap <-vect("shapefiles/Namap_aea.shp")
FTID2 = vect(FTID, geom = c("Lon", "Lat"), crs = "WGS84")
FTID2 = terra::project(FTID2, crs(NorAmericamap))

#Map, distribution of oxygen hair (known and assumed)
#Create Map, distribution of oxygen hair (known and assumed)
ggplot() +
geom_sf(data = NorAmericamap) +
geom_spatvector(data = subset(FTID2, FTID2$Isotope=="d18O" & FTID2$Element=="hair" & FTID2$Data.Origin == "known"),
aes(color = "Known")) +
geom_spatvector(data = subset(FTID2, FTID2$Isotope=="d18O" & FTID2$Element=="hair" & FTID2$Data.Origin == "known"),
color = "black", shape = 1, size = 2) +
color = "black", shape = 1, size = 2.5) +
geom_spatvector(data = subset(FTID2, FTID2$Isotope=="d18O" & FTID2$Element=="hair" & FTID2$Data.Origin == "assumed"),
aes(color = "Assumed")) +
geom_spatvector(data = subset(FTID2, FTID2$Isotope=="d18O" & FTID2$Element=="hair" & FTID2$Data.Origin == "assumed"),
color= "black", shape = 1, size = 2) +
color= "black", shape = 1, size = 2.5) +
scale_color_manual(name = "Legend",
values = c(Known ="#7AD151FF", Assumed = "#414788FF")) +
labs(title = ("Oxygen Hair Samples"))+
theme_void() +
theme(legend.box.background = element_rect(),legend.text = element_text(color = 'black'),
legend.title = element_text(color = 'black'),
legend.box.margin=margin(5,5,5,5),
legend.position = c(0.15, 0), legend.justification = c(0, 0))
ggsave("figures/Map_hairoxygen.png")
ggsave("figures/Figure1B.png")


#Map, distribution of strontium hair (known and assumed)
#Create Map, distribution of strontium hair (known and assumed)
ggplot() +
geom_sf(data = NorAmericamap) +
geom_spatvector(data = subset(FTID2, FTID2$Isotope=="87Sr/86Sr" & FTID2$Element=="hair" & FTID2$Data.Origin == "known"),
aes(color = "Known"), shape = 15, size=2) +
geom_spatvector(data = subset(FTID2, FTID2$Isotope=="87Sr/86Sr" & FTID2$Element=="hair" & FTID2$Data.Origin == "known"),
color = "black", shape = 0, size = 2)+
color = "black", shape = 0, size = 2.5)+
geom_spatvector(data = subset(FTID2, FTID2$Isotope=="87Sr/86Sr" & FTID2$Element=="hair" & FTID2$Data.Origin == "assumed"),
aes( color = "Assumed"), shape = 15, size=2) +
aes( color = "Assumed"), shape = 15, size=2.5) +
geom_spatvector(data = subset(FTID2, FTID2$Isotope=="87Sr/86Sr" & FTID2$Element=="hair" & FTID2$Data.Origin == "assumed"),
color = "black", shape = 0, size = 2)+
scale_color_manual(name = "Legend",
values = c(Known= "#7AD151FF", Assumed = "#414788FF")) +
labs(title = "Strontium Hair Samples") +
theme_void() +
theme(legend.box.background=element_rect(),legend.text = element_text(color = 'black'),
legend.title = element_text(color = 'black'),
legend.box.margin=margin(5,5,5,5),
legend.position = c(0.15, 0),legend.justification = c(0, 0))
ggsave("figures/Map_KASrhair.png")
ggsave("figures/Figure1A.png")


#Map, distribution of oxygen tooth enamel (known and assumed)
#Create Map, distribution of oxygen tooth enamel (known and assumed)
ggplot() +
geom_sf(data = NorAmericamap)+
geom_spatvector(data = subset(FTID2, FTID2$Isotope=="d18O" & FTID2$Element=="teeth" & FTID2$Data.Origin == "known"),
aes( color = "Known")) +
geom_spatvector(data = subset(FTID2, FTID2$Isotope=="d18O" & FTID2$Element=="teeth" & FTID2$Data.Origin == "known"),
color = "black", shape = 1, size = 2) +
color = "black", shape = 1, size = 2.5) +
geom_spatvector(data = subset(FTID2, FTID2$Isotope=="d18O" & FTID2$Element=="teeth" & FTID2$Data.Origin == "assumed"),
aes( color = "Assumed")) +
geom_spatvector(data = subset(FTID2, FTID2$Isotope=="d18O" & FTID2$Element=="teeth" & FTID2$Data.Origin == "assumed"),
color= "black", shape = 1, size = 2) +
color= "black", shape = 1, size = 2.5) +
scale_color_manual(name = "Legend",
values = c(Known= "#7AD151FF", Assumed = "#414788FF")) +
labs(title = "Oxygen Teeth Samples") +
theme_void() +
theme(legend.box.background=element_rect(),
legend.box.margin=margin(5,5,5,5),
legend.position = c(0.15, 0),legend.justification = c(0, 0))
ggsave("figures/Map_KAoxygenteeth.png")
ggsave("figures/Figure1D.png")

#Map, distribution of strontium tooth enamel (known and assumed)
#CreateMap, distribution of strontium tooth enamel (known and assumed)
ggplot() +
geom_sf(data = NorAmericamap)+
geom_spatvector(data = subset(FTID2, FTID2$Isotope=="87Sr/86Sr" & FTID2$Element=="teeth" & FTID2$Data.Origin == "known"),
aes(color = "Known"), shape = 15, size=2) +
aes(color = "Known"), shape = 15, size=2.5) +
geom_spatvector(data = subset(FTID2, FTID2$Isotope=="87Sr/86Sr" & FTID2$Element=="teeth" & FTID2$Data.Origin == "known"),
color = "black", shape = 0, size = 2)+
color = "black", shape = 0, size = 2.5)+
geom_spatvector(data = subset(FTID2, FTID2$Isotope=="87Sr/86Sr" & FTID2$Element=="teeth" & FTID2$Data.Origin == "assumed"),
aes( color = "Assumed"), shape = 15, size=2) +
aes( color = "Assumed"), shape = 15, size=2.5) +
geom_spatvector(data = subset(FTID2, FTID2$Isotope=="87Sr/86Sr" & FTID2$Element=="teeth" & FTID2$Data.Origin == "assumed"),
color = "black", shape = 0, size = 2)+
color = "black", shape = 0, size = 2.5)+
scale_color_manual(name = "Legend",
values = c(Known= "#7AD151FF", Assumed = "#414788FF")) +
labs(title = "Strontium Teeth Samples") +
theme_void() +
theme(legend.box.background=element_rect(),
legend.box.margin=margin(5,5,5,5),
legend.position = c(0.15, 0),legend.justification = c(0, 0))
ggsave("figures/Map_KASrteeth.png")
ggsave("figures/Figure1C.png")



Expand Down
Loading

0 comments on commit 716d5f5

Please sign in to comment.