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>.
| Version: | 0.2.0 |
| Imports: | ggplot2, grid, jsonlite, rlang, sf, stats, tools, utils |
| Suggests: | glasstabs, knitr, miniUI, pkgdown, rmarkdown, shiny, shinyWidgets (≥ 0.8.6), spelling, testthat (≥ 3.0.0) |
| Published: | 2026-06-22 |
| DOI: | 10.32614/CRAN.package.dragmapr (may not be active yet) |
| Author: | George Arthur |
| Maintainer: | George Arthur <prigasgenthian48 at gmail.com> |
| BugReports: | https://github.com/PrigasG/dragmapr/issues |
| License: | MIT + file LICENSE |
| URL: | https://prigasg.github.io/dragmapr/ |
| NeedsCompilation: | no |
| Language: | en-US |
| Materials: | README, NEWS |
| CRAN checks: | dragmapr results |
| Reference manual: | dragmapr.html , dragmapr.pdf |
| Vignettes: |
Dragmap demo (source, R code) Example gallery (source, R code) Getting started with dragmapr (source, R code) HHS placeholder shapes demo (source, R code) Labels and static output (source, R code) Shiny workflows (source, R code) |
| Package source: | dragmapr_0.2.0.tar.gz |
| Windows binaries: | r-devel: not available, r-release: not available, r-oldrel: not available |
| macOS binaries: | r-release (arm64): dragmapr_0.2.0.tgz, r-oldrel (arm64): dragmapr_0.2.0.tgz, r-release (x86_64): dragmapr_0.2.0.tgz, r-oldrel (x86_64): dragmapr_0.2.0.tgz |
Please use the canonical form https://CRAN.R-project.org/package=dragmapr to link to this page.