Skip to content

Commit

Permalink
4dp not 2dp for results
Browse files Browse the repository at this point in the history
  • Loading branch information
mcarans committed Dec 5, 2024
1 parent 91e8cdb commit 5cbfb5d
Show file tree
Hide file tree
Showing 6 changed files with 4,154 additions and 4,154 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run-python-script.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ jobs:
permissions:
actions: write
steps:
- uses: liskin/gh-workflow-keepalive@v1
- uses: liskin/gh-workflow-keepalive@v1
2 changes: 1 addition & 1 deletion src/hdx/scraper/ophi/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def add_row(
def set_mpi(cls, inheaders: Tuple[str], inrow: Dict, row: Dict) -> None:
for i, inheader in enumerate(inheaders):
header = cls.headers[i]
row[header] = number_format(inrow[inheader], format="%.2f")
row[header] = number_format(inrow[inheader], format="%.4f")

def read_mpi_national_data(
self, path: str, format: str, sheet: str, headers: List[str]
Expand Down
70 changes: 35 additions & 35 deletions tests/fixtures/AFG_mpi.csv
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
country_code,admin1_code,admin1_name,mpi,headcount_ratio,intensity_of_deprivation,vulnerable_to_poverty,in_severe_poverty,reference_period_start,reference_period_end
#country+code,#adm1+code,#adm1+name,#indicator+mpi,#indicator+headcount_ratio,#indicator+intensity_of_deprivation,#indicator+vulnerable_to_poverty,#indicator+in_severe_poverty,#date+start,#date+end
AFG,,,0.36,64.88,55.53,19.90,39.11,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF01,Kabul,0.13,27.91,45.44,34.62,7.74,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF02,Kapisa,0.42,76.74,54.71,17.67,44.93,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF03,Parwan,0.30,57.73,52.33,27.82,29.04,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF04,Wardak,0.34,64.79,52.37,24.90,35.23,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF05,Logar,0.33,63.43,52.54,26.04,28.60,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF06,Nangarhar,0.36,68.37,52.59,19.81,37.80,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF07,Laghman,0.39,71.64,54.06,19.34,43.15,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF08,Panjsher,0.20,42.50,46.36,38.51,13.59,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF09,Baghlan,0.41,76.42,53.97,15.79,48.46,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF10,Bamyan,0.24,49.91,48.65,32.35,19.91,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF11,Ghazni,0.33,61.65,54.32,23.50,35.20,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF12,Paktika,0.49,87.57,55.96,10.84,48.83,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF13,Paktya,0.34,66.62,51.38,24.55,30.14,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF14,Khost,0.35,70.38,49.59,18.86,32.25,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF15,Kunarha,0.37,68.63,54.13,22.07,39.12,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF16,Nooristan,0.53,89.74,59.17,8.51,64.94,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF17,Badakhshan,0.43,80.43,53.24,14.63,44.56,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF18,Takhar,0.34,64.39,52.64,24.22,33.03,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF19,Kunduz,0.38,67.53,56.54,19.40,42.52,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF20,Samangan,0.49,83.49,58.77,12.69,61.39,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF21,Balkh,0.22,42.99,52.05,24.40,23.53,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF22,Sar-e-Pul,0.41,72.31,56.51,17.44,46.44,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF23,Ghor,0.53,88.90,59.34,10.13,65.99,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF24,Daykundi,0.29,56.85,51.56,26.36,28.35,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF25,Urozgan,0.52,87.67,58.77,10.18,63.23,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF26,Zabul,0.56,91.09,61.72,7.46,70.80,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF27,Kandahar,0.50,82.57,60.51,8.41,60.70,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF28,Jawzjan,0.32,59.39,53.86,23.81,30.88,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF29,Faryab,0.47,77.31,60.44,13.14,55.78,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF30,Helmand,0.54,87.82,61.90,8.16,64.17,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF31,Badghis,0.55,88.74,61.72,8.26,72.09,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF32,Herat,0.29,52.48,55.01,21.60,30.89,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF33,Farah,0.49,81.76,60.06,11.07,57.14,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF34,Nimroz,0.34,64.38,52.28,16.02,33.88,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,,,0.3603,64.8829,55.5317,19.8961,39.1051,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF01,Kabul,0.1268,27.9088,45.4448,34.6170,7.7371,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF02,Kapisa,0.4199,76.7438,54.7140,17.6739,44.9334,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF03,Parwan,0.3021,57.7282,52.3311,27.8219,29.0427,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF04,Wardak,0.3393,64.7870,52.3707,24.8975,35.2280,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF05,Logar,0.3333,63.4333,52.5367,26.0385,28.6028,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF06,Nangarhar,0.3596,68.3657,52.5926,19.8120,37.8043,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF07,Laghman,0.3873,71.6449,54.0624,19.3423,43.1517,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF08,Panjsher,0.1970,42.4987,46.3618,38.5113,13.5895,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF09,Baghlan,0.4125,76.4234,53.9706,15.7851,48.4589,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF10,Bamyan,0.2428,49.9125,48.6483,32.3472,19.9131,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF11,Ghazni,0.3349,61.6484,54.3175,23.4971,35.2039,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF12,Paktika,0.4901,87.5650,55.9645,10.8362,48.8294,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF13,Paktya,0.3422,66.6152,51.3751,24.5452,30.1379,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF14,Khost,0.3490,70.3846,49.5883,18.8565,32.2526,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF15,Kunarha,0.3715,68.6338,54.1347,22.0703,39.1215,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF16,Nooristan,0.5310,89.7414,59.1680,8.5105,64.9368,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF17,Badakhshan,0.4282,80.4299,53.2369,14.6253,44.5631,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF18,Takhar,0.3389,64.3851,52.6394,24.2198,33.0324,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF19,Kunduz,0.3818,67.5341,56.5414,19.3975,42.5182,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF20,Samangan,0.4907,83.4884,58.7690,12.6942,61.3891,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF21,Balkh,0.2238,42.9932,52.0503,24.3995,23.5252,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF22,Sar-e-Pul,0.4086,72.3122,56.5054,17.4412,46.4399,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF23,Ghor,0.5275,88.8989,59.3374,10.1340,65.9894,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF24,Daykundi,0.2931,56.8473,51.5647,26.3646,28.3518,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF25,Urozgan,0.5153,87.6666,58.7749,10.1807,63.2258,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF26,Zabul,0.5622,91.0949,61.7201,7.4594,70.8037,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF27,Kandahar,0.4996,82.5686,60.5084,8.4062,60.6963,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF28,Jawzjan,0.3199,59.3892,53.8647,23.8066,30.8769,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF29,Faryab,0.4673,77.3129,60.4405,13.1424,55.7767,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF30,Helmand,0.5436,87.8165,61.9046,8.1597,64.1673,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF31,Badghis,0.5477,88.7362,61.7241,8.2635,72.0934,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF32,Herat,0.2887,52.4847,55.0090,21.5967,30.8883,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF33,Farah,0.4910,81.7616,60.0555,11.0742,57.1423,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
AFG,AF34,Nimroz,0.3366,64.3824,52.2760,16.0238,33.8814,2022-01-01 00:00:00+00:00,2023-12-31 00:00:00+00:00
Loading

0 comments on commit 5cbfb5d

Please sign in to comment.