Skip to content

Commit

Permalink
borders file too lagre, tthus removed
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiste committed Apr 7, 2024
1 parent a243157 commit 96e9b12
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 32 deletions.
4 changes: 3 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# tectonicr 0.2.97 _2024-04-07_

* `kernel_dispersion()` (former dispersion_gird()) explained in vignette E
* `'border'` sf dataset added to plot political borders on maps

# tectonicr 0.2.96 _2023-10-15_

* cran update

# tectonicr 0.2.95 _2023-10-15_

* bug fixes in `rose()` (e.g. symmetrical fans when axial data is plotted)
Expand Down
17 changes: 0 additions & 17 deletions R/plates.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,3 @@
#' #' data("gsrm2_plates")
#' #' head("gsrm2_plates")
#' "gsrm2_plates"

#' Borders
#'
#' Global political borders from `rnaturalearth`
#'
#' @docType data
#'
#' @usage data('borders')
#'
#' @format An object of class `sf`
#'
#' @keywords datasets
#'
#' @examples
#' data("borders")
#' head("borders")
"borders"
4 changes: 2 additions & 2 deletions data-raw/DATASET.R
Original file line number Diff line number Diff line change
Expand Up @@ -201,5 +201,5 @@ cpm_models <- rbind(
# ) #|> group_by(model)
usethis::use_data(cpm_models, overwrite = TRUE, ascii = TRUE)

borders <- rnaturalearth::ne_download(returnclass = "sf") |> sf::st_geometry()
usethis::use_data(borders, overwrite = TRUE, ascii = TRUE, compress = "xz")
# borders <- rnaturalearth::ne_download(returnclass = "sf") |> dplyr::select() |> sf::st_geometry()
# usethis::use_data(borders, overwrite = TRUE, ascii = F, compress = "xz",version = 3)
Binary file removed data/borders.rda
Binary file not shown.
7 changes: 0 additions & 7 deletions vignettes/B_datasets.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,7 @@ trajectories <- eulerpole_loxodromes(por, 40, cw = FALSE)
Then we initialize the plot `map`...

```{r plot1, echo=TRUE, warning=FALSE, message=FALSE}
data("borders")
map <- ggplot() +
geom_sf(data = borders, fill = "grey80") +
geom_sf(
data = plates,
color = "red",
Expand Down Expand Up @@ -332,10 +329,6 @@ axes(
col = cols, add = TRUE
)
# Plot political borders
plot(sf::st_geometry(borders), col = "lightgrey", lwd = 1, add = TRUE)
# Plot the plate boundary
plot(sf::st_geometry(plates), col = "red", lwd = 2, add = TRUE)
Expand Down
5 changes: 0 additions & 5 deletions vignettes/E_interpolation.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ library(ggplot2) # load ggplot library

```{r load_data}
data("san_andreas")
data("borders")
data("cpm_models")
por <- cpm_models |>
Expand All @@ -56,7 +55,6 @@ The data can now be visualized:
trajectories <- eulerpole_loxodromes(x = por, n = 40, cw = FALSE)
ggplot(mean_SH) +
geom_sf(data = borders, fill = "grey80") +
geom_sf(data = trajectories, lty = 2) +
geom_spoke(data = san_andreas, aes(lon, lat, angle = deg2rad(90 - azi)), radius = .5, color = "grey30", position = "center_spoke") +
geom_spoke(aes(lon, lat, angle = deg2rad(90 - azi), alpha = sd, color = mdr), radius = 1, position = "center_spoke", lwd = 1) +
Expand Down Expand Up @@ -86,7 +84,6 @@ mean_SH_PoR <- PoR_stress2grid(san_andreas, PoR = por, gridsize = 1, R_range = s

```{r plot2, warning=FALSE, message=FALSE}
ggplot(mean_SH_PoR) +
geom_sf(data = borders, fill = "grey80") +
geom_sf(data = trajectories, lty = 2) +
geom_spoke(data = san_andreas, aes(lon, lat, angle = deg2rad(90 - azi)), radius = .5, color = "grey30", position = "center_spoke") +
geom_spoke(aes(lon, lat, angle = deg2rad(90 - azi), alpha = sd, color = mdr), radius = 1, position = "center_spoke", lwd = 1) +
Expand Down Expand Up @@ -129,7 +126,6 @@ ggplot(mean_SH_PoR_reduced) +
max.radius = .7, normalize = FALSE
) +
scale_fill_viridis_c("Angular distance", limits = c(0, 1)) +
geom_sf(data = borders, color = "grey80", fill = NA) +
geom_sf(data = trajectories, lty = 2) +
geom_spoke(
aes(lon, lat, angle = deg2rad(90 - azi), alpha = sd),
Expand Down Expand Up @@ -167,7 +163,6 @@ ggplot(san_andreas_kdisp) +
max.radius = .7, normalize = FALSE
) +
scale_fill_viridis_c("Angular distance", limits = c(0, 1)) +
geom_sf(data = borders, color = "grey80", fill = NA) +
geom_sf(data = trajectories, lty = 2) +
geom_spoke(
data = san_andreas,
Expand Down

0 comments on commit 96e9b12

Please sign in to comment.