Learn R Programming

geobr (version 0.02)

read_health_facilities: Download geolocated data of health facilities as an sf object.

Description

Data comes from the National Registry of Healthcare facilities (Cadastro Nacional de Estabelecimentos de Sa<U+00FA>de - CNES), originally collected by the Brazilian Ministry of Health. The date of the last data update is registered in the database in the columns <U+2018>date_update<U+2019> and <U+2018>year_update<U+2019>. These data uses Geodetic reference system "SIRGAS2000" and CRS(4674). The coordinates of each facility was obtained by CNES and validated by means of space operations. These operations verify if the point is in the municipality, considering a radius of 5,000 meters. When the coordinate is not correct, further searches are done in other systems of the Ministry of Health and in web services like Google Maps . Finally, if the coordinates have been correctly obtained in this process, the coordinates of the municipal head office are used. The final source used is registered in the database in a specific column <U+2018>data_source<U+2019>. Periodically the coordinates are revised with the objective of improving the quality of the data. More information available at http://dados.gov.br/dataset/cnes

Usage

read_health_facilities(code)

Arguments

code

The 7-digit code of a municipality. If the two-digit code or a two-letter abbreviation of a state is passed, (e.g. 33 or "RJ") the function will load all healthcare facilities of that state. If code="all", all facilities of the country are loaded.

Examples

Run this code
# NOT RUN {
library(geobr)

# Read the health facilities of state 11
  h <- read_health_facilities(code=11)
  
# Read the health facilities of state "AM"
  h <- read_health_facilities(code="AM")
  
# Read all health facilities of the country
  h <- read_health_facilities(code="all")
  
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab