0

I would like to know if changing shapefile specifications is possible.

I'm trying to create a map witht the tmap package in R.

If I look for the shapefiles in national websites. I can't find the one the Ministry of Public Health created. Since I have the original shapefile 2010 territorial division, how can I create a new map, in order to use it in tmap with the new provinces in diferent regions.

Forgive the spanish.

The map I want to create:
enter image description here

Changes and explanation:
enter image description here

This is the link for the zipped shapefile: https://geoportal.iderd.gob.do/layers/geonode:RD_RUP/metadata_detail

margusl
  • 7,804
  • 2
  • 16
  • 20
almr27
  • 43
  • 4
  • One way would be to open the shape file in QGis and edit the attribute table. – Roman Luštrik Jul 25 '23 at 06:08
  • Do I understand correctly: the provinces did not change border, but belong to different regions, and you would like to update the provinces to their newest region? As @RomanLuštrik suggested, you can edit the attribute table in QGIS, but you can also do that directly in R: the shapefile is a `data.frame`, and the columns can be modified directly using `dplyr` for example (`mutate(region = case_when(province == 1 ~ regionA, ...))`, for example). – vinceroni Jul 25 '23 at 07:38
  • Not sure if I follow. Is it about creating a choropleth map, but the region classification of the data source does not match the updated Shapefile? Or is it just about updating `tmap` code for the new Shapefile? For the latter, it would help if you'd show your code and describe what issues you were running into. – margusl Jul 25 '23 at 08:51

0 Answers0