explodemap 0.3.0
- Release A of the Pipeline Studio extraction adds reusable input-preparation primitives:
count_geometry_vertices(),simplify_to_vertex_budget(),assign_spatial_groups(),validate_explodemap_input(),prepare_explodemap_input(),group_palette(), andexplodemap_fingerprint(). These functions move proven geometry, validation, palette, simplification, grouping, and compatibility helpers out of the app layer while keeping upload policy and UI orchestration in Pipeline Studio. -
focus_map()no longer emits the noisy “st_simplify does not correctly simplify longitude/latitude data” warning when it simplifies its WGS84 widget copy; the simplification is render-only and the warning is now suppressed. (Passsimplify = FALSE, or pre-simplify in a projected CRS, when dense layers such as municipalities look over-angular.) - New
inst/shiny/pipeline-studioShiny app (shipped with both explodemap and dragmapr) demonstrates the full cross-package workflow on real US geography: the national HHS exploded map and a state county drill-down with diagnostics and label-aware search, the dragmapr draggable editor withdragmapr_stateround-trip, and a combined compute -> compose -> render -> persist studio. Run withshiny::runApp(system.file("shiny/pipeline-studio", package = "explodemap")). - Added
inst/examples/explodemap_dragmapr_pipeline.R, a complete cross-package example covering layout optimization, diagnostics, editable state, JSON persistence,focus_map(), anddragmapr::render_dragged_map(). -
as_dragmapr_state()is the preferred state-first bridge todragmapr, emitting adragmapr::dragmapr_state()thatstate =arguments accept acrossfocus_map(),render_dragged_map(), andupdate_exploded_layout(). The olderas_dragmapr()is now documented as legacy/low-level (still supported, not deprecated). -
focus_map()gainsrestore_selection(defaultFALSE): whenTRUEand the suppliedstatecarries aselected_feature, the map opens focused on that feature, reproducing a saved composition’s focus. The behavior is fully opt-in, so default renders are unchanged. - New
inst/examples/state_first_workflow.Rshows the canonical pipeline:explode_grouped()->as_dragmapr_state()->dragmapr_edit()->focus_map(state = )/render_dragged_map(state = ). -
update_focus_palette()now preserves the palette’s names so the browser can keygroupPaletteby group. Previously the colours were sent as an unnamed array and silently ignored (the map fell back to the automatic palette). The focus-map proxy operations (update_focus_labels(),update_focus_palette(),update_focus_data()) now have regression tests. -
update_focus_data()documents its behavior explicitly: a data swap rebuilds the widget and returns it to the idle view. Passstateandrestore_selection = TRUEthrough...to keep a feature focused across the swap. -
plot()on adiagnose_layout()report now draws the region blocks inside the layout’s canvas frame (so unused space is visible) and a red segment between every overlapping region pair, instead of plotting bare anchor points. -
optimize_grouped_layout()gainslabel_col/label_size. When supplied, the parameter search becomes label-aware – each candidate is scored for approximate label overlaps via thelabel_overlapobjective weight. LeftNULL(the default) the result is identical to before. -
focus_map()now validates the active sf geometry column up front, so a malformedsffails with the same clear message used byexplode_sf()andexplode_grouped()rather than a deep, cryptic error.
explodemap 0.2.0
CRAN release: 2026-05-27
New features
- Added a three-level grouped layout engine via
explode_grouped(), supporting"auto","auto_collision", and"manual"anchor modes for multi-region and national-scale layouts. - Added
layout_regions()to compute region anchors as a standalone step for custom grouped-layout workflows. - Added
estimate_block_radii()to estimate per-region block radii using the 85th percentile of unit-to-centroid distances. - Added
export_topojson()for optional TopoJSON export via the externalmapshaperCLI tool, for downstream tools such as Power BI. - Added
summary.grouped_exploded_map()for grouped-layout diagnostics, including local displacement parameters, anchor parameters, and block radii. - Added optional bounded collision refinement to
explode_sf()andexplode_state()for dense municipal cores, with diagnostics stored in the returnedrefinementcomponent. - Added
explode_section()for drill-down dashboards that explode one selected section while keeping the remaining geography as faded or hidden context forfocus_map(). - Added the first
dragmapr_statebridge:as_dragmapr_state()exports a grouped layout as a shared editorial composition state, andupdate_exploded_layout()/focus_map(state = ...)can consume that state after manual editing.
Improvements
- Centroid handling was refactored throughout the package to avoid
sfattribute warnings during centroid calculations. -
compute_stats()now acceptscentroid_funso geometry statistics and displacement use the same centroid semantics. -
explode_sf()andexplode_state()now respect partial manual overrides: users may set onlyalpha_ror onlyalpha_lwhile deriving the other parameter from geometry. - Direction vectors and distance scaling now handle true zero-distance cases without suppressing sub-metre coordinate differences.
- Grouped anchor collision refinement is now deterministic for coincident anchors, improving reproducibility.
- Manual grouped anchors now validate that every region has one anchor and that regions are not duplicated in the anchor table.
- Grouped objects now inherit from both
grouped_exploded_mapandexploded_map, improving method consistency. - Grouped S3 methods were consolidated and cleaned up for more consistent printing, plotting, and summary output.
- Distance formatting in diagnostic output now adapts between metres and kilometres, improving readability for both small synthetic examples and real-world datasets.
- Focus maps now support non-blocking info cards, selected-area sizing controls, and denser-layer performance tuning for Shiny workflows.
- Focus maps now support named
group_palettevalues, allowing Shiny apps to align widget colouring with dashboard legends or domain-specific palettes. - Focus maps now support context features via
context_col,context_mode,context_opacity, andcontext_clickable, enabling selected-region focus maps with muted background geography. - Focus maps now support adaptive tiny-feature focus controls via
min_focus_width,min_focus_height,tiny_feature_threshold, andtiny_feature_boost, improving municipal drill-down maps with very small selected polygons. - Focus maps now support selected-feature origin context via
origin_contextandorigin_context_position, including an overview inset that keeps small municipal focus views anchored to the broader geography. The cue is opt-in by default. - Focus maps now expose
focus_context_opacityto tune how strongly the non-selected background geography recedes during focused views. - Focus maps now support opt-in drag zoom via
show_drag_zoom. Users can use the button or Shift-drag to draw a marquee rectangle and smoothly zoom into dense clusters before selecting individual features. - Drag zoom behaves as a navigation layer over focus maps: plain clicks still focus polygons while the toggle is active, and turning the tool off no longer resets the current focus.
-
explode_grouped()now accepts visual aliases (anchor_expand,anchor_buffer,density_scale, andblock_sep) for the corresponding grouped-layout solver controls. - Shiny workflows now have quieter geometry builders, automatic plot suppression safeguards, and selection events for linked side panels.
- Public-facing dashboard examples now show clear Shiny validation messages for failed boundary downloads, empty data, map-generation failures, and widget-rendering failures.
- TIGER/Line downloads and TopoJSON export now fail with clearer, actionable error messages when external services, files, or tools are unavailable.
-
validate_input()now returns visibly, making repaired geometries less fragile in internal workflows.
Documentation
- Added three vignettes: getting started, grouped layouts, and paper replication.
- Added small installed examples for the basic
sfworkflow, optional collision refinement, lookup-table grouping, and manual parameter tuning. - Added a workflow-selection vignette for release-oriented user guidance.
- Added Shiny-oriented guidance for exploding a visible section while preserving the rest of the map as context in
focus_map(). - Added an
inst/CITATIONentry for academic citation. - Added pkgdown site configuration and GitHub Pages support.
explodemap 0.1.0
Initial release
- Added the core two-level displacement engine for exploded-view cartography of dense administrative boundary data.
- Added three public entry points:
explode_sf(),explode_sf_with_lookup(), andexplode_state(). - Added analytical parameter derivation via
derive_params(), implementing Analytical Results 1 and 2. - Added geometry statistics via
compute_stats(). - Added the
exploded_mapS3 class withprint(),plot(), andsummary()methods. - Added
calibration_row()for cross-dataset calibration tables. - Added TIGER/Line download and caching support via
explode_state(). - Added a state registry with New Jersey, Pennsylvania, Ohio, and New York configurations.
- Added example workflows for cross-state calibration, Canada validation, and HHS grouped layouts.
