This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Libraries ---- | |
library(dplyr) | |
library(ggplot2) # Plotting data | |
library(ggrepel) # Prevent overlapping text labels | |
library(Metrics) # Calculate Statistics | |
library(plotly) # Interactive plots | |
library(gganimate) # Animate plots | |
# Sample Statistical Plots ---- | |
# Create sample data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Draw a NZ map and plot two points of interest | |
# Load libraries | |
library(ggplot2) | |
library(sf) | |
library(maps) | |
# Load New Zealand map data | |
nz_map <- st_as_sf(map("nz", plot = FALSE, fill = TRUE)) |