Thank you! I think you could try out my tutorial on mapping 3D river basins where I pass shapefile to rayshader: th-cam.com/video/fIOCVCxh2B8/w-d-xo.html Let me know how it goes!
Hey Milos, if I want to replicate the other country, besides change the ISO 2 code (line 28) , the Lambert Projection (line 47) also need to be changed as well right ?
Hey, you should change the projection if you are working on a map of a non-European country. I usually go for country-specific projections at epsg.io. You can find more about it here: th-cam.com/video/piswxAEwnYo/w-d-xo.htmlsi=FMwY9ueNwQFVVAiI Jump to 13min55sec
Hi Milos! Thanks for this series of videos, I'm learning a lot of stuff. One question about this one, basically due to my little knowledge of functional programming: what are you asking R to do exactly with these two lines of code? width_ratio
Hey, thanks for your question! I'm happy that you are in exploring R for data visualization. In this specific function called get_raster_size we calculate the height and width of the raster based on the distance between the minimum and maximum latitude/longitude points. Based on the width and height, we calculate their ratios and store both measures in a list. The first element of the list is width_ratio and the second is height_ratio. The reason why I call the function with appended [[]] is to take a member of the list. This is how you access list members. If you pass the number like this [[1]] that means you grab the first member of the list. Hope this clarifies my code!
Unfortunately I get an error message when trying to launch the render_highquality() function: Error in rayvertex::validate_mesh(mesh) : !any(is.na(normals)) is not TRUE Any idea why this happens?
Thanks a lot for this fantastic tutorial! I tried to adapt your code for a part of Switzerland, the canton of St.Gallen. Unfortunately, I always get the folloowing error message: Error in rayrender::obj_model(cache_filename, x = -bbox_center[1], y = -bbox_center[2], : unused argument (texture = TRUE) Do you have any idea what my be the reason? Is it possible that's because I used another projection? I switched the projection of the Kontur data to Swiss National System (d.pop_ch
Hey, please install the most recent dev versions of rayshader and rayrender. remotes::install_github("github.com/tylermorganwall/rayshader") remotes::install_github("github.com/tylermorganwall/rayrender")
Great tutorial - very comprehensive yet clear! I really appreciate the time and effort that you're putting into making these tutorials :) I've managed to create the map of Germany using your tutorial, and wanted to try my hand at making another map for France. However, when following the tutorial and I get to the 'get_population_data()' section of the code, I keep getting this error message 'Error: Path exists and overwrite is FALSE'. I'm not sure what I'm doing wrong, or what the work around is, so if you have any suggestions, then that would be great! Thanks in advance!
Thanks a lot for your feedback & encouragement! About the error: you are most likely getting this error because you provide the same file_name to R. Trying naming it france-population and let me know if it works!
Hi @@milos-makes-maps just wanted to update you and can confirm that this was the issue I was facing! I have just one other question - in the code I'm setting the background to be white, but when I export the map and save it, the background is no longer white and is an off grey colour. I'm not sure why it's coming out like this but it's making it harder to see the colours and spikes. Do you have any ideas? I was following your code as well.
Hi @@tamarac3843, happy that it worked out for you in the end! You are absolutely right that the background comes out darker even when you use white background. It happened to me many times (and still happening from time to time 😁). That's because of the way rayshader renders the scene. Your background will always be lighter or darker depending on the intensity of your scene lights. so, try to increase the light intensity and see where it takes you!
Thanks for your kind words and I'm glad that you chose R 😁. I run R in VSCode. If you are interested in setting up R in VSCode for Windows, I have a tutorial for you: th-cam.com/video/k79H8EeR5Jo/w-d-xo.htmlsi=y6heQ6VmY0sdGaMk
It seems R/my computer is unable to load the very first ggplot() call - I don't have a powerful machine but I thought it would do? Does everyone have a big powerful pc here? Only have an Intel i5 8th gen, 8 gb ram and the stock graphics card... Edit : finally rendered (the first one) but needed quite some time
Great tutorial! Amazing work. I am seeing this error when I am trying to export/render the graph with lighting. Any ideas why? Error in rayvertex::validate_mesh(mesh) : !any(is.na(normals)) is not TRUE >
Hello may I ask about something, I always got this error message when i about to export the image. What do you think is the main problem for this? Is it on my Mac or idk, thank you for your help. Error in rayrender::obj_model(cache_filename, x = -bbox_center[1], y = -bbox_center[2], : unused argument (texture = TRUE)
Hey Ariel, thanks for reaching out to me with this error message. I remember this error message from my Mac, too. It disappeared when I updated both the rayshader and rayrender packages. Did you try that step?
@@milos-makes-maps will try to update both of them after i finish studying my lectures and school homeworks. Thank you so much! Looking forward for another amazing tutorials from you. As a student, it was so very helpful for me!!!
This is fantastic!! Thank you for putting in the time to share this with us.
You're welcome! Thanks for the nice feedback. It gives me the fuel to create more content
I follow you on twitter and the maps and visualisations are amazing, i had no idea but that you have a TH-cam channel too🤩
Hi Aaqib, thanks for following my work and for your kind words! I've recently opened the TH-cam channel 😁
Amazing. Great tutorial. I'm looking forward to your next video, as a suggestion, the forest density of a country, using rayshader package.🙂
Thanks for your support and I'm happy that you find it useful! The forest map is definitely on my to-do list 😁
You have a very nice tweak of R
Very interesting tutorial Milos!
Thank you! Glad you enjoyed it
great as usual. Thank you.
Happy to be of help!
Fantastic tutorial, thank you. I am wondering how to overlay a shp file containing border and the name of the cities etc with this type of map?
Thank you! I think you could try out my tutorial on mapping 3D river basins where I pass shapefile to rayshader:
th-cam.com/video/fIOCVCxh2B8/w-d-xo.html
Let me know how it goes!
Hey Milos, if I want to replicate the other country, besides change the ISO 2 code (line 28) , the Lambert Projection (line 47) also need to be changed as well right ?
Hey, you should change the projection if you are working on a map of a non-European country. I usually go for country-specific projections at epsg.io. You can find more about it here: th-cam.com/video/piswxAEwnYo/w-d-xo.htmlsi=FMwY9ueNwQFVVAiI
Jump to 13min55sec
Hi Milos! Thanks for this series of videos, I'm learning a lot of stuff.
One question about this one, basically due to my little knowledge of functional programming: what are you asking R to do exactly with these two lines of code?
width_ratio
Hey, thanks for your question! I'm happy that you are in exploring R for data visualization. In this specific function called get_raster_size we calculate the height and width of the raster based on the distance between the minimum and maximum latitude/longitude points. Based on the width and height, we calculate their ratios and store both measures in a list. The first element of the list is width_ratio and the second is height_ratio. The reason why I call the function with appended [[]] is to take a member of the list. This is how you access list members. If you pass the number like this [[1]] that means you grab the first member of the list. Hope this clarifies my code!
Unfortunately I get an error message when trying to launch the render_highquality() function:
Error in rayvertex::validate_mesh(mesh) :
!any(is.na(normals)) is not TRUE
Any idea why this happens?
Can you update rayshader, rayrender and rayvertex?
@@milos-makes-maps I did, but I still get the error message :(
@@rigocaruso hmmm, I ran out of ideas so it would be good to open the issue in the rayshader or rayvertex GitHub repo
Thanks a lot for this fantastic tutorial!
I tried to adapt your code for a part of Switzerland, the canton of St.Gallen. Unfortunately, I always get the folloowing error message:
Error in rayrender::obj_model(cache_filename, x = -bbox_center[1], y = -bbox_center[2], :
unused argument (texture = TRUE)
Do you have any idea what my be the reason? Is it possible that's because I used another projection? I switched the projection of the Kontur data to Swiss National System (d.pop_ch
Hey, please install the most recent dev versions of rayshader and rayrender.
remotes::install_github("github.com/tylermorganwall/rayshader")
remotes::install_github("github.com/tylermorganwall/rayrender")
Thanks! After switching from R 4.2 to 4.3 and doing the remote installations it worked. 🙂
@@lutzbenson Fantastic! Enjoy R and make some cool maps 😎
Great tutorial - very comprehensive yet clear! I really appreciate the time and effort that you're putting into making these tutorials :)
I've managed to create the map of Germany using your tutorial, and wanted to try my hand at making another map for France. However, when following the tutorial and I get to the 'get_population_data()' section of the code, I keep getting this error message 'Error: Path exists and overwrite is FALSE'. I'm not sure what I'm doing wrong, or what the work around is, so if you have any suggestions, then that would be great!
Thanks in advance!
Thanks a lot for your feedback & encouragement! About the error: you are most likely getting this error because you provide the same file_name to R. Trying naming it france-population and let me know if it works!
Hi @@milos-makes-maps just wanted to update you and can confirm that this was the issue I was facing!
I have just one other question - in the code I'm setting the background to be white, but when I export the map and save it, the background is no longer white and is an off grey colour. I'm not sure why it's coming out like this but it's making it harder to see the colours and spikes. Do you have any ideas? I was following your code as well.
Hi @@tamarac3843, happy that it worked out for you in the end! You are absolutely right that the background comes out darker even when you use white background. It happened to me many times (and still happening from time to time 😁). That's because of the way rayshader renders the scene. Your background will always be lighter or darker depending on the intensity of your scene lights. so, try to increase the light intensity and see where it takes you!
Thanks for the amazing work.
My question est literally basic.
What's the software you're using?
I can't guess.
Thanks for all the work
The thing is that I'm new to R :)
Thanks for your kind words and I'm glad that you chose R 😁. I run R in VSCode. If you are interested in setting up R in VSCode for Windows, I have a tutorial for you: th-cam.com/video/k79H8EeR5Jo/w-d-xo.htmlsi=y6heQ6VmY0sdGaMk
It seems R/my computer is unable to load the very first ggplot() call - I don't have a powerful machine but I thought it would do? Does everyone have a big powerful pc here? Only have an Intel i5 8th gen, 8 gb ram and the stock graphics card...
Edit : finally rendered (the first one) but needed quite some time
Rendering with rayshader takes quite some time especially on less powerful machines
Great tutorial! Amazing work. I am seeing this error when I am trying to export/render the graph with lighting. Any ideas why?
Error in rayvertex::validate_mesh(mesh) :
!any(is.na(normals)) is not TRUE
>
Thanks, much appreciated! I used to get that error until recently, too, but then I updated rayshader and its dependencies and the error is no more
Hello Milos, nice Tutorial, please would this work if I want to try for the European LAU level
Hi Abdulrashid, I haven't tried it on the LAU data yet. Can you, please, give it a try and let me know how it goes?
Great video, thanks for this! However, while running "pop_sf
Hmmm, check if you defined your crs beforehand
How can I put labels and titles on the map?
Hey, I cover that in this tutorial: th-cam.com/video/peLyCb0sN4k/w-d-xo.html
Can it be applied to show refugees and IDPs in a country? Or it needs more info
Yes, you can use my tutorial to create spike maps of refugees and IDPs as long as the data is in shapefile format
Hello may I ask about something, I always got this error message when i about to export the image. What do you think is the main problem for this? Is it on my Mac or idk, thank you for your help.
Error in rayrender::obj_model(cache_filename, x = -bbox_center[1], y = -bbox_center[2], :
unused argument (texture = TRUE)
Hey Ariel, thanks for reaching out to me with this error message. I remember this error message from my Mac, too. It disappeared when I updated both the rayshader and rayrender packages. Did you try that step?
@@milos-makes-maps will try to update both of them after i finish studying my lectures and school homeworks. Thank you so much! Looking forward for another amazing tutorials from you. As a student, it was so very helpful for me!!!
@@arieldome530 Fantastic! I'm happy that my tutorials are helping you navigate the GIS waters in R!
@@milos-makes-maps yes i will!!! I will also follow you on your socials.
@@milos-makes-maps hi, i sent you a dm on Twitter to show to you the result of the map that i created.
Nice tutorial. What should be crsLAEA for the Indian region?
Thanks! For India, I would first try crsLAEA
@@milos-makes-maps Had the same question, thanks! Where do you get these estimated from?
@@HritikaParekh Hi, I just googled CRS for India and found the suggestion on stackexchange or stackoverflow
Ppl still use R in this day and age?
Yes