I would like to delimit my analysis to Montevideo City, capital of Uruguay.
How to subset this principal object, named uruguay?
Is there a link to Montevideo shapefile?
uruguay <- st_read("ine_seccen.shp")
tm_shape(uruguay) + tm_polygons()`
Uruguay, Latin America Uruguay
Let's read in the data
And let's check the data itself and plot it:
From the data snipet above we can see the
nombdepto
column contains names. Let's filter out only those polygons which areMONTEVIDEO
boundaries.Or, filter it directly in
tm_shape()
function providing a subset of oursf
object:Created on 2023-12-27 with reprex v2.0.2
PS. In future / other question please either provide a representative data or link the original data file used. The
ine_seccen.shp
used in above examples were taken from https://visualizador.ide.uy/geonetwork/srv/api/records/c14e6a59-756c-44f1-bc4e-426e2573122b (Secciones Censales del Uruguay 2011 layer of WFS server).