Crandore Hub

dragmapr

Create Draggable Plots from Projected Geometry

Creates interactive draggable plots from grouped projected 'sf' geometry. The primary deliverable is a browser-based 'D3' helper where regions and labels can be moved freely; users drag, then copy or download the resulting offset tables. Labels can be derived automatically with make_region_labels(), supplied directly with as_drag_labels(), and their moved positions saved and restored with read_label_state() and apply_label_state(). Hierarchical spatial datasets are supported via hierarchy detection, upload profiling, make_hierarchy_key(), and inherit_layout(), which recommend parent-child groupings and propagate parent-level drag offsets to finer child groupings. Automatic starting layouts are provided by suggest_offsets() using radial, grid, or directional algorithms. Spatial file diagnostics are available through dragmapr_diagnostics(). When a reproducible static image is also needed, render_dragged_map() reconstructs the layout as a 'ggplot2' plot from the source geometry plus the exported offset tables. Project bundles can be written with write_dragmapr_project() and rendered with render_dragmapr_project(). The interactive layer is built on the 'D3' library: Bostock, Ogievetsky and Heer (2011) <doi:10.1109/TVCG.2011.185>. Spatial data handling uses the 'sf' package: Pebesma (2018) <doi:10.32614/RJ-2018-009>.

Versions across snapshots

VersionRepositoryFileSize
0.2.0 rolling linux/jammy R-4.5 dragmapr_0.2.0.tar.gz 2.1 MiB
0.2.0 rolling linux/noble R-4.5 dragmapr_0.2.0.tar.gz 2.1 MiB
0.2.0 rolling source/ R- dragmapr_0.2.0.tar.gz 1.9 MiB
0.2.0 latest linux/jammy R-4.5 dragmapr_0.2.0.tar.gz 2.1 MiB
0.2.0 latest linux/noble R-4.5 dragmapr_0.2.0.tar.gz 2.1 MiB
0.2.0 latest source/ R- dragmapr_0.2.0.tar.gz 1.9 MiB
0.2.0 2026-04-23 source/ R- dragmapr_0.2.0.tar.gz 0 B

Dependencies (latest)

Imports

Suggests