-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
121 lines (89 loc) · 3.18 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# ConSciR
<!-- badges: start -->
<!-- badges: end -->
ConSciR is an R package designed to assist conservators, scientists and engineers by providing a toolkit for performing calculations and streamlining common tasks in cultural heritage conservation.
ConSciR is designed for and to be:
- Conservators working in museums, galleries, and heritage sites
- Conservation scientists, engineers and researchers
- Cultural heritage professionals involved in preventive conservation
- Students and educators in conservation and heritage science programs
- FAIR: Findable, Accessible, Interoperable, and Reusable
- Collaborative: allowing anyone to upload code, raise requests, report bugs, and add functionality to the package
If using R for the first time, read an article here: [Using R for the first time](https://bhavshah01.github.io/ConSciR/articles/ConSciR-FirstTimeR.html)
## Tools
- Humidity calculations, conservator tools, sustainability
- Mould growth models, damage functions
- Graphs: TRH plots, psychometric chart
- Tidying data: Meaco, Hanwell data
- Interactive Shiny applications
## Installation
You can install the development version of ConSciR from [GitHub](https://github.com/) with:
``` r
install.packages("pak")
pak::pak("BhavShah01/ConSciR")
```
-or-
``` r
# install.packages("devtools")
devtools::install_github("BhavShah01/ConSciR")
```
## Examples
This is a basic example of some commons tasks:
- Load packages
```{r packages, message=FALSE, warning=FALSE}
library(ConSciR)
library(dplyr)
library(ggplot2)
```
- Pre-loaded dataset is availabe for testing
```{r load_dataset, message=FALSE, warning=FALSE}
# My TRH data
head(mydata)
```
- Use functions, for example use the existing data to add dew point and absolute humidity. Performance metrics are also being added like lifetime multiplier, preservation index and mould calculations.
```{r add_calcs, message=FALSE, warning=FALSE}
# Peform calculations
head(mydata) |>
mutate(
DewP = calcDP(Temp, RH),
Abs = calcAH(Temp, RH),
LifeTime = calcLM(Temp, RH, EA = 100),
PI = calcPI(Temp, RH)
)
```
- Combine analysis with graphs
```{r graphTRH_DewPoint, message=FALSE, warning=FALSE, fig.alt="graphTRH"}
mydata |>
mutate(DewPoint = calcDP(Temp, RH)) |>
graph_TRH() +
geom_line(aes(Date, DewPoint), col = "purple") + # add dewpoint line in purple
theme_minimal()
```
- Conservator tools: for example estimate mould growth
```{r mould_risk, message=FALSE, warning=FALSE, fig.alt="mould"}
mydata |>
mutate(Mould = calcMould_Zeng(Temp, RH)) |>
ggplot() +
geom_line(aes(Date, RH), col = "blue") +
geom_line(aes(Date, Mould), col = "darkgreen", size = 1) +
labs(title = "Mould Growth Rate Limits",
y = "Humidity (blue) and Mould Limit (green)") +
theme_bw()
```
- Humidity functions: for example psychrometric chart
```{r psychart, message=FALSE, warning=FALSE, fig.alt="psych_chart"}
mydata |>
graph_psychrometric()
```