Skip to content

Julia Package for reading DBC (.dbc) files from DATASUS into data frame tables

License

Notifications You must be signed in to change notification settings

lego-yaw/DBCDatasus.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ReadDBC

Stable Dev Build Status Coverage

ReadDBC.jl

  • A simple package for converting .dbc (compressed DBC) files from Datasus into .dbf (DBF) and data frames tables.

  • DATASUS plays a critical role in ensuring the efficient operation of Brazil's public health system. DATASUS is the name of the Departement of informatics of Brazil's health system (Sistema Unico de Saúde-SUS). They are responsible for maintaining and publishing Brazilian public health data. Aside this, the Brazilian National Agency for supplementary Health data (ANS), also use the same file format for storing public health data.

  • Please note that, this package only handles .dbc format used by DATASUS and is not in any way related to handling Microsoft Foxpro or CANdb DBC files.

Installation

  • Package can be installed like any other julia package
>>> ]
>>> add ReadDBC

or

>>> using Pkg
>>> Pkg.add("ReadDBC")

Usage

  • ReadDBC is simple to use
# converting dbc to dbf format
>>> using ReadDBC
>>> dbctodbc("path/to/file.dbc, path/to/file.dbf) # input file is .dbc file and output file is .dbf

# converting dbc into dataframe Table
>>> using ReadDBC
>>> df = dbcTable("path/to/file.dbc)" # input file is .dbc file and output file is in table format
>>> head(df) 

# Example
>>> using Download, using ReadDBC
>>> download("ftp://ftp.datasus.gov.br/dissemin/publicos/SIASUS/200801_/Dados/ABOAC1909.dbc", "ABOAC1909.dbc") # this link downlaods the ABOAC1909.dbc file from Datasus database.

# run fucntion
>>> df = dbcTable("ABOAC1909.dbc") ## read into dataframe Table
>>> display(df) 

or

>>> using ReadDBC
>>> dbctodbc("ABOAC1909.dbc", "ABOAC1909.dbf") # conversion into DBF format

Format description references

Contact information

Citation

About

Julia Package for reading DBC (.dbc) files from DATASUS into data frame tables

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages