SidneyBissoli commited on
Commit
d9cdfce
·
verified ·
1 Parent(s): 6e80fcb

Dataset card: add Reproducibility & provenance section (sipni-agregados-cobertura-README.md)

Browse files
Files changed (1) hide show
  1. README.md +237 -218
README.md CHANGED
@@ -1,218 +1,237 @@
1
- ---
2
- language:
3
- - pt
4
- license: cc-by-4.0
5
- tags:
6
- - health
7
- - brazil
8
- - public-health
9
- - parquet
10
- - datasus
11
- - sipni
12
- - vaccination
13
- - immunization
14
- - coverage
15
- - historical
16
- pretty_name: "SI-PNI — Aggregated Vaccination Coverage (Brazil, 1994–2019)"
17
- size_categories:
18
- - 1M<n<10M
19
- task_categories:
20
- - tabular-classification
21
- source_datasets:
22
- - original
23
- ---
24
-
25
- # SI-PNI — Aggregated Vaccination Coverage (Brazil, 1994–2019)
26
-
27
- Historical aggregated vaccination coverage data from Brazil's National
28
- Immunization Program (SI-PNI), covering 26 years of municipality-level
29
- coverage indicators pre-calculated by the Ministry of Health. Converted
30
- from legacy .dbf files to Apache Parquet.
31
-
32
- **Part of the [healthbr-data](https://huggingface.co/SidneyBissoli) project** — open redistribution of Brazilian public health data.
33
-
34
- ## Summary
35
-
36
- | Item | Detail |
37
- |------|--------|
38
- | **Official source** | DATASUS FTP / Ministry of Health |
39
- | **Temporal coverage** | 1994–2019 |
40
- | **Geographic coverage** | All Brazilian municipalities (by state) |
41
- | **Granularity** | Aggregated: one row per municipality × composite vaccine indicator |
42
- | **Volume** | 2.8M+ records (686 .dbf files processed) |
43
- | **Format** | Apache Parquet, partitioned by `ano/uf` |
44
- | **Data types** | All fields stored as `string` (preserves original format) |
45
- | **Update frequency** | Static (historical series, no longer updated at source) |
46
- | **License** | CC-BY 4.0 |
47
-
48
- ## Resumo em português
49
-
50
- **SI-PNI — Cobertura Vacinal Agregada (Brasil, 1994–2019)**
51
-
52
- Dados históricos agregados de cobertura vacinal do Programa Nacional de
53
- Imunizações (PNI), cobrindo 26 anos de indicadores de cobertura em nível
54
- municipal, pré-calculados pelo Ministério da Saúde. Convertidos de
55
- arquivos .dbf legados para Apache Parquet.
56
-
57
- | Item | Detalhe |
58
- |------|---------|
59
- | **Fonte oficial** | FTP DATASUS / Ministério da Saúde |
60
- | **Cobertura temporal** | 1994–2019 |
61
- | **Cobertura geográfica** | Todos os municípios brasileiros (por UF) |
62
- | **Granularidade** | Agregado: uma linha por município × indicador composto de vacina |
63
- | **Volume** | 2,8M+ registros (686 arquivos .dbf processados) |
64
- | **Formato** | Apache Parquet, particionado por `ano/uf` |
65
- | **Atualização** | Estática (série histórica, não atualizada na fonte) |
66
-
67
- > Para documentação completa em português, consulte o
68
- > [repositório do projeto](https://github.com/SidneyBissoli/healthbr-data).
69
-
70
- ## Data access
71
-
72
- Data is hosted on Cloudflare R2 and accessed via S3-compatible API. The
73
- credentials below are **read-only** and intended for public use.
74
-
75
- ### R (Arrow)
76
-
77
- ```r
78
- library(arrow)
79
- library(dplyr)
80
-
81
- Sys.setenv(
82
- AWS_ENDPOINT_URL = "https://5c499208eebced4e34bd98ffa204f2fb.r2.cloudflarestorage.com",
83
- AWS_ACCESS_KEY_ID = "28c72d4b3e1140fa468e367ae472b522",
84
- AWS_SECRET_ACCESS_KEY = "2937b2106736e2ba64e24e92f2be4e6c312bba3355586e41ce634b14c1482951",
85
- AWS_DEFAULT_REGION = "auto"
86
- )
87
-
88
- ds <- open_dataset("s3://healthbr-data/sipni/agregados/cobertura/", format = "parquet")
89
-
90
- # Example: coverage indicators in São Paulo, 2015
91
- ds |>
92
- filter(ano == "2015", uf == "SP") |>
93
- head(20) |>
94
- collect()
95
- ```
96
-
97
- ### Python (PyArrow)
98
-
99
- ```python
100
- import pyarrow.dataset as pds
101
- import pyarrow.fs as fs
102
-
103
- s3 = fs.S3FileSystem(
104
- endpoint_override = "https://5c499208eebced4e34bd98ffa204f2fb.r2.cloudflarestorage.com",
105
- access_key = "28c72d4b3e1140fa468e367ae472b522",
106
- secret_key = "2937b2106736e2ba64e24e92f2be4e6c312bba3355586e41ce634b14c1482951",
107
- region = "auto"
108
- )
109
-
110
- dataset = pds.dataset(
111
- "healthbr-data/sipni/agregados/cobertura/",
112
- filesystem = s3,
113
- format = "parquet",
114
- partitioning = "hive"
115
- )
116
-
117
- table = dataset.to_table(
118
- filter=(pds.field("ano") == "2015") & (pds.field("uf") == "SP")
119
- )
120
- print(table.to_pandas().head())
121
- ```
122
-
123
- > **Note:** These credentials are **read-only** and safe to use in scripts.
124
- > The bucket does not allow anonymous S3 access — credentials are required.
125
-
126
- ## File structure
127
-
128
- ```
129
- s3://healthbr-data/sipni/agregados/cobertura/
130
- README.md
131
- ano=1994/
132
- uf=AC/
133
- part-0.parquet
134
- uf=AL/
135
- part-0.parquet
136
- ...
137
- ano=1995/
138
- ...
139
- ```
140
-
141
- ## Structural eras
142
-
143
- The .dbf files underwent one major structural transition:
144
-
145
- | Era | Period | Columns | Key difference |
146
- |:---:|--------|:-------:|----------------|
147
- | 1 | 1994–2012 | 9 | Includes DOSE, FX_ETARIA; COBERT as numeric (decimal point) |
148
- | 2 | 2013–2019 | 7 | DOSE and FX_ETARIA removed; COB as character (decimal comma) |
149
-
150
- The coverage field name and format changed: `COBERT` (numeric, periods) in
151
- era 1 vs `COB` (character, commas) in era 2. Both are preserved as-is.
152
-
153
- ## Schema
154
-
155
- Key variables (varies by era):
156
-
157
- | Variable | Description | Available |
158
- |----------|-------------|:---------:|
159
- | `MUNICIP` | Municipality code | All eras |
160
- | `IMESSION` | Composite vaccine indicator code (per IMUNOCOB.DBF, 26 indicators) | All eras |
161
- | `COBERT` / `COB` | Coverage percentage (pre-calculated by Ministry) | Era 1 / Era 2 |
162
- | `QT_DOSE` | Number of administered doses | All eras |
163
- | `POP` | Target population (denominator) | All eras |
164
- | `DOSE` | Dose type | Era 1 only |
165
- | `FX_ETARIA` | Age group | Era 1 only |
166
-
167
- **Important:** The vaccine codes in coverage files use the `IMUNOCOB.DBF`
168
- dictionary (26 composite indicators), which is different from the
169
- `IMUNO.CNV` dictionary used in the doses files (85 individual vaccines).
170
- Coverage indicators often combine multiple individual vaccines into a single
171
- metric (e.g., "Polio" coverage combines OPV and IPV doses).
172
-
173
- ## Source and processing
174
-
175
- **Original source:** 702 .dbf files (dBase III) from the DATASUS FTP server.
176
- Of these, 686 were successfully processed (remaining were unavailable or
177
- empty). Bootstrap time: 44 minutes for 2,762,327 records.
178
-
179
- **Processing:** .dbf → R (`foreign::read.dbf`) → Parquet (`arrow::write_dataset`)
180
- → upload to R2 (`rclone`). No transformations are applied. Consolidated
181
- files (UF, BR, IG prefixes) were excluded.
182
-
183
- ## Known limitations
184
-
185
- 1. **Government data, not ours.** Values are preserved exactly as in the
186
- original .dbf files, including the pre-calculated coverage percentages.
187
- 2. **Two structural eras.** Dose and age group columns disappear in 2013.
188
- Coverage field name and decimal format change between eras.
189
- 3. **Composite indicators.** The IMUNOCOB dictionary combines multiple
190
- vaccines into single coverage metrics. The mapping rules are complex
191
- and changed over time.
192
- 4. **All fields are strings.** The coverage percentage field must be parsed
193
- by the user (note the decimal point vs comma difference between eras).
194
- 5. **Static dataset.** No longer updated at source after 2019.
195
- 6. **Coverage doses.** This dataset contains pre-calculated coverage
196
- rates. For raw dose counts, see `sipni-agregados-doses`.
197
-
198
- ## Citation
199
-
200
- ```bibtex
201
- @misc{healthbrdata,
202
- author = {Sidney da Silva Bissoli},
203
- title = {healthbr-data: Redistribution of Brazilian Public Health Data},
204
- year = {2026},
205
- url = {https://huggingface.co/datasets/SidneyBissoli/sipni-agregados-cobertura},
206
- note = {Original source: Ministry of Health / DATASUS}
207
- }
208
- ```
209
-
210
- ## Contact
211
-
212
- - **GitHub:** [https://github.com/SidneyBissoli](https://github.com/SidneyBissoli)
213
- - **Hugging Face:** [https://huggingface.co/SidneyBissoli](https://huggingface.co/SidneyBissoli)
214
- - **E-mail:** sbissoli76@gmail.com
215
-
216
- ---
217
-
218
- *Last updated: 2026-02-28*
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - pt
4
+ license: cc-by-4.0
5
+ tags:
6
+ - health
7
+ - brazil
8
+ - public-health
9
+ - parquet
10
+ - datasus
11
+ - sipni
12
+ - vaccination
13
+ - immunization
14
+ - coverage
15
+ - historical
16
+ pretty_name: "SI-PNI — Aggregated Vaccination Coverage (Brazil, 1994–2019)"
17
+ size_categories:
18
+ - 1M<n<10M
19
+ task_categories:
20
+ - tabular-classification
21
+ source_datasets:
22
+ - original
23
+ ---
24
+
25
+ # SI-PNI — Aggregated Vaccination Coverage (Brazil, 1994–2019)
26
+
27
+ Historical aggregated vaccination coverage data from Brazil's National
28
+ Immunization Program (SI-PNI), covering 26 years of municipality-level
29
+ coverage indicators pre-calculated by the Ministry of Health. Converted
30
+ from legacy .dbf files to Apache Parquet.
31
+
32
+ **Part of the [healthbr-data](https://huggingface.co/SidneyBissoli) project** — open redistribution of Brazilian public health data.
33
+
34
+ ## Summary
35
+
36
+ | Item | Detail |
37
+ |------|--------|
38
+ | **Official source** | DATASUS FTP / Ministry of Health |
39
+ | **Temporal coverage** | 1994–2019 |
40
+ | **Geographic coverage** | All Brazilian municipalities (by state) |
41
+ | **Granularity** | Aggregated: one row per municipality × composite vaccine indicator |
42
+ | **Volume** | 2.8M+ records (686 .dbf files processed) |
43
+ | **Format** | Apache Parquet, partitioned by `ano/uf` |
44
+ | **Data types** | All fields stored as `string` (preserves original format) |
45
+ | **Update frequency** | Static (historical series, no longer updated at source) |
46
+ | **License** | CC-BY 4.0 |
47
+
48
+ ## Resumo em português
49
+
50
+ **SI-PNI — Cobertura Vacinal Agregada (Brasil, 1994–2019)**
51
+
52
+ Dados históricos agregados de cobertura vacinal do Programa Nacional de
53
+ Imunizações (PNI), cobrindo 26 anos de indicadores de cobertura em nível
54
+ municipal, pré-calculados pelo Ministério da Saúde. Convertidos de
55
+ arquivos .dbf legados para Apache Parquet.
56
+
57
+ | Item | Detalhe |
58
+ |------|---------|
59
+ | **Fonte oficial** | FTP DATASUS / Ministério da Saúde |
60
+ | **Cobertura temporal** | 1994–2019 |
61
+ | **Cobertura geográfica** | Todos os municípios brasileiros (por UF) |
62
+ | **Granularidade** | Agregado: uma linha por município × indicador composto de vacina |
63
+ | **Volume** | 2,8M+ registros (686 arquivos .dbf processados) |
64
+ | **Formato** | Apache Parquet, particionado por `ano/uf` |
65
+ | **Atualização** | Estática (série histórica, não atualizada na fonte) |
66
+
67
+ > Para documentação completa em português, consulte o
68
+ > [repositório do projeto](https://github.com/SidneyBissoli/healthbr-data).
69
+
70
+ ## Data access
71
+
72
+ Data is hosted on Cloudflare R2 and accessed via S3-compatible API. The
73
+ credentials below are **read-only** and intended for public use.
74
+
75
+ ### R (Arrow)
76
+
77
+ ```r
78
+ library(arrow)
79
+ library(dplyr)
80
+
81
+ Sys.setenv(
82
+ AWS_ENDPOINT_URL = "https://5c499208eebced4e34bd98ffa204f2fb.r2.cloudflarestorage.com",
83
+ AWS_ACCESS_KEY_ID = "28c72d4b3e1140fa468e367ae472b522",
84
+ AWS_SECRET_ACCESS_KEY = "2937b2106736e2ba64e24e92f2be4e6c312bba3355586e41ce634b14c1482951",
85
+ AWS_DEFAULT_REGION = "auto"
86
+ )
87
+
88
+ ds <- open_dataset("s3://healthbr-data/sipni/agregados/cobertura/", format = "parquet")
89
+
90
+ # Example: coverage indicators in São Paulo, 2015
91
+ ds |>
92
+ filter(ano == "2015", uf == "SP") |>
93
+ head(20) |>
94
+ collect()
95
+ ```
96
+
97
+ ### Python (PyArrow)
98
+
99
+ ```python
100
+ import pyarrow.dataset as pds
101
+ import pyarrow.fs as fs
102
+
103
+ s3 = fs.S3FileSystem(
104
+ endpoint_override="https://5c499208eebced4e34bd98ffa204f2fb.r2.cloudflarestorage.com",
105
+ access_key="28c72d4b3e1140fa468e367ae472b522",
106
+ secret_key="2937b2106736e2ba64e24e92f2be4e6c312bba3355586e41ce634b14c1482951",
107
+ region="auto"
108
+ )
109
+
110
+ dataset = pds.dataset(
111
+ "healthbr-data/sipni/agregados/cobertura/",
112
+ filesystem=s3,
113
+ format="parquet",
114
+ partitioning="hive"
115
+ )
116
+
117
+ table = dataset.to_table(
118
+ filter=(pds.field("ano") == "2015") & (pds.field("uf") == "SP")
119
+ )
120
+ print(table.to_pandas().head())
121
+ ```
122
+
123
+ > **Note:** These credentials are **read-only** and safe to use in scripts.
124
+ > The bucket does not allow anonymous S3 access — credentials are required.
125
+
126
+ ## File structure
127
+
128
+ ```
129
+ s3://healthbr-data/sipni/agregados/cobertura/
130
+ README.md
131
+ ano=1994/
132
+ uf=AC/
133
+ part-0.parquet
134
+ uf=AL/
135
+ part-0.parquet
136
+ ...
137
+ ano=1995/
138
+ ...
139
+ ```
140
+
141
+ ## Structural eras
142
+
143
+ The .dbf files underwent one major structural transition:
144
+
145
+ | Era | Period | Columns | Key difference |
146
+ |:---:|--------|:-------:|----------------|
147
+ | 1 | 1994–2012 | 9 | Includes DOSE, FX_ETARIA; COBERT as numeric (decimal point) |
148
+ | 2 | 2013–2019 | 7 | DOSE and FX_ETARIA removed; COB as character (decimal comma) |
149
+
150
+ The coverage field name and format changed: `COBERT` (numeric, periods) in
151
+ era 1 vs `COB` (character, commas) in era 2. Both are preserved as-is.
152
+
153
+ ## Schema
154
+
155
+ Key variables (varies by era):
156
+
157
+ | Variable | Description | Available |
158
+ |----------|-------------|:---------:|
159
+ | `MUNICIP` | Municipality code | All eras |
160
+ | `IMESSION` | Composite vaccine indicator code (per IMUNOCOB.DBF, 26 indicators) | All eras |
161
+ | `COBERT` / `COB` | Coverage percentage (pre-calculated by Ministry) | Era 1 / Era 2 |
162
+ | `QT_DOSE` | Number of administered doses | All eras |
163
+ | `POP` | Target population (denominator) | All eras |
164
+ | `DOSE` | Dose type | Era 1 only |
165
+ | `FX_ETARIA` | Age group | Era 1 only |
166
+
167
+ **Important:** The vaccine codes in coverage files use the `IMUNOCOB.DBF`
168
+ dictionary (26 composite indicators), which is different from the
169
+ `IMUNO.CNV` dictionary used in the doses files (85 individual vaccines).
170
+ Coverage indicators often combine multiple individual vaccines into a single
171
+ metric (e.g., "Polio" coverage combines OPV and IPV doses).
172
+
173
+ ## Source and processing
174
+
175
+ **Original source:** 702 .dbf files (dBase III) from the DATASUS FTP server.
176
+ Of these, 686 were successfully processed (remaining were unavailable or
177
+ empty). Bootstrap time: 44 minutes for 2,762,327 records.
178
+
179
+ **Processing:** .dbf → R (`foreign::read.dbf`) → Parquet (`arrow::write_dataset`)
180
+ → upload to R2 (`rclone`). No transformations are applied. Consolidated
181
+ files (UF, BR, IG prefixes) were excluded.
182
+
183
+ ## Reproducibility & provenance
184
+
185
+ This is a static, closed series (source no longer updated by the Ministry),
186
+ converted once by pipeline version 1.0.0. Provenance is recorded per partition
187
+ in `manifest.json` on R2 (source URL, MD5 and size, processing timestamp,
188
+ output file paths and sizes, record count) and per source file in
189
+ `data/controle_versao_sipni_agregados_cobertura.csv` in the GitHub repository
190
+ (MD5, size, record and column counts). The Parquet files themselves do **not**
191
+ carry the embedded `healthbr` metadata record used by the dynamic datasets;
192
+ use `manifest.json` to check size and record count of a copy and to locate the
193
+ original .dbf on the DATASUS FTP. The pipeline is a deterministic function of
194
+ the source (all fields read as text, no value transformation), so any
195
+ partition can be regenerated from the original file and the pipeline script at
196
+ the commit recorded in the repository history. Data are **not** versioned: the
197
+ R2 copy is the latest publication; revisions by the Ministry replace files,
198
+ and the history of *what* was published *when* lives in the version-control
199
+ CSV's git log. Full policy and audit recipe:
200
+ [docs/policy-reproducibility-pt.md](https://github.com/SidneyBissoli/healthbr-data/blob/master/docs/policy-reproducibility-pt.md).
201
+
202
+ ## Known limitations
203
+
204
+ 1. **Government data, not ours.** Values are preserved exactly as in the
205
+ original .dbf files, including the pre-calculated coverage percentages.
206
+ 2. **Two structural eras.** Dose and age group columns disappear in 2013.
207
+ Coverage field name and decimal format change between eras.
208
+ 3. **Composite indicators.** The IMUNOCOB dictionary combines multiple
209
+ vaccines into single coverage metrics. The mapping rules are complex
210
+ and changed over time.
211
+ 4. **All fields are strings.** The coverage percentage field must be parsed
212
+ by the user (note the decimal point vs comma difference between eras).
213
+ 5. **Static dataset.** No longer updated at source after 2019.
214
+ 6. **Coverage ≠ doses.** This dataset contains pre-calculated coverage
215
+ rates. For raw dose counts, see `sipni-agregados-doses`.
216
+
217
+ ## Citation
218
+
219
+ ```bibtex
220
+ @misc{healthbrdata,
221
+ author = {Sidney da Silva Bissoli},
222
+ title = {healthbr-data: Redistribution of Brazilian Public Health Data},
223
+ year = {2026},
224
+ url = {https://huggingface.co/datasets/SidneyBissoli/sipni-agregados-cobertura},
225
+ note = {Original source: Ministry of Health / DATASUS}
226
+ }
227
+ ```
228
+
229
+ ## Contact
230
+
231
+ - **GitHub:** [https://github.com/SidneyBissoli](https://github.com/SidneyBissoli)
232
+ - **Hugging Face:** [https://huggingface.co/SidneyBissoli](https://huggingface.co/SidneyBissoli)
233
+ - **E-mail:** sbissoli76@gmail.com
234
+
235
+ ---
236
+
237
+ *Last updated: 2026-02-28*