|
4 | 4 | [](https://lego-yaw.github.io/ReadDBC.jl/dev/)
|
5 | 5 | [](https://github.com/lego-yaw/ReadDBC.jl/actions/workflows/CI.yml?query=branch%3Amain)
|
6 | 6 | [](https://codecov.io/gh/lego-yaw/ReadDBC.jl)
|
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | +### ReadDBC.jl |
| 11 | ++ A simple package for converting *.dbc* (compressed DBC) files from Datasus into *.dbf* (DBF) and *data frames* tables. |
| 12 | + |
| 13 | ++ 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. |
| 14 | + |
| 15 | ++ *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. |
| 16 | + |
| 17 | +## Installation |
| 18 | ++ Package can be installed like any other julia package |
| 19 | + |
| 20 | +```Julia-repl |
| 21 | +>>> ] |
| 22 | +>>> add ReadDBC |
| 23 | +``` |
| 24 | +or |
| 25 | + |
| 26 | +``` |
| 27 | +>>> using Pkg |
| 28 | +>>> Pkg.add("ReadDBC") |
| 29 | +``` |
| 30 | +# Usage |
| 31 | ++ ReadDBC is simple to use |
| 32 | + |
| 33 | +``` |
| 34 | +# converting dbc to dbf format |
| 35 | +>>> using ReadDBC |
| 36 | +>>> dbctodbc("path/to/file.dbc, path/to/file.dbf) # input file is .dbc file and output file is .dbf |
| 37 | +
|
| 38 | +# converting dbc into dataframe Table |
| 39 | +>>> using readdbc |
| 40 | +>>> df = dbcTable("path/to/file.dbc)" # input file is .dbc file and output file is in table format |
| 41 | +>>> head(df) |
| 42 | +
|
| 43 | +# Example |
| 44 | +>>> using Download, using ReadDBC |
| 45 | +>>> 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. |
| 46 | +
|
| 47 | +# run fucntion |
| 48 | +>>> df = dbcTable("ABOAC1909.dbc") ## read into dataframe Table |
| 49 | +>>> display(df) |
| 50 | +
|
| 51 | +or |
| 52 | +
|
| 53 | +>>> using ReadDBC |
| 54 | +>>> dbctodbc("ABOAC1909.dbc", "ABOAC1909.dbf") # conversion into DBF format |
| 55 | +
|
| 56 | +``` |
| 57 | + |
| 58 | +# Format description references |
| 59 | + |
| 60 | +* https://en.wikipedia.org/wiki/.dbf |
| 61 | +* https://www.clicketyclick.dk/databases/xbase/format/dbf.html |
| 62 | +* http://www.independent-software.com/dbase-dbf-dbt-file-format.html |
| 63 | + |
| 64 | +# Contact information |
| 65 | ++ if you have any questions or suggestions, feel free to contact at [email protected] |
| 66 | + |
| 67 | +# Citation |
| 68 | ++ This project is based on the work of https://github.com/madler/zlib/tree/master/contrib/blast and https:// github.com/eaglebh/blast-dbf and the R version developed by danicat(https://github.com/danicat/read.dbc). |
| 69 | +Also this package wouldn't have been possible without DBFTable (https://github.com/JuliaData/DBFTables.jl) |
| 70 | + |
| 71 | ++ Neither this project, nor its author, is related in any way to the Brazilian government. |
0 commit comments