get_sim: Get mortality data from SIM

Description Usage Arguments Details Value Examples

View source: R/get_sim.R

Description

This function retrieves mortality data from PCDaS ElasticSearch cluster for a specified year.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
get_sim(
  conn,
  agr,
  ano = NULL,
  sexo = NULL,
  causabas = NULL,
  causabas_capitulo = NULL,
  causabas_grupo = NULL,
  causabas_categoria = NULL,
  causabas_subcategoria = NULL,
  idade_obito_anos_min = NULL,
  idade_obito_anos_max = NULL,
  idade_obito_dias_min = NULL,
  idade_obito_dias_max = NULL,
  lucene_query = NULL
)

Arguments

conn

Connection object created with pcdas_connect.

ano

numeric. Year of death.

sexo

string. Sex of the deceased. Masculino for males or Feminino for females.

causabas

string. CID-10 code for the basic cause of death.

causabas_capitulo

string. Chapter of the basic cause of death.

causabas_grupo

string. Group of the basic cause of death.

causabas_categoria

string. Category of the basic cause of death.

causabas_subcategoria

string. Subcategory of the basic cause of death.

idade_obito_anos_min

numeric. Minimum age of death, in years.

idade_obito_anos_max

numeric. Maximum age of death, in years.

idade_obito_dias_min

numeric. Minimum age of death, in days.

idade_obito_dias_max

numeric. Maximum age of death, in days.

lucene_query

string. A more complex lucene query can be presented here. The string must be informed using sigle quotes. If used, all other filters will be ignored.

agg

string. Aggregation level. 'mun' for municipalities, 'uf' for "unidades federativas" or 'regsaude' for "regiões de saúde".

Details

This function uses raw data from the Sistema de Informações de Mortalidade (SIM) available at the PCDaS ElasticSearch cluster. A documentation about this data can be found at https://bigdata-metadados.icict.fiocruz.br/dataset/sistema-de-informacoes-de-mortalidade-sim. The CID-10 codes and name for chapters, group, category and subcategories of basic cause of death can be inspected at the same address above.

Value

A data.frame containing number of deceased (sim) for the aggregation level.

Examples

1
2
3
4
5
sim <- get_sim(conn = conn, ano = 2010, agr = "mun", sexo = "Masculino")
sim <- get_sim(conn = conn, ano = 2010, agr = "mun", causabas = "R98")
sim <- get_sim(conn = conn, ano = 2010, agr = "mun", causabas_categoria = "O01   Mola hidatiforme")
sim <- get_sim(conn = conn, ano = 2010, agr = "mun", idade_obito_anos_min = 0, idade_obito_anos_max = 1)
sim <- get_sim(conn = conn, ano = 2010, agr = "mun", idade_obito_dias_min = 0, idade_obito_dias_max = 1)

bigdata-icict/pcdasindi documentation built on March 11, 2020, 5:15 p.m.