Skip to content

dragmapr

0.2.0Package record

Create Draggable Plots from Projected Geometry

0packages depend
1.4Kdownloads / year
44.0%test coverage
13/13flavors OK

Overview

About

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.

Changes in 0.2.0
  • drag_map_prototype() gains an optional transition argument: the browser helper runs one client-side leaf-flip branch animation for parent-to-child bloom and child-to-parent unbloom, and draws a dotted group-drag boundary per expanded group. Clicking a boundary posts a dragmapr-collapse-branch message to the embedding page, or resets the branch when the helper runs standalone; a plain click on a region posts dragmapr-region-click.
  • New inst/examples/branch-bloom-tester.R Shiny example isolates the branch-bloom helper so clean bloom and leaf-flip behavior can be tested without the full Spatial Studio shell.
  • New packaged cheatsheet in inst/cheatsheets/ covers the core workflow, labels, static rendering, Spatial Studio, hierarchy/bloom helpers, CRS diagnostics, layout snapshots, and transition utilities.
Show all changes in 0.2.0Hide the rest of the changes in 0.2.0
  • New upload intelligence helpers: detect_hierarchy_columns(), recommend_dragmapr_hierarchy(), validate_bloom_hierarchy(), build_branch_transition_data(), make_branch_bloom_labels(), summarise_spatial_crs(), and profile_spatial_upload() move parent/child detection, CRS meaning, branch-bloom data prep, and safe parent-first label setup into reusable package functions.
  • Spatial Studio: new **Bloom** sidebar section. Pick a child column ("bloom into"), then click a parent region on the map (or choose parents in the panel) to expand just that parent into its children with a leaf flip - the rest of the map keeps the parent grouping. At most two parents can be expanded at a time (expanding another replaces the oldest), the dotted reset boundary can be toggled off, and clicking the boundary or the children compresses the branch and restores the parent's saved position. The bloom target must genuinely nest inside the current grouping (data-driven check with a clear error otherwise). Arming bloom embeds both parent and child keys in the helper once; expanding and collapsing then run fully client-side over postMessage, so there is no iframe rebuild, no loading overlay, and the animation always plays. The dotted frame is also the group's drag handle: dragging it moves the whole expanded branch (children, labels, and frame together), and collapsing places the parent at the mean of its children's positions. With "Dissolve to parent shells when collapsed" (on by default), child-level uploads display as clean dissolved parent outlines until a parent blooms, which both sharpens the reveal and reduces the number of drawn shapes.
  • Spatial Studio: the Bloom panel now includes an animation selector so users can switch between the leaf-flip proxy animation and the clean branch-bloom animation. The selected mode is sent to the live helper without rebuilding the iframe.
  • Spatial Studio: one unified full-app busy veil replaces the previous mix of map overlay, sidebar freeze, and full veil. Two modes share the same blocker - "Loading spatial data" (uploads, project opens) and "Processing changes" (helper rebuilds) - with lock counting so overlapping tasks never hide the veil early, a short show delay so fast rebuilds don't flash, and safety timers so a missed release can never freeze the app. The Shiny busy state only drives the slim top progress bar; client-side bloom interactions never show a veil.
  • Spatial Studio fixes for files with arbitrary column names: hierarchy detection on column switches is data-driven (the child column must actually nest inside the parent grouping), and the default group/region column detection no longer assumes specific column names or excludes one-row-per-region files (e.g. COUNTY_NAM instead of COUNTY).

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 2.8 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK6 OK2026-06-23
Advisories

none known

Documentation

In release 0.2.0
READMEYes · 466 wordsVignettesYes · 6 · dynamicNEWSYes · 100% structured · mentions 0.2.0Citation fileNoWebsiteYes · pkgdown
Description cites an R Journal article
Help pages
40
Examples that run
100%30 run in a plain check (7 of them under a condition)
Exported functions with examples
75%
Documented parameters
94%
Return-value docs
100%
Help pages citing references
0%

Downloads

1.4K
CRAN downloads in the past year
Rank #11,476 · ~4/day · ~121/mo
Daily download trend is not available in this view yet.
30630 days
94390 days
1.4K1 year
Compare downloads with other packages →
Also on26 r2u

Repository

0Stars
0Forks
0Open issues
1Open PRs
3Releases
67Commits
1Commit identities
67 commits · Last activity 2026-09-21 · Default branch at 0.3.1, ahead of CRAN 0.2.0 (checked 2026-10-22)
Responsiveness
How these are sampled
PRs merged (all time)
100%
Median days to close, 50 most recently updated closed issues
not measured
Median days to close, 50 most recently updated closed PRs
1

Releases over time

2026-05-28 · 12026-08-02 · 3
PracticesBeta

10 development-tooling and community-health practices detected across 6 families in the upstream repository

Checks run against github.com/prigasg/dragmapr on 2026-10-22.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Docs source (3)
pkgdown

GitHub Pages site last deployed 2026-09-21 · The repository has a site deploy workflow

pkgdown site last built 2026-07-31

Reproducibility and dev environment (1)
Dockerfile
CRAN release process (2)
cran-comments.mdCRAN-SUBMISSION
Show all practicesHide 2 practices
Lint, format, editor (1)
RStudio project
Git structural (1)
.gitattributes
How this is detected·Detection ruleset v4 (2026-10-20)

Dependencies

Declared dependencies
13 external dependencies (excludes base and recommended)

Installing dragmapr adds 27 packages (16 with compiled code, 31 MB of source tarballs). Heaviest: sf 9.3 MB, ggplot2 6.0 MB, s2 2.8 MB.

Depends (0)
none
Imports (8)
ggplot2gridjsonliterlangsfstatstoolsutils
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Datasets

People & History

People (1)
Author, Maintainer since 0.2.0 (2026)
Releases (1)
  • 0.2.0Latest
    first seen 2026-06-22 · current release
  • R
    R 4.6.0 released · 2026-04-24

Package metadata

First seen
2026-06-22
Total releases
1 / 1 yrs
License
MIT + file LICENSE OSI
Download size
1.9 MB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("dragmapr")
Arthur, G. (2026). dragmapr: Create Draggable Plots from Projected Geometry (Version 0.2.0) [Computer software]. https://doi.org/10.32614/CRAN.package.dragmapr

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for dragmapr version 0.2.0 [Data set]. HJJB, LLC. Data release v2026-10-24. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy