Skip to contents

Retrieve data

The main retrieval function and one shortcut per theme.

mds_data()
Fetch MI Social data
mds_cadunico()
Cadastro Unico: registered families and people, by income bracket
mds_bolsa_familia()
Bolsa Familia programme: beneficiary families, benefits and transfers
mds_bpc_suas()
BPC and social assistance network (CRAS, CREAS)
mds_suas_rede()
Social assistance network (CadSUAS)
mds_suas_financiamento()
SUAS funding: FNAS transfers, account balances and IGD-M
mds_pbf_condicionalidades()
Bolsa Familia conditionalities: education and health follow-up
mds_seguranca_alimentar()
Food and nutrition security: PAA, Fomento Rural and cisterns

Discover themes, fields, periods and localities

The curated dictionary, everything the API has, and what is available where and when.

mds_themes()
List the themes covered by the package
mds_fields()
List curated fields
mds_api_fields()
List the fields published for one municipality
mds_periods()
List the periods available for a field
mds_localities()
List municipalities available in the API

Publication status

The API answers 0 for months not yet published; remove or flag them explicitly.

mds_drop_unpublished()
Drop (or flag) months that were not published yet

Utilities

Helpers and cache management.

ibge_code7()
Convert 6-digit MDS municipality codes to 7-digit IBGE codes
mds_clear_cache()
Clear the session cache