An R package for creating stunning 2D and 3D maps and data visualizations using raytracing, hillshading, and ggplot2 integration.
rayshader is an R package for creating 2D and 3D maps and data visualizations from elevation data and ggplot2 plots. It solves the problem of producing high-quality, interactive terrain visualizations and 3D statistical graphics directly within R, using techniques like raytracing and hillshading.
R users working with spatial data, GIS professionals, data scientists, and researchers who need to create advanced topographic maps or 3D data visualizations for presentations, publications, or exploration.
Developers choose rayshader for its seamless integration with R's spatial and plotting ecosystems, its ability to generate publication-quality 3D visuals without external software, and its unique combination of mapping capabilities with ggplot2 for versatile data visualization.
R Package for 2D and 3D mapping and data visualization
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses algorithms like ray_shade and ambient_shade to generate realistic shadows and lighting, demonstrated in mapping examples for enhanced terrain depth.
Automatically converts ggplot2 objects into 3D surfaces, preserving aesthetics like fill and color, as shown with density plots and contour maps.
Integrates a pathtracer (rayrender) for photorealistic output with atmospheric effects and sun positioning, enabling cinematic scenes from elevation data.
Supports sf objects for adding points, lines, and polygons as overlays, facilitating detailed geographic visualizations directly in R.
Exports to formats like PNG, MP4, GIF, and 3D-printable STL/OBJ, making it suitable for publications, animations, and physical models.
Installation on Ubuntu requires multiple system libraries (e.g., libpng-dev, libgdal-dev), which can be a hurdle for users without admin access or on restricted systems.
Photorealistic rendering with render_highquality() is slow and resource-intensive, especially for large datasets or high sample counts, limiting interactivity.
Tightly integrated with R and its packages, making it unsuitable for projects that need cross-language compatibility or deployment outside R environments.
Requires familiarity with R, ggplot2, and spatial data handling, which can be daunting for users new to these tools or coming from other programming backgrounds.