Dataset

CODE-15%: large annotated 12-lead ECG dataset (Telehealth Network of Minas Gerais)

ECGCC BY 4.0

CODE-15% is a 12-lead ECG dataset drawn by stratified sampling of 15% of the patients in the larger CODE dataset. The exams were collected by the Telehealth Network of Minas Gerais in Brazil between 2010 and 2016. Each exam comes with patient age, sex and a neural-network-predicted ECG age, as used in a study of ECG age as a mortality predictor.

  • Published: Zenodo, 2021
  • Source: Telehealth Network of Minas Gerais, 2010 to 2016
  • Sampling: stratified 15% of patients from the CODE dataset
  • License: CC BY 4.0
At a glance
Type
Dataset
Host
Not reported
Access
Not reported
Subjects
Not reported
Signals
ECG
PPG sites
None
Setting
Not reported
Wrist
Not reported
Raw waveforms
Not reported
Tasks
AFib
Updated
Oct 16, 2026

Original description

A dataset of 12-lead ECGs with annotations. The dataset contains 345 779 exams from 233 770 patients. It was obtained through stratified sampling from the CODE dataset ( 15% of the patients). The data was collected by the Telehealth Network of Minas Gerais in the period between 2010 and 2016.

This repository contains the files `exams.csv` and the files `exams_parti.zip` for i = 0, 1, 2, ... 17.

"exams.csv": is a comma-separated values (csv) file containing the columns

"exam_id": id used for identifying the exam; "age": patient age in years at the moment of the exam; "is_male": true if the patient is male; "nn_predicted_age": age predicted by a neural network to the patient. As described in the paper "Deep neural network estimated electrocardiographic-age as a mortality predictor" bellow. "1dAVb": Whether or not the patient has 1st degree AV block; "RBBB": Whether or not the patient has right bundle branch block; "LBBB": Whether or not the patient has left bundle branch block; "SB": Whether or not the patient has sinus bradycardia; "AF": Whether or not the patient has atrial fibrillation; "ST": Whether or not the patient has sinus tachycardia; "patient_id": id used for identifying the patient; "normal_ecg": True if automatic annotation system say it is a normal ECG; "death": true if the patient dies in the follow-up time. This data is available only in the first exam of the patient. Other exams will have this as an empty field; "timey": if the patient dies it is the time to the death of the patient. If not, it is the follow-up time. This data is available only in the first exam of the patient. Other exams will have this as an empty field; "trace_file": identify in which hdf5 file the file corresponding to this patient is located.

"exams_parti.hdf5": The HDF5 file containing two datasets named `tracings` and other named `exam_id`. The `exam_id` is a tensor of dimension `(N,)` containing the exam id (the same as in the csv file) and the dataset `tracings` is a `(N, 4096, 12)` tensor containing the ECG tracings in the same order. The first dimension corresponds to the different exams; the second dimension corresponds to the 4096 signal samples; the third dimension to the 12 different leads of the ECG exams in the following order: `DI, DII, DIII, AVR, AVL, AVF, V1, V2, V3, V4, V5, V6`. The signals are sampled at 400 Hz. Some signals originally have a duration of 10 seconds (10 * 400 = 4000 samples) and others of 7 seconds (7 * 400 = 2800 samples). In order to make them all have the same size (4096 samples), we fill them with zeros on both sizes. For instance, for a 7 seconds ECG signal with 2800 samples we include 648 samples at the beginning and 648 samples at the end, yielding 4096 samples that are then saved in the hdf5 dataset.  In python, one can read this file using h5py.

```python

import h5py

f = h5py.File(path_to_file, 'r')

# Get ids

traces_ids = np.array(self.f['id_exam'])

x = f['signal']

```

The `signal` dataset is too large to fit in memory, so don't convert it to a numpy array all at once.

It is possible to access a chunk of it using: ``x[start:end, :, :]``.

The CODE dataset was collected by the Telehealth Network of Minas Gerais (TNMG) in the period between 2010 and 2016. TNMG is a public telehealth system assisting 811 out of the 853 municipalities in the state of Minas Gerais, Brazil. The dataset is described

Ribeiro, Antônio H., Manoel Horta Ribeiro, Gabriela M. M. Paixão, Derick M. Oliveira, Paulo R. Gomes, Jéssica A. Canazart, Milton P. S. Ferreira, et al. “Automatic Diagnosis of the 12-Lead ECG Using a Deep Neural Network.” Nature Communications 11, no. 1 (2020): 1760. https://doi.org/10.1038/s41467-020-15432-4

The CODE 15% dataset is obtained from stratified sampling from the CODE dataset. This subset of the code dataset is described in and used for assessing model performance:

"Deep neural network estimated electrocardiographic-age as a mortality predictor"

Emilly M Lima, Antônio H Ribeiro, Gabriela MM Paixão, Manoel Horta Ribeiro, Marcelo M Pinto Filho, Paulo R Gomes, Derick M Oliveira, Ester C Sabino, Bruce B Duncan, Luana Giatti, Sandhi M Barreto, Wagner Meira Jr, Thomas B Schön, Antonio Luiz P Ribeiro. MedRXiv (2021) https://www.doi.org/10.1101/2021.02.19.21251232

The companion code for reproducing the experiments in the two papers described above can be found, respectively, in:

- https://github.com/antonior92/automatic-ecg-diagnosis; and in,

- https://github.com/antonior92/ecg-age-prediction.

Note about authorship: Antônio H. Ribeiro, Emilly M. Lima and Gabriela M.M. Paixão contributed equally to this work.

Verbatim fromZenodo· Licence: cc-by-4.0

CODE-15%: large annotated 12-lead ECG dataset (Telehealth Network of Minas Gerais): ChatPPG research summary card

How it works

How CODE-15%: large annotated 12-lead ECG dataset (Telehealth Network of Minas Gerais) works: Devices & body sites → Signals recorded → TasksDevices & body sites: None (PPG site). Signals recorded: CODE-15%: large annotated 12-lead ECG dataset (Telehealth Network of Minas Gerais), signals ECG. Tasks: AF / rhythm.Devices & body sitesNone: PPG siteNonePPG siteSignals recordedCODE-15%: large annotated…ECGTasksAF / rhythmAF / rhythm

No model in the hub reports results on this dataset yet.

Device roles
Clinical reference (ECG)

Models trained or evaluated on it

No model in the hub reports results on CODE-15%: large annotated 12-lead ECG dataset (Telehealth Network of Minas Gerais) yet. Be the first: results submitted with a paper are added here.

Cite

@misc{code152026,
  title = {{CODE-15%: large annotated 12-lead ECG dataset (Telehealth Network of Minas Gerais)}},
  year = {2026},
  doi = {10.5281/zenodo.4916206},
  url = {https://zenodo.org/records/4916206}
}

History

  1. Record updated