fjelltopp / who-romania-ckan

A data library for the WHO Romania country office.
0 stars 0 forks source link

Script to upload existing family medicine #76

Closed ChasNelson1990 closed 2 days ago

ChasNelson1990 commented 2 days ago

The job is to write a CKAN script to upload the family medicine data:

ChasNelson1990 commented 2 days ago

Requirements: folders containing XLSX files need to be extracted to ./data and renamed using format : YYMM

!https://user-images.githubusercontent.com/15812707/270295368-c02754e9-2897-4b89-9176-fe71294a018f.png|alt="image"!

What is left to do: write a function to test if all files and sheets were processed into the new XLSX files and in the datasets.json file as well.

Issues I had: Updated pipfile to include OpenPyXL, locking fails though, so I used a temporary pipfile to generate the pipfile.lock

Sometimes, the contents of Report date and Report period are inter-exchanged (pic below)

How did I do: I took the report period as the report date

!https://user-images.githubusercontent.com/15812707/270298798-938fd6d6-bb7e-4263-b414-ce398eabe88d.png|alt="image"!

Sometimes, the report date is a Saturday (pic below)

How did I do: edited file and set report_date as the friday before

!https://user-images.githubusercontent.com/15812707/270298970-fcca1db0-424d-469c-86be-92fc2d0b977b.png|alt="image"!

For FD SERBAN, for July

How did I do: Changed it to be like others' reporting date

!https://user-images.githubusercontent.com/15812707/270343342-5aefc226-a786-4151-b59d-03a8d0536021.png|alt="image"!

For FB CHRISTIAN for April

report_date error or wrong file? I updated the report date to be the same as other sheets in the file

!https://user-images.githubusercontent.com/15812707/270577480-6b677dde-8a4d-4829-bc48-088a48ea1076.png|alt="image"!

I am not able to load the files for all seven month; {{ckanapi.errors.CKANAPIError: ['http://wrc.minikube/api/action/resource_create', 502, '\r\n502 Bad Gateway\r\n\r\n

502 Bad Gateway

\r\n
nginx
\r\n\r\n\r\n']}}

---------------- updates -------------------

ChasNelson1990 commented 2 days ago

In total there are 210 sheets (XLSX files) processed into 210 individual files Originally posted by A-Souhei on Jira.