From 99e9f63e5ae807c743b357e143aa08c489521fbd Mon Sep 17 00:00:00 2001 From: vanesm Date: Wed, 6 Nov 2024 11:41:30 -0500 Subject: [PATCH 1/2] prepared combined libs/pixl data for graphing on line plot --- .../Assignment05/MatchingLIBSandPIXL.Rmd | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/StudentNotebooks/Assignment05/MatchingLIBSandPIXL.Rmd b/StudentNotebooks/Assignment05/MatchingLIBSandPIXL.Rmd index 2baafb8..7ac4ad6 100644 --- a/StudentNotebooks/Assignment05/MatchingLIBSandPIXL.Rmd +++ b/StudentNotebooks/Assignment05/MatchingLIBSandPIXL.Rmd @@ -166,6 +166,8 @@ Novarupta<-libstargets.df[libstargets.df$nearestpixl=="Novarupta",]$target UganikIsland<-libstargets.df[libstargets.df$nearestpixl=="UganikIsland",]$target ``` + +### Ternary Diagram ```{r} meters=100 @@ -210,3 +212,59 @@ ggtern(libs.tern, ggtern::aes(x=x,y=y,z=z)) + guides(alpha="none") ``` + +### Line plot + +```{r} +meters=100 + +included.libs<-(libstargets.df%>% + filter(Distance% + filter(target %in% included.libs) + +libs.matrix <- libs.matrix[,c(5,7:14)] + +libs.matrix<-libs.matrix[,c(1:2,4:9,3)] + +libs.matrix<-cbind("Abrasion"=0,libs.matrix) + +libs.matrix<-libs.matrix%>% + mutate(Abrasion = ifelse(target%in%Alfalfa,"Alfalfa", + ifelse(target %in% Bellegrade, "Belegrade", + ifelse(target %in% BerryHollow, "BerryHollow", + ifelse(target %in% Dourbes, "Dourbes", + ifelse(target %in% Novarupta, "Novarupta", + ifelse(target %in% Quartier, "Quartier", + ifelse(target %in% ThorntonGap, "ThorntonGap", + ifelse(target %in% UganikIsland, "UganikIsland",Abrasion))))))))) + +libs.matrix<-cbind(libsorpixl=1,libs.matrix) +``` + + +```{r, data03} +#read in pixl data with lat/long +pixl.df<-readRDS("/academics/MATP-4910-F24/DAR-Mars-F24/StudentData/pixl_sol_coordinates.Rds") + +pixl.df<-pixl.df %>% + select(c(5:8,12:14,17,19,18,22)) + +#reorder pixl columns so that it matches libs data organization +pixl.df<-pixl.df[,c(11,10,4,3,8,2,6,1,5,7)] + +#remove atmospheric sample +pixl.df<-pixl.df[2:16,] + +pixl.df<-cbind(libsorpixl=0,pixl.df) +``` + +```{r} +colnames(pixl.df)<-colnames(libs.matrix) +pixllibs.df<-rbind(pixl.df,libs.matrix) +``` + + + From fd2dfa30b3f9e74691ba3ef318f13796b6ac7fd3 Mon Sep 17 00:00:00 2001 From: vanesm Date: Thu, 7 Nov 2024 13:12:22 -0500 Subject: [PATCH 2/2] assignment 5 notebook --- .../Assignment05/vanesm-assignment5.Rmd | 24 +- .../Assignment05/vanesm-assignment5.html | 226 ++++++++++++++++-- .../Assignment05/vanesm-assignment5.pdf | Bin 381498 -> 419586 bytes 3 files changed, 216 insertions(+), 34 deletions(-) diff --git a/StudentNotebooks/Assignment05/vanesm-assignment5.Rmd b/StudentNotebooks/Assignment05/vanesm-assignment5.Rmd index 61ed04f..a95b12a 100644 --- a/StudentNotebooks/Assignment05/vanesm-assignment5.Rmd +++ b/StudentNotebooks/Assignment05/vanesm-assignment5.Rmd @@ -1,12 +1,12 @@ --- -title: "DAR F24 Project Status Notebook Template" +title: "DAR F24 Project Status Notebook" author: "Margo VanEsselstyn" date: "`r Sys.Date()`" output: - pdf_document: - toc: yes html_document: toc: yes + pdf_document: + toc: yes subtitle: "DAR Mars" --- ```{r setup, include=FALSE} @@ -88,6 +88,7 @@ knitr::opts_chunk$set(echo = TRUE) * Project Name: Mars * I updated the LIBS and PIXL combined data, categorized the LIBS data, and attempted to display the LIBS scct targets on a ternary diagram. * I committed an updated version of the combined LIBS and PIXL data as well as a categorized LIBS data Rmd file +* I worked on the MatchingLIBSandPIXL.Rmd with Charlotte Peterson, a file that outlines all of our efforts in matching the PIXL and LIBS datasets ## Analysis: Question 1 (LIBS Target Names) @@ -325,7 +326,7 @@ kable(kablelibstern) ``` ### Discussion of results -I don't have clear results because my graph is not very clear and is not labeled well. One thing I found interesting was that the points at the same scct target don't necessarily have the same value, they are very close, but not exactly the same, so there is some amount of error. +I don't have super clear results because my graph is not very clear and is not labeled well. ggrepel conflicts with ggtern, so I was struggling with making the labels spread more. One thing I found interesting was that the points at the same scct target don't necessarily have the same value, they are very close, but not exactly the same, so there is some amount of error. ## Analysis: Question 3 (Improving LIBS-PIXL combined data) @@ -381,15 +382,11 @@ Overall, our LIBS and PIXL matching is not perfect, and we need to continue to n ### Question being asked -_Provide in natural language a statement of what question you're trying to answer_ +Can we plot the LIBS data according to its nearest PIXL cluster (IMPROVED VERSION OF THIS IS IN MatchingLIBSandPIXl.Rmd) ### Data Preparation -_Provide in natural language a description of the data you are using for this analysis_ - -_Include a step-by-step description of how you prepare your data for analysis_ - -_If you're re-using dataframes prepared in another section, simply re-state what data you're using_ +I am using the LIBS data and PIXL data, with the features from the PIXL data removed ```{r, result04_data} # Include all data processing code (if necessary), clearly commented @@ -420,9 +417,7 @@ libs.df<-libs.df[libs.df$index %in% libsandpixl$index,] ### Analysis: Methods and results -_Describe in natural language a statement of the analysis you're trying to do_ - -_Provide clearly commented analysis code; include code for tables and figures!_ +We plot the LIBS data, colored with its nearby PIXL sample site ```{r, result05_analysis} libs.matrix <- as.matrix(libs.df[,7:14]) @@ -454,8 +449,7 @@ ggtern(libs.tern, ggtern::aes(x=x,y=y,z=z)) + ### Discussion of results -_Provide in natural language a clear discussion of your observations._ - +Overall, the LIBS data is very spread, probably in part because the distance range is very far for this graph. But it is interesting that certain PIXL locations line up with LIBS clusters, like the Uganik island data is clearly clustered together. ## Summary and next steps diff --git a/StudentNotebooks/Assignment05/vanesm-assignment5.html b/StudentNotebooks/Assignment05/vanesm-assignment5.html index ae09d24..29f9916 100644 --- a/StudentNotebooks/Assignment05/vanesm-assignment5.html +++ b/StudentNotebooks/Assignment05/vanesm-assignment5.html @@ -11,9 +11,9 @@ - + -DAR F24 Project Status Notebook Template +DAR F24 Project Status Notebook