3D map with rayshader and ggplot2 in R

Поделиться
HTML-код
  • Опубликовано: 27 окт 2024

Комментарии • 64

  • @sandunpriyankarasomarathna9281
    @sandunpriyankarasomarathna9281 Год назад +1

    as a gis undergraduate ,i was looking very much this kind of channel i found different r programing tutorials but they focused on data science ,but i was looking this kind of spatial analysis channel which done by r programing , finally i found it .thank for your commitment and your teaching ability is amazing .keep it up and love to learn furthermore with you

    • @milos-makes-maps
      @milos-makes-maps  Год назад

      It warms my heart to read your comment because I created this channel to help curious people like you navigate R waters. I hope both you and my channel will grow together as we embark on new exciting dataviz and GIS journeys. Welcome aboard!

    • @sandunpriyankarasomarathna9281
      @sandunpriyankarasomarathna9281 Год назад +1

      ❤@@milos-makes-maps

  • @JosepGonzalez-ci8lh
    @JosepGonzalez-ci8lh Год назад +3

    I had NO idea R was capable of this. I'm blown away. Amazing content and subscribed. Keep up the good work.

    • @milos-makes-maps
      @milos-makes-maps  Год назад

      Thank you for your beautiful comment! And welcome onboard

  • @johneagle4384
    @johneagle4384 Год назад +1

    I've just discovered your channel. R continues to surprise me. You do really impressive stuff. Thank you very much.

  • @AleksPopovic
    @AleksPopovic Год назад +2

    This is a great tutorial Milos! Awesome work!

  • @amribetkhalid5344
    @amribetkhalid5344 Год назад +2

    Great tutorial as always! Thank you so much

    • @milos-makes-maps
      @milos-makes-maps  Год назад +1

      My pleasure! Thanks for your support and for watching it

  • @monocilindro3655
    @monocilindro3655 Год назад +1

    Great explanations. Thanks!

  • @shreyapandey12
    @shreyapandey12 8 месяцев назад +1

    Great help for my work... thanks a lotttttt

  • @bassamsaleh8034
    @bassamsaleh8034 Год назад +2

    pretty amazing video that has a lot of tips and tricks. thank you

    • @milos-makes-maps
      @milos-makes-maps  Год назад

      My pleasure! It took a while 😁 but I wanted to shed light on as many things as possible

  • @Aaqib..
    @Aaqib.. Год назад +2

    Ok ,now these are some very valuable tutorials, gotta learn fast. Thanks a lot for this..
    (that hillshade error still i am facing even after the code following exactly)

    • @milos-makes-maps
      @milos-makes-maps  Год назад +1

      Thanks a lot for your feedback and for following the tutorials! Could you remind me where the hillshade error pops up?

    • @Aaqib..
      @Aaqib.. Год назад +1

      @@milos-makes-maps yes this is an issue with the plot_gg function, showing
      Error in hillshade[, , 1] * scales::rescale(shadowmap, c(max_darken, 1)) :
      non-conformable arrays

    • @milos-makes-maps
      @milos-makes-maps  Год назад +1

      ​​@@Aaqib.. I found a GitHub discussion about this error: github.com/tylermorganwall/rayshader/issues/181. The package creator, Tyler, suggests re-nstalling rayshader from his repo. Did you try it? I show how to do it at 3:45 of my new video

    • @Aaqib..
      @Aaqib.. Год назад +1

      @@milos-makes-maps yes sir it has happened to me in the past and keeps happening. So i usually remove rayshader then install it again. i installed via github so many times that my api access exceeded 😒😒🤣🤣Thanks a lot for the help.

    • @milos-makes-maps
      @milos-makes-maps  Год назад +1

      @@Aaqib.. hahaha, too funny 🤣! I really hope it works for you this time. Let me know how it goes 😉

  • @karolineceron509
    @karolineceron509 Год назад +1

    Awesome, Milos!

  • @AbhishekKishor-ml8oq
    @AbhishekKishor-ml8oq 5 месяцев назад +3

    Install rayshader & dependencies can u make video for installing R and R studio all the related files

  • @MdNahinAlam-x9d
    @MdNahinAlam-x9d Год назад +1

    This is so cool. Thanks for sharing. Want more.

    • @milos-makes-maps
      @milos-makes-maps  Год назад

      You're welcome! I'm glad you liked it. I'm planning to make more tutorials on R and data visualization soon. Stay tuned 😊

    • @MdNahinAlam-x9d
      @MdNahinAlam-x9d Год назад +1

      @@milos-makes-maps Don't mention. You are on the favourite list. waiting for more

  • @junaidinladimu5407
    @junaidinladimu5407 Год назад +1

    Awesome, thanks a lot for sir

  • @bjmoreno100
    @bjmoreno100 Год назад +1

    hermoso tutorial , muchas gracias por este valioso aporte =)

  • @MdTowfiqElahi
    @MdTowfiqElahi 6 месяцев назад +1

    I am very very grateful for this tutorial.I am practicing this video right now.But i am facing a problem.
    after implementing this code
    rayshader::plot_gg(
    ggobj = p,
    multicore = T,
    width = w / 1000,
    height = h / 1000,
    windowsize = c(800, 800),
    offset_edges = T,
    shadow_intensity = .99,
    sunangle = 135,
    phi = 30,
    theta = -30
    )
    rayshader::render_camera(zoom = .5, phi = 85, theta = 0)
    Now i have a scene in rgl window.But when i use rayshader::render_highquality function it creates a full black png .I tried everything in my knowledge.Is this happening because of any package error or my device is not compatible for this rendering..plz help. i am following your code

    • @milos-makes-maps
      @milos-makes-maps  6 месяцев назад

      Thank you! Were you able to resolve the issue?

  • @bjmoreno100
    @bjmoreno100 Год назад +1

    :( i was following your 3d map guide but i had several failed attempts to make the map of ecuador taking into account its islands and the current relief of the mountains of the Andes mountain range to achieve a proper lighting of the map before and during rendering. what would you recommend me to do, ..
    try lowering the height of the peaks in the map generated by rayshader augment "scale", also try # Adjusting the range of values in the forest cover data:
    forest_cover_df$transform_height

    • @milos-makes-maps
      @milos-makes-maps  Год назад +1

      Hola, I'm really sorry to hear that you couldn't make a satisfactory map. Could you create a GitHub repo with your code and invite me to it so that I can give it a try?

    • @bjmoreno100
      @bjmoreno100 Год назад +1

      @@milos-makes-maps wao!!! thank you very much =) I have just sent you the invitation

    • @milos-makes-maps
      @milos-makes-maps  Год назад

      ​@@bjmoreno100 No problem! I've updated the repo with a new script that hopefully produces a better map. Check it out and let me know what you think

  • @ingcohen
    @ingcohen 9 месяцев назад +1

    Good afternoon, I really enjoyed your work. I would like to ask you some questions about it, but I would like to do it by email or direct message. For example, could this same tool be applied, not for countries but for specific areas within a country? Thank you

    • @milos-makes-maps
      @milos-makes-maps  9 месяцев назад

      Hi, if you are interested in specific regional boundaries or bounding boxes you can check my tutorial on creating the 3D topographic maps where I explain how to fetch them

  • @santiagosotelo6881
    @santiagosotelo6881 Год назад +1

    Hi milo, thanks for the tutorial. I notice you are using vscode as your IDE. Would you do a tutorial setup of your vscode R? That would be amazing. Thanks

    • @milos-makes-maps
      @milos-makes-maps  Год назад

      Hi Santiago, thanks for the suggestion! It's a smart idea that would help many people so I'll think about it

  • @ThiagoHenrique-dc3ro
    @ThiagoHenrique-dc3ro 4 месяца назад

    Dear Milos, thank you so much for your tutorials. I'm trying to make a map for a work using this tutorial, however I'm having problems in step 4, after croping the raster and ploting, the values are equal to 1 and the whole map becomes yellow. Is it possible to help me with this error?

    • @milos-makes-maps
      @milos-makes-maps  4 месяца назад

      Dear Thiago, can you, please, try installing the latest version of terra from CRAN. Let me know if the issue persists

    • @ThiagoHenrique-dc3ro
      @ThiagoHenrique-dc3ro 4 месяца назад

      @@milos-makes-maps Unfornately yes, the error persists. The terra package is already the newest one.
      I go this warning message:
      Warning message:
      In class(object)

    • @milos-makes-maps
      @milos-makes-maps  4 месяца назад

      If you are working on Mac, let's try using mask from terra in step 4. Try running this code:
      get_forest_cover_cropped

  • @astridguerreroalonso308
    @astridguerreroalonso308 8 месяцев назад +1

    Hi Milos! Thank you so much for all your helpful explanations. I've been making good progress with the project, but I've hit a snag in section 10 when trying to render the map. Specifically, I encountered the following error during step 1 of section 10:
    Error in if (path_material_df$type == "dielectric" && !use_extruded_paths) { :
    missing value where TRUE/FALSE needed
    Could you please provide some guidance on how to address this error?
    Thanks again for your assistance!

    • @milos-makes-maps
      @milos-makes-maps  8 месяцев назад +1

      Hi @astridguerreroalonso308 and thank you for your kind words! The error you received is related to the issues with the most recent version of rayshader and rayrender. Please downgrade both packages using the following chunks:
      install.packages("remotes")
      remotes::install_version("rayshader", version = "0.35.7", repos = "cran.us.r-project.org")
      remotes::install_version("rayrender", version = "0.31.2", repos = "cran.us.r-project.org")

    • @astridguerreroalonso308
      @astridguerreroalonso308 8 месяцев назад

      @@milos-makes-maps Thank you so much, Milos. It works! Although, despite running the render process, it's producing a black image :(

    • @milos-makes-maps
      @milos-makes-maps  8 месяцев назад

      @@astridguerreroalonso308 Check the raster object you are passing to rayshader as well as the light source if you are using a custom m HDRI file. Also, try to restart your session

  • @MPatriciaRosas
    @MPatriciaRosas Год назад +1

    Hi Milos! I appreciate you sharing your work, is amazing. I tried to replicate this rutine with information from Mexico; however, in step 4, I had problems with the cropped.The message is this:
    Error in h(simpleError(msg, call)) :
    error in evaluating the argument 'x' in selecting a method for function 'aggregate': [crop] cannot create dataset
    11. h(simpleError(msg, call))
    Do you have any idea how to fix it?.
    Thanks

    • @milos-makes-maps
      @milos-makes-maps  Год назад +1

      Thank you for your kind words! I see that you are stuck at the crop part. Without a full code it's a bit difficult to understand why you receive this error. Can you try to ommit `mask = T` from your code?

    • @MPatriciaRosas
      @MPatriciaRosas Год назад +1

      @@milos-makes-maps Thank you so much. Your suggestion has worked.

    • @milos-makes-maps
      @milos-makes-maps  Год назад

      @@MPatriciaRosas Perfect! Looking forward to seeing your map 😊

  • @kalicond
    @kalicond Год назад +1

    I am following the tutorial and I find this error Error in hillshade[, , 1] * scales::rescale(shadowmap, c(max_darken, 1)) :
    non-conformable arrays apparently it has something to do with the Rayshader library

    • @milos-makes-maps
      @milos-makes-maps  Год назад +1

      Hey Julián, it looks like you have to re-install rayshader. Please run: remotes::install_github('tylermorganwall/rayshader')

  • @scofieldmichael5456
    @scofieldmichael5456 4 месяца назад

    hello i like what you do and i'm a beginner in mapping with r i can't download the source code on github.please help me

    • @milos-makes-maps
      @milos-makes-maps  4 месяца назад

      Hey, here’s a step-by-step guide to help you:
      1. Navigate to the Repository: Go to the main page of the repository on GitHub.
      2. Find the ‘Code’ Button: Look for a green button labeled ‘Code’ near the top of the repository.
      3. Download Options: Click on it, and you’ll see an option to download the ZIP file of the repository.

    • @scofieldmichael5456
      @scofieldmichael5456 4 месяца назад +1

      @@milos-makes-maps Thanks I found myself.
      Thank you for everything you do, you motivate me

  • @yabesbutarbutar7715
    @yabesbutarbutar7715 Год назад +2

    good video, why so small views??

    • @milos-makes-maps
      @milos-makes-maps  Год назад

      Thanks! It takes time for RUclips to acknowledge my presence 😆

  • @thashriftippu
    @thashriftippu 5 месяцев назад +1

    I want to know how do I install R first can anyone help me

    • @milos-makes-maps
      @milos-makes-maps  5 месяцев назад

      Here is a video on how to install and set up R in VSCode: ruclips.net/video/k79H8EeR5Jo/видео.html