Add first draft of aid analysis to Benin

This commit is contained in:
Marty Oehme 2022-09-06 16:28:30 +02:00
parent 1094cfa703
commit 94cccab78c
Signed by: Marty
GPG key ID: B7538B8F50A1C800

View file

@ -102,18 +102,71 @@ To decrease the effects of this driving force of inequality,
both infrastructural expansion as well as policy commitments toward affordable connections to electrical grids are thus of vital importance.
<!-- development assistance -->
### Development assistance to Benin
```{python}
#| label: fig-ben-aid-donortype
#| fig-cap: "Total ODA for Benin per year, separated by donor type. Source: "
#| column: page
# Load CRS data
dfsub1 = pd.read_csv('data/raw/OECD_CRS/CRS1_Benin_11-13_05092022185506030.csv', parse_dates=True, low_memory=False)
dfsub2 = pd.read_csv('data/raw/OECD_CRS/CRS1_Benin_14-16_05092022192438936.csv', parse_dates=True, low_memory=False)
dfsub3 = pd.read_csv('data/raw/OECD_CRS/CRS1_Benin_17-20_05092022192856890.csv', parse_dates=True, low_memory=False)
df = pd.concat([dfsub1, dfsub2, dfsub3], ignore_index=True)
df = df.rename(columns={'\ufeff"DONOR"': 'DONOR'})
```
donortotals = totals_by_donortype(df)
```{python}
#| label: fig-ben-aid-financetype
#| fig-cap: "Total ODA for Benin per year, by finance type"
#| column: page
totals = df.loc[
(df['RECIPIENT'] == 236) & # Benin
(df['SECTOR'] == 1000) & # Total
(df['CHANNEL'] == 100) &
(df['AMOUNTTYPE'] == 'D') &
(df['FLOWTYPE'] == 112) &
(df['AIDTYPE'] == "100") # contains mixed int and string representations
]
financetotals = totals.copy()
financetotals = financetotals[financetotals['DONOR'] < 20000] # drop all 'total' aggregations
## count amount of development aid financing instruments (grants/loans) by year and display
## count USD amount of development aid financing instumrnets by year and display
financetotals_grouped = financetotals.groupby(['Flow', 'Year']).agg({'Value': ['sum']})
financetotals_grouped = financetotals_grouped.reset_index(['Flow', 'Year'])
financetotals_grouped.columns = financetotals_grouped.columns.to_flat_index()
financetotals_grouped.columns = ['Financetype', 'Year', 'Value']
fig = px.line(financetotals_grouped, x='Year', y='Value', color='Financetype', labels={"Value": "Development aid, in millions"}, markers=True, template="seaborn")
fig.show()
```
::: {.caption}
Note: Values shown are for all Official Development Assistance flows valid under the OECD CRS data, split into the type of financing flow, calculated as constant currency (2020 corrected) USD millions.
Source: Author's elaboration based on OECD ODA CRS (2022).
:::
The total amount of development aid for Benin registered by the OECD Creditor Reporting System has been fluctuating, with an overall upward trend since 2011:
The aid broken down by financing type can be seen in @fig-ben-aid-financetype and shows that money has predominantly been given by way of ODA grants, with roughly double the absolute monetary amount of ODA loans per year.
There was an increase in both ODA grants and ODA loans which lead to a significant increase in total development assistance in 2017,
and while loans decreased until 2019, grants steadily increased from 2018 to 2020.
With loans also beginning to increase from 2019, the overall amount of development assistance saw a large increase in 2020,
most likely predominantly due to Covid-19 pandemic related aid packages.
```{python}
#| label: fig-ben-aid-donortype
#| fig-cap: "Total ODA for Benin per year, separated by donor type"
#| column: page
totals = df.loc[
(df['RECIPIENT'] == 236) & # Benin
(df['SECTOR'] == 1000) & # Total
(df['FLOW'] == 100) &
(df['CHANNEL'] == 100) &
(df['AMOUNTTYPE'] == 'D') &
(df['FLOWTYPE'] == 112) &
(df['AIDTYPE'] == "100") # contains mixed int and string representations
]
donortotals = totals.copy()
donortotals["Donortype"] = donortotals["DONOR"].map(donortypes)
donortotals = donortotals[(donortotals["Donortype"] == "dac") | (donortotals["Donortype"] == "multilateral")] = donortotals["DONOR"].map(donortypes)
donortotals_grouped = donortotals.groupby(['Donortype', 'Year']).agg({'Value': ['sum']})
donortotals_grouped = donortotals_grouped.reset_index(['Donortype', 'Year'])
@ -122,3 +175,15 @@ donortotals_grouped.columns = ['Donortype', 'Year', 'Value']
fig = px.line(donortotals_grouped, x='Year', y='Value', color='Donortype', labels={"Value": "Development aid, in millions"}, markers=True, template="seaborn")
fig.show()
```
::: {.caption}
Note: Values shown are for all Official Development Assistance flows valid under the OECD ODA data, split into bilateral development donor countries (dac), bilateral non-DAC countries (nondac) and multilateral donors (multilateral), as constant currency (2020 corrected) USD millions.
Source: Author's elaboration based on OECD ODA CRS (2022).
:::
The total amount of development aid for Benin registered by the OECD Creditor Reporting System,
broken down into individual donor types can be seen in @fig-ben-aid-donortype.
It shows that bilateral development aid by individual member countries tended to be higher than that provided through multilateral donors until 2019.
Beginning in 2020 this split reversed to higher development aid amounts donated through multilateral donors than individual bilateral aid.