── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr 1.1.4 ✔ readr 2.1.5
✔ forcats 1.0.0 ✔ stringr 1.5.1
✔ ggplot2 3.4.4 ✔ tibble 3.2.1
✔ lubridate 1.9.3 ✔ tidyr 1.3.0
✔ purrr 1.0.2
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
Read a clean version of data:
In [2]:
la_palma <-read_csv("la-palma.csv")
Rows: 11347 Columns: 5
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
dbl (4): Longitude, Latitude, Depth(km), Magnitude
dttm (1): DateTime
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Create spatial plot:
In [3]:
#| label: fig-spatial-plot#| fig-cap: "Locations of earthquakes on La Palma since 2017"#| fig-alt: "A scatterplot of earthquake locations plotting latitude#| against longitude."la_palma |>ggplot(aes(Longitude, Latitude)) +geom_point(aes(color = Magnitude, size =40-`Depth(km)`)) +scale_color_viridis_c(direction =-1) +scale_size(range =c(0.5, 2), guide ="none") +theme_bw()
Locations of earthquakes on La Palma since 2017
In [4]:
#| label: fig-map#| fig-cap: "Locations of earthquakes on La Palma since 2017"#| fig-alt: "A scatterplot of earthquake locations plotting latitude#| against longitude."knitr::include_graphics("images/la-palma-map.png")
Locations of earthquakes on La Palma since 2017
Second Text {#}
In [5]:
#| label: sec-textcat(paste0("Hier ein weiterer, ergänzender Text"))
Hier ein weiterer, ergänzender Text
Third Text
Dieser Text zur Abgrenzung.
Locations of earthquakes on La Palma since 2017Locations of earthquakes on La Palma since 2017