averbis / averbis-python-api

Conveniently access the REST API of Averbis products using Python
Apache License 2.0
12 stars 4 forks source link

Export to Excel functionality #94

Open pdaumke-averbis opened 2 years ago

pdaumke-averbis commented 2 years ago

Hi,

would it be possible to create a functionality that exports annotation results into an Excel sheet (one sheet per annotation type)?

The following pseudo code could be an examples. Results of a textanalysis process (=annotations) are written in an Excel sheet with 2 worksheets 'Diagnoses' and 'Score'. The features for each annotation (= columns of a worksheet) are denoted, columns can be named separately:

to_excel(file = "data/results.xlsx", annotations,
   [sheet_name='Diagnoses', ann_type = 'de.averbis.types.health.Diagnosis', features = ['conceptID', 'dictCanon'], columns = ['ID', 'Name'] , 
    sheet_name='Score', ann_type = 'de.averbis.custom.types.MedicalScore', features = [['parameter']['label'], ['parameter']['value']], columns = ['Name', 'Value']])