Various climate and oceanographic indices are currently included in pacea:
kableExtra::kable(pacea_indices, "latex", booktabs = TRUE) %>% kableExtra::kable_styling(latex_options = c("scale_down", "striped"))
For example, to see a plot of the Oceanic Niño Index (ONI) anomaly, simply type
plot(oni)
This shows the onset of El Niño (positive index) conditions in April 2023.
The values are readily available for doing your own analyses:
oni
tail(oni)
```{asis, echo = long_talk}
Each climatic and oceanographic index is saved as a data object, and properly documented, described, and referenced in its help file, for example:
```r ?oni ONI - Oceanographic Niño Index Description: The Oceanic Niño Index is a monthly index which is one measure of the El Niño-Southern Oscillation. Usage: oni Format: A tibble also of class `pacea_index` with columns: year: year of value month: month (1 to 12) of value val: absolute values of three-month averages (preceding, current, and next month), deg C; note that recent values may change in subsequent updates - see details anom: anomalies based on 30-year base periods that are updated every 5 years, deg C; note that recent values may change in subsequent updates - see details
```{asis, echo = long_talk}
Continuing the help...
```r The Oceanic Niño Index (ONI) is a 3-month running mean of sea surface temperature (SST) anomalies in the Niño 3.4 region (5 deg N to 5 deg S, 120 deg W to 170 deg W) plotted on the center month. The SST anomalies are calculated based on 30-year base periods that are updated every 5 years, which accounts for global warming and some of the decadal-scale SST variability (as seen in the Pacific Decadal Oscillation index). The ONI is provided by the NOAA’s National Weather Service National Centers for Environmental Prediction CPC: http://www.cpc.ncep.noaa.gov/products/analysis_monitoring/ensostuff/ensoyears.shtml ... Because of the high frequency filter applied to the ERSSTv5 data, `ONI values may change up to two months after the initial real time value is posted`. Therefore, the most recent ONI values should be considered an estimate.
```{asis, echo = more_details}
So for some analyses you may want to restrict values to a specified time period
(for which values should not change in future pacea
updates), for example
\
```r oni_fix <- dplyr::filter(oni, year < 2023 | year == 2023 & month < 3) tail(oni_fix) # Will always end with February 2023
```{asis, echo = more_details}
Each index has a default plotting style (which you can override). For oni
it
shows the monthly anomalies as colour-code bars:
```r plot(oni)
```{asis, echo = more_details}
Another option is as a black line with filled-in colouring:
```r plot(oni, style = "red_blue")
```{asis, echo = more_details}
To see oni
as an annual (not monthly index):
```r plot(oni, smooth_over_year = TRUE, lwd = 6)
Say you want to see if specific events coincide with El Niño (based on a true story, see help for details):
plot(oni, event_years = c(1996, 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2014, 2016, 2017, 2019), xlim = c(lubridate::dmy(01011995), lubridate::dmy(01012024)), lwd = 2)
```{asis, echo = more_details}
plot()
The object oni
has the class pacea_index
: \
```{asis, echo = more_details, eval = long_talk} class(oni)
``{asis, echo = more_details}
\
which ensures that
plot(oni)automatically uses our specialised function
plot.pacea_index(oni)`, giving
the red and blue colours, tickmarks, axis labelling, etc.
\
So see ?plot.pacea_index
for further options. Similarly, check the class
of
other objects saved in pacea
.
```
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.