tylermorganwall / rayshader

R Package for 2D and 3D mapping and data visualization
https://www.rayshader.com/
2.06k stars 214 forks source link

Mapping using x,y,z cordinates #65

Closed RevelationCode closed 3 years ago

RevelationCode commented 5 years ago

Hello,

I am currently working on an x,y,z data set that I would like to render as a map. I attempted to create one on Matlab using a kriging option but requires omission of more than 50% of the data points. I ran into one of your examples but am wondering how I can modify the script to accommodate for my data set? The following image is somewhat of what I want to create. 5 7 6

tylermorganwall commented 5 years ago

Try plotting the data with ggplot2::geom_raster or ggplot2::geom_tile and pass it to plot_gg(). I believe that might be what you you're looking for.

kieroneil commented 4 years ago

I may be running into a related issue. I was looking at Rayshader again tonight with the intent of creating a 3D plot of the results of machine learning where x = truth, y = pred, z = residual. Seemed simple enough. I modeled it after your map_pois example but when I tried to print the ggplot I get the following error:

Warning messages:
1: In isoband_z_matrix(data) : NAs introduced by coercion to integer range
2: In isoband_z_matrix(data) : NAs introduced by coercion to integer range
3: Computation failed in `stat_contour()`:
invalid 'nrow' value (too large or NA)

I don't think this is a Rayshader issue but who else knows about 3d rendering and ggplot than you. I sent in 500 rows, each var can be out to 7 decimal places or more. Is this too computationally hard. Would it be better to round them and/or scale them to integers? I don't know. What do you think Doc? Residual plot example.zip

tylermorganwall commented 3 years ago

@kieroneil That sounds like a ggplot issue, it does not sound like it has to do with rayshader.