Skip to content

Commit

Permalink
Major refactoring and customization (#15)
Browse files Browse the repository at this point in the history
* Added skip logic if a variable is not found. Reads from DRC training dataset

* Added logging

* Major refactoring

* Renamed HFC.py into main.py

* Updated gitignore

* Changed ID04 into ID04LABEL

* Added documentation to classes

* Revert "Changed ID04 into ID04LABEL"

This reverts commit 02b2807.

* Clean Unused Files

* Fixed indentation error

* Refactored MasterSheet

* LCS

* added lcs_en

* Refactored main.py and added main config file to specify indicators

* Testing All Indicators

* Switched Off LCS-EN

* Changed Non-Existant Module Log from Error to Warning

* Added Warnings count

* removed report generator from root directoy

* Urban/Rural Context

* DataFrameCustomizer

* Added Timing Checks

* Adusted time_thresholds

* timing variable names

* Date Parsing

* No Error raised if reports folder does not exist

* Added variables for DRC

* Refactored logging configuration and updated ROADMAP

* Refactored main

* Re-added loading of mastersheet report to DataBridges

* Refactored main

---------

Co-authored-by: Ali Assi <[email protected]>
  • Loading branch information
AlexGherardelli and AssiALi16 authored Jul 2, 2024
1 parent c0616bf commit 062b5c3
Show file tree
Hide file tree
Showing 80 changed files with 10,424 additions and 1,257 deletions.
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -173,16 +173,16 @@ EGCO_Sudanese_24_HFC.do
HFC_FCS
*.ipynb


# data
*.xlsx
*.csv

# other files
ROADMAP.md
NOTES.md

*.log
data_processing_log.txt

# config files
data_bridges_api_config.yaml
.env
*.log
data_processing_log.txt
81 changes: 0 additions & 81 deletions HFC.py

This file was deleted.

56 changes: 22 additions & 34 deletions ROADMAP.md
Original file line number Diff line number Diff line change
@@ -1,55 +1,43 @@
# High Frenquency Checks for WFP Food Security Assessments - ROADMAP

## v0.1.0 (Enumerator Training)
## v0.1.0 Stable

### Indicator checks

### Checks
- [X] FCS
- [X] rCSI
- [X] HDDS
- [X] Demographics
- [X] Food Expenditures
- [X] Non-food Expenditures
- [X] LCS

### Data connector
- [X] Get data from DataBridges
- [ ] Parse data as int

### Visualization
- [ ] Output master report in DB
- [ ] Output master report in Tableau

## v.0.2.0
### Indicator checks
- [ ] HHS

### Enumerator performance
- [ ] Average daily completion by enumerator
- Flag invalid survey with interview less than 5 minutes
- Flag short survey (<45 minutes)
- Flag long survey (>150 minutes)
- [ ] Total survey completed
- [ ] Total survey completed by admin region (see sample size)
- [ ] Average daily completion by enumerator
- [ ] Survey duration too short
- [ ] Survey duration too long
- [ ] Flag invalid survey with interview less than 5 minutes
- [ ] Flag short survey
- [ ] Flag long survey
- [ ] Enumerator completion (overall number by day and scatter hours of the day if real-time submission is possible)

### Logbook
- [ ] Create issue log in Excel
- [ ] Create issue log with format ```uuid | issue | action | old.value | new.value```

### Data connector
- [X] Get data from DataBridges

### Deployment
- [ ] Run code on a schedule from HPC
- [ ] Output report in Tableau

## v.2.0
- [ ] Configuration in settings
- [ ] Revamp output report in Tableau
- [ ]

## Future releases (1.0.0)
- [ ] Additional checks
- [ ] Make config.py something usable with no knowledge of Python (CSV input)
- [ ] Optimize output (e.g. Excel vs CSV vs other format)
- [ ] Dashboard
- [ ] Optimize code (e.g. not running everything on all the dataset, but just on the data that have been collected the day before)
- [ ] Endpoint through Core Engine

## Future releases

## Issues
- Running wrong CO
- Full vs Base
- Where to export the report
- DB -> Tableau
- [X] Make config.py something usable with no knowledge of Python (CSV input)
- [ ] Make the output less ugly
- [ ] Optimize code (e.g. not running everything on all the dataset, but just on the data that have been collected the day before)
69 changes: 0 additions & 69 deletions config.py

This file was deleted.

45 changes: 0 additions & 45 deletions config.yaml

This file was deleted.

Loading

0 comments on commit 062b5c3

Please sign in to comment.