Тёмный

How to Import Shapefile in RStudio 

GIS & RS Professionals
Подписаться 5 тыс.
Просмотров 1,7 тыс.
50% 1

In this video, i will present how to upload shapefile in RStudio.
We will use the sf package to work with vector data in R. Notice that the rgdal package automatically loads when sf is loaded. We will also use the raster package, which we will work with in more detail in later episodes, so we can explore raster and vector spatial metadata using similar commands. Make sure you have the sf library loaded.
Shapefiles are a common way to store geospatial data. This post explains how to read it with R and the rgdal package, and how to plot it in base R or with ggplot2.
The rgdal package offers the readOGR() function that allows to read shapefile using the following syntax.
As a result you get a geospatial object (my_spdf here) that contains all the information we need for further mapping. Please try th following command to understand how this object works:
It is totally possible (and advised imo) to build the map with ggplot2. However, ggplot2 takes as input data frames, not geospatial data.
my_spdf thus needs to be transformed using the tidy() function of the broom package. The region argument of this function expect one of the column name if the @data slot. It will be the region name in the new dataframe.
#rstudio #remotesensing #shapefile #import #vector #vectordata #rstudiotutorial#How to Import Shapefile in RStudio
how to download R,How to install R,How to install RStudio,How to download
R,How to import shapefile to R,How to import shapefile to RStudion,How to use R as GIS tool,mapping with R,Mapping with RStudio,R for statistical analysis,data analysis with R,R and Graph,R and GIS,how to install R package
how to download R,How to install R,How to install RStudio,How to import shapefile to R,Add multi vectors to RStudion,How to use R as GIS tool,mapping with R,Mapping with RStudio,data analysis with R,how to install R package,Download spatial data,symbology with R,downlaod vector data for free
Creating a Map from a Shapefile with ggplot2 and rgdal,rgdal,making maps with R,GIS with R,GIS with Rstats,readOGR shapefiles,shapefile r,shapefiles in r,shapefile in r,shapefiles with r,ggplot2 map,ggplot shapefiles,ggplot maps in r,shapefiles making r,readogr,read shape file in r,ovrir shapefile avec r,ggplot2 maps,r shapefile

Опубликовано:

 

7 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 2   
@athila2942
@athila2942 Месяц назад
Thank you so much, fella! It was very dificult to find good videos teaching how to do this
@CT-mc3sy
@CT-mc3sy 4 месяца назад
what if rgdal won't download?
Далее
What is a Shapefile?
8:48
Просмотров 29 тыс.
ОРБИЗ-ГАН за 1$ vs 10$ vs 100$!
19:01
Просмотров 418 тыс.
Changing The Flag Of The Countries #countryballs
00:18
How to Digitize Road Network in QGIS
7:04
Просмотров 1,8 тыс.
Calculating Carbon for Conservation using InVEST
21:54
Drawing distribution maps using R
11:57
Просмотров 8 тыс.
Least cost path analysis in ArcGIS Pro
14:59
Просмотров 1,2 тыс.
R tutorial: Creating Maps and mapping data with ggplot2
10:30
ОРБИЗ-ГАН за 1$ vs 10$ vs 100$!
19:01
Просмотров 418 тыс.