
Plot the model-implied daily mobility flux matrix (\(M_{ij}\))
Source:R/plot_mobility_flux_matrix.R
plot_mobility_flux_matrix.RdHeatmap of the model's implied daily flux
\(M_{ij} = N_i \tau_i \pi_{ij}\) (calc_mobility_flux element
$flux) — the expected number of travelers per day from origin \(i\)
to destination \(j\). This is the modeled flight-matrix panel of the
"spatial" figure group in render_MOSAIC_figures.
Usage
plot_mobility_flux_matrix(
flux,
location_name = rownames(flux),
latitude = NULL
)Arguments
- flux
Numeric J x J flux matrix from
calc_mobility_flux(element$flux), diagonalNA.- location_name
Character vector of length J, config order. Defaults to
rownames(flux).- latitude
Numeric vector of length J giving each location's latitude in the row order of
flux; used to order the axes south-to-north (matchingplot_mobility). WhenNULL(default) the axes are left in the order oflocation_name.
Details
The aesthetic matches the observed flight-matrix (M) panel of
plot_mobility exactly (theme_bw(), black->skyblue
log(value + 1) fill with the 0/10/100/1,000/10,000 colorbar,
bottom legend). Only the data and colorbar title differ: this plots the
model's implied flux from its calibrated parameters, so the title
reads "Model-implied mean daily trips". Axes are ordered south-to-north by
latitude via a keyed factor(levels = ) over the named matrix. The
diagonal is NA (no self-travel) and is rendered as grey90.