R Spatial Data 2: KNN from Longitude and Latitude

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 ธ.ค. 2024

ความคิดเห็น • 11

  • @lateakaLLA3124
    @lateakaLLA3124 6 ปีที่แล้ว

    Thanks for this Video and the file you provided. It works and actually helps me a lot.

  • @berhanebiwotmelese950
    @berhanebiwotmelese950 6 ปีที่แล้ว +1

    tank you for your brief and precise description.
    can we do that without shapefile the spatial data???
    In R program the OGR and CRS function it says the message "could not find function "readOGR & CRS" .how can to be solve the error?
    if possible please give me the full commands for spatial data analysis in doc? 10Q 4 all.

    • @BurkeyAcademy
      @BurkeyAcademy  6 ปีที่แล้ว

      "Can we do that without shapefile?" Yes, that is what we do in this video.
      "could not find function readOGR" Make sure you have downloaded and activated library "rgdal"
      "give me the full commands in doc?" I am not sure what you want. The commands are linked to, and also there is a link to me cheatsheet in the video description. Let me know what else you need.

    • @berhanebiwotmelese950
      @berhanebiwotmelese950 6 ปีที่แล้ว

      hi sir how are you?
      as we discussed in video,I was try to run the function . But when I run " Error in knearneigh(nc.coords, k = 5, LonLat = TRUE) :
      unused argument (LonLat = TRUE)" error messages appear.what is wrong ?
      N.B: sp, rgdal, ape, maptools, foreign, spdep, matrix,spatial are installed.

    • @BurkeyAcademy
      @BurkeyAcademy  6 ปีที่แล้ว

      You must type the commands (or copy and paste them from the provided text file linked in the description) EXACTLY as they are provided, with correct spelling and cpitalization. The command is not "LonLat=TRUE", it is "longlat=TRUE".

  • @edgarpadfield1995
    @edgarpadfield1995 5 ปีที่แล้ว

    Is it possible to use KNN to test for clusters on data that is in the form of LSOA and not Long/lat. At the moment I can currently running an analysis on census data

    • @BurkeyAcademy
      @BurkeyAcademy  5 ปีที่แล้ว

      For knn you need some sort of distance measure, since it is determining k Nearest neighbors. In general, I am not a fan of knn unless it is REALLY the best way in your model to define neighbors. I'd suggest trying queen contiguity instead.

    • @edgarpadfield1995
      @edgarpadfield1995 5 ปีที่แล้ว

      @@BurkeyAcademy Thank you, I will give it ago. I have found your videos really helpful!

  • @opa301
    @opa301 5 ปีที่แล้ว

    Thank you so much