Package: dragmapr 0.2.0

George Arthur

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>.

Authors:George Arthur [aut, cre]

dragmapr_0.2.0.tar.gz
dragmapr_0.2.0.tar.gz(r-4.7-any)dragmapr_0.2.0.tar.gz(r-4.6-any)
dragmapr_0.2.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
dragmapr/json (API)
NEWS

# Install 'dragmapr' in R:
install.packages('dragmapr', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/prigasg/dragmapr/issues

Pkgdown/docs site:https://prigasg.github.io

On CRAN:

Conda:

3.48 score 40 exports 30 dependencies

Last updated from:8983f832fc. Checks:4 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK152
source / vignettesOK238
linux-release-x86_64OK155
wasm-releaseOK133

Exports:apply_label_offsetsapply_label_stateapply_offsetsas_drag_annotationsas_drag_labelsbuild_branch_transition_databuild_elastic_transitioncreate_layout_snapshotdetect_hierarchy_columnsdrag_map_prototypedragmapr_addindragmapr_diagnosticsdragmapr_iframe_bridgeexample_hhs_layoutexample_panel_layoutinherit_layoutlayout_metricsmake_branch_bloom_labelsmake_group_boundariesmake_hierarchy_keymake_labelsmake_region_labelsprepare_dragmapr_sfprofile_spatial_uploadread_dragmapr_projectread_dragmapr_sf_uploadread_dragmapr_sf_urlread_label_offsetsread_label_stateread_offsetsrecommend_dragmapr_hierarchyrender_dragged_maprender_dragmapr_projectrestore_layout_snapshotselect_label_idssuggest_offsetssummarise_spatial_crstransition_optionsvalidate_bloom_hierarchywrite_dragmapr_project

Dependencies:classclassIntclicpp11DBIe1071farverggplot2gluegtableisobandjsonliteKernSmoothlabelinglifecycleMASSproxyR6RColorBrewerRcpprlangs2S7scalessfunitsvctrsviridisLitewithrwk

Dragmap demo

Rendered fromdragmap-demo.Rmdusingknitr::rmarkdownon Jun 22 2026.

Last update: 2026-06-22
Started: 2026-06-22

Example gallery

Rendered fromexample-gallery.Rmdusingknitr::rmarkdownon Jun 22 2026.

Last update: 2026-06-22
Started: 2026-06-22

Getting started with dragmapr

Rendered fromgetting-started.Rmdusingknitr::rmarkdownon Jun 22 2026.

Last update: 2026-06-22
Started: 2026-06-22

HHS placeholder shapes demo

Rendered fromhhs-placeholder-shapes-demo.Rmdusingknitr::rmarkdownon Jun 22 2026.

Last update: 2026-06-22
Started: 2026-06-22

Labels and static output

Rendered fromlabels-and-static-output.Rmdusingknitr::rmarkdownon Jun 22 2026.

Last update: 2026-06-22
Started: 2026-06-22

Shiny workflows

Rendered fromshiny-workflows.Rmdusingknitr::rmarkdownon Jun 22 2026.

Last update: 2026-06-22
Started: 2026-06-22

Readme and manuals

Help Manual

Help pageTopics
Apply label-specific offsets to a label tableapply_label_offsets
Apply draggable label state to a label tableapply_label_state
Apply rigid offsets to grouped sf geometriesapply_offsets
Coerce data to draggable annotation boxesas_drag_annotations
Coerce data to a drag label tableas_drag_labels
Build leaf-flip transition databuild_branch_transition_data
Build a local elastic parent-to-child transitionbuild_elastic_transition
Save a layout snapshot for a grouped sf datasetcreate_layout_snapshot
Detect parent-child grouping columnsdetect_hierarchy_columns
Write a draggable map in your browserdrag_map_prototype
RStudio addin for the interactive drag-map prototypedragmapr_addin
Summarise a spatial dataset for use with dragmaprdragmapr_diagnostics
Build the Shiny iframe bridge JavaScript for a draggable helperdragmapr_iframe_bridge
Build a small explodemap-style HHS example layoutexample_hhs_layout
Build a non-map panel layout exampleexample_panel_layout
Inherit region offsets from a coarser to a finer grouping columninherit_layout
Measure mental-map stability between two layoutslayout_metrics
Build parent and child labels for branch bloommake_branch_bloom_labels
Build dotted group-drag boundaries for expanded groupsmake_group_boundaries
Build composite group keys from multiple columnsmake_hierarchy_key
Derive one label anchor per draggable regionmake_labels
Derive one default label per draggable regionmake_region_labels
Prepare an sf object for use with dragmaprprepare_dragmapr_sf
Profile a spatial upload for dragmaprprofile_spatial_upload
Read a dragmapr project bundleread_dragmapr_project
Read an sf object from a Shiny file uploadread_dragmapr_sf_upload
Download and read an sf object from a URLread_dragmapr_sf_url
Read label offsets from CSVread_label_offsets
Read draggable label state from CSVread_label_state
Read region offsets from CSVread_offsets
Recommend a hierarchy for dragmaprrecommend_dragmapr_hierarchy
Save the dragged layout as a static imagerender_dragged_map
Render a static map from a Spatial Studio project bundlerender_dragmapr_project
Restore a layout snapshotrestore_layout_snapshot
Select a readable subset of label IDsselect_label_ids
Suggest automatic region offsets for a draggable mapsuggest_offsets
Summarise CRS meaning for dragmaprsummarise_spatial_crs
Options for local elastic hierarchy transitionstransition_options
Validate a parent-child bloom hierarchyvalidate_bloom_hierarchy
Write a dragmapr project bundlewrite_dragmapr_project