Accessing Raw Geospatial Data
This lesson is called Accessing Raw Geospatial Data, part of the Mapping with R course. This lesson is called Accessing Raw Geospatial Data, part of the Mapping with R course.
Transcript
Click on the transcript to go to that point in the video. Please note that transcripts are auto generated and may contain minor inaccuracies.
View code shown in video
library(sf)
read_sf(
"https://raw.githubusercontent.com/rfortherestofus/mapping-with-r-v2/refs/heads/main/data/Portland_City_Council_Districts.shp"
)
read_sf(
"https://raw.githubusercontent.com/rfortherestofus/mapping-with-r-v2/refs/heads/main/data/portland_city_council_districts.geojson"
)
Your Turn
Download data in ESRI Shapefile or GeoJSON format on Portland sextants (you can find the original data here)
Import the data in R using the
read_sf()
function from thesf
packageExamine your data, making sure you can identify its geometry type, dimensions, bounding box, coordinate reference system and
geometry
column
Learn More
This vignette from the {sf} package covers all things reading and writing geospatial data. The Geographic Data I/O chapter of the book Geocomputation with R does something similar.
Have any questions? Put them below and we will help you out!
Course Content
23 Lessons
You need to be signed-in to comment on this post. Login.