hafen/geofacet
hafen/geofacet has 354 GitHub stars and 48 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-18 01:44 UTC. Last push 2026-01-14.
Measured star growth
- in 24h
- 0
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
About
R package for geographical faceting with ggplot2
Developer ToolsREADME.md
Originalgeofacet 
This R package provides geofaceting functionality for ggplot2. Geofaceting arranges a sequence of plots of data for different geographical entities into a grid that strives to preserve some of the original geographical orientation of the entities. It's easiest to describe with examples. See below.
Install
install.packages("geofacet")
# or from github:
# remotes::install_github("hafen/geofacet")
Example
See here for the package vignette.
Barchart of state rankings in various categories:
library(ggplot2)
ggplot(state_ranks, aes(variable, rank, fill = variable)) +
geom_col() +
coord_flip() +
facet_geo(~ state) +
theme_bw()

Unemployment rate time series for each state:
ggplot(state_unemp, aes(year, rate)) +
geom_line() +
facet_geo(~ state, grid = "us_state_grid2") +
scale_x_continuous(labels = function(x) paste0("'", substr(x, 3, 4))) +
ylab("Unemployment Rate (%)")

GDP per capita in relation to EU index (100) for each country in the European Union:
ggplot(eu_gdp, aes(year, gdp_pc)) +
geom_line(color = "steelblue") +
facet_geo(~ name, grid = "eu_grid1", scales = "free_y") +
scale_x_continuous(labels = function(x) paste0("'", substr(x, 3, 4))) +
ylab("GDP Per Capita in Relation to EU Index (100)") +
theme_bw()
