Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/e-picsa/picsa-apps
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismclarke committed Aug 6, 2024
2 parents 24f8d91 + b531b3e commit bd3e98a
Show file tree
Hide file tree
Showing 26 changed files with 7,905 additions and 1,182 deletions.
14 changes: 13 additions & 1 deletion apps/picsa-server/scripts/crop-probability-parser/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,19 @@ Scripts to support parsing crop probability tables from docx files
Run directly with live-reload

```sh
npx tsx watch apps/picsa-server/scripts/crop-probability-parser/index.ts
npx tsx watch apps/picsa-server/scripts/crop-probability-parser/src/index.ts
```

## Input Data

Should be placed in `input` folder within 2-letter country folders, and subfolders by district subfolders.

If the district name can be identified from the subfolder it will be populated to output data

```
mw
| kasungu district sheets
| | crop-probability.docx
```

## TODO
Expand Down
247 changes: 0 additions & 247 deletions apps/picsa-server/scripts/crop-probability-parser/index.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { arrayToHashmap } from '../../../../../../libs/utils';

const MW_DISTRICTS = [
{ id: 'balaka', label: 'Balaka' },
{ id: 'blantyre', label: 'Blantyre' },
{ id: 'chikwawa', label: 'Chikwawa' },
{ id: 'chiradzulu', label: 'Chiradzulu' },
{ id: 'chitipa', label: 'Chitipa' },
{ id: 'dedza', label: 'Dedza' },
{ id: 'dowa', label: 'Dowa' },
{ id: 'karonga', label: 'Karonga' },
{ id: 'kasungu', label: 'Kasungu' },
{ id: 'likoma', label: 'Likoma' },
{ id: 'lilongwe', label: 'Lilongwe' },
{ id: 'machinga', label: 'Machinga' },
{ id: 'mangochi', label: 'Mangochi' },
{ id: 'mchinji', label: 'Mchinji' },
{ id: 'mulanje', label: 'Mulanje' },
{ id: 'mwanza', label: 'Mwanza' },
{ id: 'mzimba', label: 'Mzimba' },
{ id: 'neno', label: 'Neno' },
{ id: 'nkhata_bay', label: 'Nkhata Bay' },
{ id: 'nkhotakota', label: 'Nkhotakota' },
{ id: 'nsanje', label: 'Nsanje' },
{ id: 'ntcheu', label: 'Ntcheu' },
{ id: 'ntchisi', label: 'Ntchisi' },
{ id: 'phalombe', label: 'Phalombe' },
{ id: 'rumphi', label: 'Rumphi' },
{ id: 'salima', label: 'Salima' },
{ id: 'thyolo', label: 'Thyolo' },
{ id: 'zomba', label: 'Zomba' },
];

export const DISTRICTS = {
mw: arrayToHashmap(MW_DISTRICTS, 'label'),
};
Loading

0 comments on commit bd3e98a

Please sign in to comment.