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
)
}
Run the code above in your browser using DataLab