-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathREADME.Rmd
66 lines (51 loc) · 2.72 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
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# harp <img src='man/figures/harp_logo_dark.svg' align="right" width = "80" /></a>
## _A framework for meteorological data in R_
{_harp_} is a meta-package that attaches functionality from the [{_harpIO_}](https://harphub.github.io/harpIO), [{_harpPoint_}](https://harphub.github.io/harpPoint), [_{harpVis_}](https://harphub.github.io/harpVis) and [{_harpSpatial_}](https://harphub.github.io/harpSpatial) packages to your session.
## Installation
```{r eval=FALSE}
if (!require("remotes")) {
install.packages("remotes")
}
remotes::install_github("harphub/harp")
```
### System libraries
_harp_ packages use the [{_meteogrid_}](https://github.com/harphub/meteogrid) package for interpolation and the geogrid class for storing gridded data. This package makes use of the [PROJ](https://proj4.org) library for handling projections. If you do not have PROJ installed you can install with:
```{bash eval=FALSE}
sudo apt-get install libproj-dev
```
If you do not have sudo rights, try installing a user local version, or speak to your system administrator.
If you have the PROJ libraries installed in a standard location (e.g. /usr/local) {_meteogrid_} will install without problems. However, if the PROJ libraries are in a non standard location, you need to tell the install function where they are:
```{r eval=FALSE}
remotes::install_github(
"harphub/harp",
configure.args = c(
meteogrid = "--with-proj=/path/to/proj"
)
)
```
Alternatively you can set environment variables
```{bash eval=FALSE}
export PROJ4_DIR=/path/to/proj
```
If you include these environment variables in your .bashrc file, or equivalent, you won't need to worry about it when you wish to install an update to meteogrid.
Or you can set compiler and linker options in the file $HOME/.R/Makevars
```{bash eval=FALSE}
CPPFLAGS=-I/path/to/proj/include
LDFLAGS=-L/path/to/proj/lib -Wl,-rpath,/path/to/proj/lib
```
In this case you only have to set them once and not worry about it when you wish to install an update to {_meteogrid_}.
When setting environment variables or creating a Makevars file, R must be restarted for the changes to take effect before running `remotes::install_github("harphub/harp")`.
## Learning harp
Currently the best learning resource for getting started with harp is the [2022 training course website](https://harphub.github.io/harp-training-2022/) that includes a number of worked examples. There are plans to make an online book available in 2024 that will go into harp's functionalities in more detail.