Plot Spatial Data / Shapefiles in R | Gun Violence in Chicago

Поділитися
Вставка
  • Опубліковано 21 жов 2024

КОМЕНТАРІ • 28

  • @vpgokul4528
    @vpgokul4528 4 роки тому +5

    Thank you so much. This was really helpful in getting me started on spatial data plotting.

  • @lovelyshawnaaa
    @lovelyshawnaaa 4 роки тому +5

    This is exactly what I want! The best video I have found so far! Thank you.

  • @rajeevsinha9170
    @rajeevsinha9170 3 роки тому +2

    This must have been the fastest 6 mins spent on learning so much and and so well

  • @maniji5756
    @maniji5756 4 роки тому +2

    Thank you for the clear and concise explanation

  • @charpunk
    @charpunk Рік тому +1

    Thank you so much. You help me a lot!
    :)

  • @JagdishVispute
    @JagdishVispute 4 роки тому +1

    Really a good video... I am practically using it right now. Thank You.

  • @piriyahassa
    @piriyahassa 4 роки тому +1

    Thanks, I think it must be work on my maps!! and this is a gorgeous explains.

  • @PedrodeUrdyma
    @PedrodeUrdyma 3 роки тому +1

    Thank you so much!!!, you saved me!!!

  • @TheAdamSmithh
    @TheAdamSmithh 4 роки тому +2

    eyy i needed this thanks a ton!!!!!!!!!!!

  • @tirnanforde2250
    @tirnanforde2250 4 роки тому +1

    This is fantastic thank you

  • @chrisber
    @chrisber 4 роки тому +1

    This is fantastic work, thank you!

  • @acousticnewcomers
    @acousticnewcomers 3 роки тому +6

    Hello, great video, although when I try to add the points to my final plot they don't appear. It worked for plotting the points in the first stage, and the shape file plotted fine. Do you know what might be going wrong?

    • @DistrictScoot17
      @DistrictScoot17 3 роки тому

      same here unfortunately, any update on that ? would be very helpful

    • @zuberali7542
      @zuberali7542 Рік тому

      Same here, anyone figure it out

    • @jacksanderson971
      @jacksanderson971 Рік тому

      ​@@zuberali7542 I haven't worked with this exact data but I've ran into a similar problem in the past. The likely issue is that the points and the polygons are using different coordinate reference systems (CRS). I believing running "proj4string([df])" will tell you what CRS the df is using, and if they're different you'd have to do some transformation to get the CRSs to be the same.
      To be honest though, sp is pretty outdated at this point and I would just recommend using the sf package. It'll let you do this whole thing more intuitively and with fewer lines of code. Here's what it might look like (assuming you already have your points dataframe imported):
      chicago_shapefile

  • @Rscapeextreme447
    @Rscapeextreme447 3 роки тому +1

    Thats amazing

  • @jhonbarrios2222
    @jhonbarrios2222 4 роки тому +1

    Thank you so much!

  • @RC-hf5gs
    @RC-hf5gs 4 роки тому +1

    You’re amazing thank you so much 😭

  • @panochaGremlin
    @panochaGremlin 4 роки тому +1

    you are an angel

  • @zuberali7542
    @zuberali7542 Рік тому

    Hi I managed to create both the plots and the shape file, but when I bring them together they don't seem to overlay. Any ideas

  • @EddieLim-t8o
    @EddieLim-t8o 5 років тому +1

    amazing !!

  • @parwana-e-aatish9641
    @parwana-e-aatish9641 3 роки тому

    Thank you for uploading a wonderful tutorial.
    I have a query that how we can plot two variables data on single map.
    Like :
    ggplot() +
    geom_sf(data=shape, color='grey20', size=0.1, fill=NA) +
    geom_sf(data = subset(clus_dzc1, type=='high'),aes(fill=CL2),size=0.1,color='black') +
    scale_fill_discrete_sequential(palette='Burg',name="High-risk",rev=FALSE,
    guide = guide_legend(ncol=2)) +
    theme_void()
    ggplot() +
    geom_sf(data=shape, color='grey20', size=0.1, fill=NA) +
    geom_sf(data = subset(clus_dzc1, type=='low'),aes(fill=CL2), size=0.1, color='black') +
    scale_fill_discrete_sequential(palette='Blues',name="Low-risk",rev=FALSE,
    guide = guide_legend(ncol=2)) +
    theme_void()
    . There are two plots code. Can you please guide me, how i can convert into one gg plot. Can you please write the code for me.
    I shall be very thankful to you.

  • @ghamandimalla9840
    @ghamandimalla9840 3 роки тому

    Hi there, how do I count the number of raster pixels that lie within each category of shapefiles in R ? For example, I have land cover type shape file and temperature raster layer. I want to find the number of temperature raster pixels that lie within each category of land cover shape file.

  • @irenemeniru267
    @irenemeniru267 2 роки тому

    how did you obtain the communities for each coordinate

  • @antoniojck6043
    @antoniojck6043 3 роки тому

    instead of dots, how I can you add circles of different sizes ? Thanks

  • @galinha97
    @galinha97 4 роки тому

    Hi, how can i zoom the map and select just a region?? i need to select part of the map but i dont know how. thank you, and thank your for the help.

  • @redtail141
    @redtail141 3 роки тому

    I am having trouble downloading rgdal it is saying there is no such package

  • @ProfYaffle
    @ProfYaffle 3 роки тому

    Great video.
    Horrendous gun crime stats. Pleased I don't live in Chicago