r-duckspatial

Perform out-of-memory spatial joins and filtering on large vector datasets in R using DuckDB.

19|1|Updated Mar 3, 2026
One-click install
npx skills add https://github.com/arthurgailes/awesome-r-skills --skill r-duckspatial
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: r-duckspatial
Source: https://github.com/arthurgailes/awesome-r-skills/tree/main/skills/r-duckspatial
Command: npx skills add https://github.com/arthurgailes/awesome-r-skills --skill r-duckspatial

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill enables efficient analysis of large spatial datasets in R that exceed available memory, by leveraging DuckDB's spatial capabilities for out-of-memory processing.

Core Features & Use Cases

  • Memory-Efficient Operations: Perform spatial joins, filtering, and transformations on datasets larger than RAM.
  • Lazy Evaluation: Data remains in DuckDB until explicitly collected, optimizing performance.
  • Use Case: Analyze nationwide parcel data for spatial queries or perform areal interpolation on large census geographies without crashing your R session due to memory limits.

Quick Start

Use the r-duckspatial skill to open the file 'large_spatial_data.gpkg' and perform a spatial join with 'study_area.gpkg' using the 'intersects' predicate.

Frequently Asked Questions about r-duckspatial

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I perform spatial joins in R on large datasets that exceed available RAM?

Spatial joins in R on datasets larger than RAM can be performed using the duckspatial package and DuckDB's spatial extension. This approach handles out-of-memory vector data analysis through lazy evaluation to prevent session crashes.

What is the best way to analyze big spatial data in R without crashing my session?

Analyzing big spatial data in R without crashing is achievable via out-of-memory processing with DuckDB. Data remains in DuckDB until explicitly collected, optimizing performance and bypassing R's memory capacity limits.

Can I use DuckDB's spatial extension for areal interpolation on large census geographies?

Yes, the DuckDB spatial extension can be used for areal interpolation on large census geographies. It facilitates out-of-memory spatial data analysis in R, allowing complex spatial queries on big data exceeding typical memory limits.

Does the duckspatial package support memory-efficient spatial filtering for nationwide parcel data?

The duckspatial package supports memory-efficient spatial filtering for nationwide parcel data. It leverages DuckDB's spatial capabilities to process large vector datasets out-of-memory, ensuring efficient data management.

Why does lazy evaluation help with spatial data analysis in R?

Lazy evaluation helps spatial data analysis in R by keeping data in DuckDB until explicitly collected. This mechanism optimizes query performance and enables out-of-memory operations on large vector datasets that exceed available RAM.

What are the limitations of using out-of-memory spatial processing in R with DuckDB?

Limitations of out-of-memory spatial processing in R with DuckDB include the need for efficient data management and query optimization. Performance depends heavily on how queries are structured for large vector operations.