Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get all the undernutrition (child and mother) indicators into one data.frame and then merged all in one go with the maps prior to mapping. #48

Open
Tracked by #42
ernestguevarra opened this issue Feb 22, 2024 · 4 comments
Assignees
Labels

Comments

@ernestguevarra
Copy link
Member

ernestguevarra commented Feb 22, 2024

The state data.frame with undernutrition prevalence for child and mother would look something like this:

   state_id state_name        oedema   muw    suw   mst    sst mam_whz sam_whz mam_muac sam_muac maternal_gam
 1        1 Northern        0.00466  0.192 0.0741 0.185 0.107   0.117   0.0546   0.0516  0.0104        0.0343
 2        2 River Nile      0.000393 0.228 0.133  0.216 0.178   0.128   0.0678   0.0861  0.0245        0.0597
 3        3 Khartoum        0.00104  0.170 0.0871 0.175 0.107   0.108   0.0442   0.0394  0.00881       0.0326
 4        4 Al-Gazeera      0.00199  0.183 0.0721 0.217 0.135   0.0836  0.0305   0.0493  0.0159        0.0461
 5        5 Red Sea         0.00274  0.258 0.197  0.221 0.260   0.131   0.101    0.188   0.0799        0.263 
 6        6 Kassala         0.000260 0.222 0.0937 0.252 0.221   0.0784  0.0314   0.0764  0.0189        0.141 
 7        7 Al-Gadarif      0.00224  0.206 0.108  0.234 0.224   0.0814  0.0573   0.0375  0.0101        0.0568
 8        8 Sinar           0.00156  0.199 0.0837 0.216 0.155   0.0916  0.0281   0.0401  0.0108        0.0676
 9        9 Blue Nile       0.00228  0.175 0.0718 0.210 0.174   0.0687  0.0271   0.0535  0.0116        0.113 
10       10 White Nile      0.000914 0.193 0.0838 0.211 0.200   0.0727  0.0344   0.0597  0.0147        0.0699
11       11 North Kourdofan 0.000299 0.240 0.0962 0.239 0.165   0.0993  0.0300   0.0553  0.0100        0.0845
12       12 South Kourdofan 0.00208  0.184 0.0676 0.224 0.159   0.0673  0.0188   0.0642  0.0129        0.0783
13       13 West Kourdofan  0.00111  0.220 0.0994 0.212 0.168   0.0958  0.0389   0.0802  0.0181        0.140 
14       14 North Darfur    0.00404  0.291 0.143  0.254 0.196   0.151   0.0455   0.109   0.0338        0.120 
15       15 South Darfur    0.000347 0.171 0.0599 0.171 0.0761  0.114   0.0345   0.0538  0.0113        0.0891
16       16 Central Darfur  0.00875  0.198 0.128  0.198 0.204   0.110   0.0566   0.0618  0.0119        0.0602
17       17 East Darfur     0.00693  0.218 0.159  0.207 0.199   0.127   0.0742   0.0905  0.0208        0.0775
18       18 West Darfur     0.00505  0.207 0.106  0.222 0.199   0.0913  0.0452   0.0678  0.0128        0.0499

oedema = severe wasting by oedema
muw = moderate underweight
suw = severe underweight
mst = moderate stunting
sst = severe stunting
mam_whz = moderate wasting by weight for height z-score
sam_whz = severe wasting by weight for height z-score
mam_muac = moderate wasting by MUAC
sam_muac = severe wasting by MUAC
maternal_gam = maternal wasting

@ernestguevarra
Copy link
Member Author

when merged with the sudan1 map object, the object will look like this:

Simple feature collection with 18 features and 12 fields
Geometry type: MULTIPOLYGON
Dimension:     XY
Bounding box:  xmin: 21.81328 ymin: 8.668605 xmax: 38.59369 ymax: 23.14288
Geodetic CRS:  WGS 84
First 10 features:
   stateID      state_name       oedema       muw        suw       mst       sst    mam_whz    sam_whz   mam_muac    sam_muac
1       16  Central Darfur 0.0087516513 0.1983819 0.12826563 0.1983556 0.2038369 0.10987316 0.05656496 0.06177993 0.011855068
2       17     East Darfur 0.0069271758 0.2178256 0.15885517 0.2069717 0.1986532 0.12746281 0.07418577 0.09048767 0.020767662
3        7      Al-Gadarif 0.0022424171 0.2061527 0.10810148 0.2339727 0.2242554 0.08142015 0.05733283 0.03745592 0.010093640
4        6         Kassala 0.0002602472 0.2221930 0.09374178 0.2517947 0.2206860 0.07835870 0.03136995 0.07636888 0.018862981
5        3        Khartoum 0.0010373444 0.1696429 0.08705357 0.1747507 0.1072076 0.10763569 0.04415823 0.03942731 0.008810573
6        9       Blue Nile 0.0022805017 0.1753637 0.07177498 0.2095820 0.1738959 0.06866784 0.02707475 0.05349556 0.011587486
7       11 North Kourdofan 0.0002986858 0.2395356 0.09624198 0.2393822 0.1652510 0.09930502 0.02996139 0.05526875 0.010021257
8        1        Northern 0.0046557216 0.1918433 0.07405420 0.1853842 0.1074691 0.11738892 0.05458036 0.05161627 0.010427529
9        5         Red Sea 0.0027404086 0.2578551 0.19683199 0.2208931 0.2604997 0.13057410 0.10066756 0.18822023 0.079897567
10       2      River Nile 0.0003934684 0.2280518 0.13273411 0.2157027 0.1779077 0.12834225 0.06780749 0.08605887 0.024529845
   maternal_gam                           geom
