Skip to contents

Plotting

Create simple figures

plot_barchart()
Plot a bar chart using ggplot2
plot_boxplot()
Plot a boxplot using ggplot2
plot_dic()
Plot Deviance Information Criterion (DIC) values
plot_line_average()
Create a line plot with a confidence interval.
plot_line_comparison()
Plot line comparison for stdev etc
plot_map()
Create a simple map from data using either the leaflet or mapview packages
plot_mesh()
Plot a mesh on a Leaflet map
plot_priors_boxplot()
Create boxplots from priors run data
plot_priors_density()
Plot density function
plot_timeseries()
Plot timeseries data

Shiny apps

Interactive tools for building meshes, plotting maps and investigating priors

mesh_builder()
Mesh building shiny app. Creates and visualises a mesh from some spatial data.
model_builder()
Interactively set and see the result of different priors
model_viewer()
Model viewing shiny app. Visualises INLA model output, plots the posterior distributions of model parameters and prediction statistics.

Parsing model output

Functions to help parse model output and extract useful information

parse_model_output()
Parse model output to create a list of model parameters
create_prediction_field()
Create a prediction field from the parsed model output and the mesh

Mesh tools

Functions to help with creation and investigation of meshes

mesh_to_spatial()
Convert an INLA mesh to a SpatialPolygonsDataFrame
mesh_checker()
Check a mesh for errors:
  1. A greater number of mesh nodes than observations

  2. A greater number of mesh triangles than observations

  3. Isolated triangles in mesh

Geospatial helpers

Functions to help convert coordinates and units

latlong_to_utm()
Convert latitude and longitude to UTM coordinates
antimeridian_wrapping()
Split polygons into two if crossing the dateline (antimeridian)
convert_from_lon_360()
Convert longitudes from 0 to 360 degrees to -180 to 180 degrees

Utility functions

These help us handle paths, retrieve data etc

to_dates()
Convert vector of date strings to Date objects
retrieve_tutorial_data()
Retrieves a tutorial dataset and unpacks it to a place specified by the user (~/fdmr/tutorial_data)
get_tutorial_datapath()
Return the filepath for a tutorial data file.
load_tutorial_data()
Load data from the tutorial data store
clear_caches()
Clear both tutorial data and downloaded archive caches
numbers_only()
Removes any character that isn't a letter