sedona_render_heatmap | R Documentation |
Generate a heatmap of geometrical object(s) within a Sedona spatial RDD.
sedona_render_heatmap(
rdd,
resolution_x,
resolution_y,
output_location,
output_format = c("png", "gif", "svg"),
boundary = NULL,
blur_radius = 10L,
overlay = NULL,
browse = interactive()
)
rdd |
A Sedona spatial RDD. |
resolution_x |
Resolution on the x-axis. |
resolution_y |
Resolution on the y-axis. |
output_location |
Location of the output image. This should be the desired path of the image file excluding extension in its file name. |
output_format |
File format of the output image. Currently "png", "gif", and "svg" formats are supported (default: "png"). |
boundary |
Only render data within the given rectangular boundary.
The |
blur_radius |
Controls the radius of a Gaussian blur in the resulting heatmap. |
overlay |
A |
browse |
Whether to open the rendered image in a browser (default: interactive()). |
No return value.
Other Sedona visualization routines:
sedona_render_choropleth_map()
,
sedona_render_scatter_plot()
library(sparklyr)
library(apache.sedona)
sc <- spark_connect(master = "spark://HOST:PORT")
if (!inherits(sc, "test_connection")) {
input_location <- "/dev/null" # replace it with the path to your input file
rdd <- sedona_read_dsv_to_typed_rdd(
sc,
location = input_location,
type = "point"
)
sedona_render_heatmap(
rdd,
resolution_x = 800,
resolution_y = 600,
output_location = tempfile("points-"),
output_format = "png",
boundary = c(-91, -84, 30, 35),
blur_radius = 10
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.