1    0.06017384 MULTIPOLYGON (((23.77629 12...
2    0.07748009 MULTIPOLYGON (((27.25195 11...
3    0.05677441 MULTIPOLYGON (((35.85431 14...
4    0.14146258 MULTIPOLYGON (((37.12488 17...
5    0.03263337 MULTIPOLYGON (((31.69787 16...
6    0.11310541 MULTIPOLYGON (((34.1051 9.5...
7    0.08452118 MULTIPOLYGON (((31.02074 12...
8    0.03433607 MULTIPOLYGON (((24.97221 20...
9    0.26306306 MULTIPOLYGON (((38.28729 18...
10   0.05968992 MULTIPOLYGON (((32.40482 21...

@ernestguevarra
Copy link
Member Author

the locality level underweight prevalence data.frame object will look something like this (showing first 10 rows):

   state_id state_name locality_id locality_name  oedema   muw    suw   mst    sst mam_whz sam_whz mam_muac sam_muac maternal_gam
 1        1 Northern             1 Dongola       0       0.189 0.0882 0.169 0.106   0.127   0.101    0.0403  0.00671       0.0203
 2        1 Northern             2 El Golid      0.00668 0.165 0.0816 0.160 0.0914  0.119   0.0567   0.0432  0.0126        0.0309
 3        1 Northern             3 Merwoe        0.00260 0.198 0.0815 0.231 0.126   0.0889  0.0389   0.112   0.016         0.0436
 4        1 Northern             4 El Daba       0.0189  0.202 0.0578 0.171 0.0788  0.124   0.0458   0.0357  0.00630       0.0410
 5        1 Northern             5 Halfa         0       0.186 0.0368 0.183 0.105   0.101   0.0277   0.0710  0.0128        0.0392
 6        1 Northern             6 Delgo         0.00161 0.229 0.103  0.233 0.119   0.135   0.0525   0.0523  0.0101        0.0371
 7        1 Northern             7 El Burgaig    0.00540 0.174 0.0624 0.164 0.127   0.115   0.0403   0.0277  0.0111        0.0393
 8        2 River Nile           8 El Matama     0.00155 0.242 0.108  0.199 0.150   0.129   0.0613   0.149   0.0376        0.0374
 9        2 River Nile           9 Shendi        0       0.264 0.166  0.258 0.192   0.116   0.0657   0.0635  0.0143        0.101 
10        2 River Nile          10 Abu Hamad     0       0.252 0.152  0.196 0.198   0.178   0.126    0.0589  0.0126        0.0523

@ernestguevarra
Copy link
Member Author

when combined with the sudan2 map, it will look like this:

Simple feature collection with 188 features and 14 fields
Geometry type: MULTIPOLYGON
Dimension:     XY
Bounding box:  xmin: 21.81328 ymin: 8.668602 xmax: 38.59369 ymax: 23.14288
Geodetic CRS:  WGS 84
First 10 features:
   stateID localityID     state_name    locality_name      oedema       muw        suw       mst       sst    mam_whz    sam_whz
1       16        171 Central Darfur             Azum 0.001818182 0.1654412 0.09926471 0.1713748 0.1337100 0.12686567 0.04664179
2       16        164 Central Darfur          Zalingi 0.022850925 0.1942729 0.13026390 0.2142453 0.2018089 0.09592188 0.05743825
3       16        170 Central Darfur          Nertiti 0.005873715 0.2629179 0.18085106 0.2190923 0.3239437 0.10248447 0.06055901
4       16        166 Central Darfur           Mukjar 0.000000000 0.1374172 0.07284768 0.1604730 0.1486486 0.11538462 0.04682274
5       16        168 Central Darfur North Jebel Mara 0.015094340 0.2713178 0.17441860 0.2906977 0.2596899 0.15953307 0.03112840
6       16        172 Central Darfur        Um Dukhun 0.001574803 0.1545741 0.13406940 0.1706924 0.1900161 0.11736334 0.06913183
7       16        165 Central Darfur       Wadi Salih 0.001239157 0.2086957 0.11801242 0.1866330 0.1715006 0.13207547 0.07295597
8       16        169 Central Darfur          Bendasi 0.000000000 0.2039801 0.07462687 0.1813602 0.1335013 0.08040201 0.03768844
9       17        181    East Darfur           Yassin 0.000000000 0.2191358 0.28703704 0.2370130 0.2548701 0.14072848 0.16556291
10      17        180    East Darfur         Shia-ria 0.004098361 0.2603306 0.28512397 0.2034632 0.2489177 0.20131291 0.16411379
     mam_muac    sam_muac maternal_gam                           geom
1  0.05667276 0.003656307   0.06378132 MULTIPOLYGON (((23.08108 13...
2  0.06743421 0.012609649   0.06166419 MULTIPOLYGON (((23.77662 12...
3  0.06646526 0.018126888   0.04347826 MULTIPOLYGON (((24.04072 12...
4  0.02814570 0.011589404   0.04535147 MULTIPOLYGON (((23.68988 12...
5  0.09541985 0.011450382   0.03482587 MULTIPOLYGON (((24.41425 13...
6  0.05511811 0.006299213   0.05346535 MULTIPOLYGON (((23.35338 11...
7  0.07071960 0.021091811   0.06103286 MULTIPOLYGON (((23.7763 12....
8  0.05472637 0.007462687   0.12177122 MULTIPOLYGON (((23.2672 12....
9  0.10105581 0.031674208   0.09780439 MULTIPOLYGON (((25.60531 12...
10 0.08606557 0.028688525   0.10714286 MULTIPOLYGON (((25.48468 12...

@ernestguevarra
Copy link
Member Author

Now, you will just have two main map objects for state and locality level results. And these will be the objects you will need to plot the maps. This will be a lot more efficient than having multiple mapping objects to work with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants