-
Notifications
You must be signed in to change notification settings - Fork 6
Interactive Graphics for ChemoSpec
ChemoSpec
is an R
package for analyzing spectroscopic data using exploratory data analysis, a branch of chemometrics. Spectroscopic data arises mostly in chemical but also physical contexts. Chemometrics is the application of statistical methods to analyze chemical data. For this project you don't really need to know anything about spectroscopy or chemometrics. You can learn more about ChemoSpec
here.
ChemoSpec
uses base graphics with one exception in which lattice
graphics are used, and another instance in which the D3.js JavaScript library is used. The base graphics system of R
produces very nice, publication quality graphics (at least under the right conditions), though customizing base graphics requires a lot lines of code. When ChemoSpec
was originally written, none of the interactive graphics systems developed in the past 10 years either existed or was mature. Most of these newer graphic systems provide higher level interfaces that "just work" meaning fewer lines of code are needed, compared to base graphics.
The goal of this project is to create an additional interactive graphics system for ChemoSpec
. Users will be able to choose the type of graphics output. The current plan is to create ggplot2
graphics which will then be then fed into plotly
.
ChemoSpec
has a large international user base. Interactive graphics will modernize this aspect of the package and improve the user experience. Students participating in this project will have an opportunity to learn more about R
graphics and improve their coding skills.
- MENTOR (EVALUATING): Bryan Hanson [email protected] is the author of
ChemoSpec
as well as a number of otherR
packages (Link). Bryan has been working withR
for more than 10 years, primarily in the area of spectroscopy and chemometrics. He has participated in GSOC in 2020, 2016 and 2013, each time with theR
project. - MENTOR: Erick Oduniyi [email protected] was a student participant in GSOC in 2020, working on the
hyperSpec
package. In addition to his knowledge base developed in GSOC, Erick brings a broad interdisciplinary background to the project.
Students, please e-mail both mentors after completing at least one of the tests below, which are designed to showcase your R
coding skills and knowledge of the R
ecosystem. Complete each task in order please.
- Easy: Download and install
ChemoSpec
, and take a look at the vignette to get an idea of what it does. Run the example forplotSpectra
, except use theSrE.IR
data set and plot only the pure Serenoa repens extract samples. Offset the spectra so that they display without overlapping. - Medium: Take a look at the code for function
plotSpectra
. Write a modified version that only plots a single spectrum using the same base graphics approach, for simplicity. Call your functionplotSpectra2
. Be sure to update the documentation for the function. Demonstrate your new function using theSrE.IR
data set. - Medium-Hard (hard if you need to learn
ggplot2
basics): Write another version of your function that creates the plot usingggplot2
. Call itplotSpectra3
. Try to get all the features present in the base graphics version but using typicalggplot2
approaches. Don't get stuck if you are unclear about certain features, just omit them (and feel free to ask). - Medium: Modify your
ggplot2
version to pass the object toplotly
. Call itplotSpectra4
. - Medium: Dig into the code for function
plotScores
. Write out, in order, the otherChemoSpec
functions thatplotScores
calls in order to create a plot. Describe each call's purpose with a short phrase. This list (sequence) would be the steps that need to be re-created with a different graphics system. Whichggplot2
geoms will be needed at each step? Put your results in a table.
Students, please post links your test solutions here. Be sure to e-mail both mentors when you post or update your solutions.
S No. | STUDENT NAME | GITHUB PROFILE | TEST RESULTS LINK |
---|---|---|---|
1 | Tejasvi Gupta | GitHub Profile | Test Results |