## Benin

-----

* A stable and increasing real GDP growth rates but slow decrease in relative poverty levels.
* Poverty affects households in poorly educated households in rural areas to much higher levels than urban areas.
* Education disparities happen mainly along community-level dimensions through high socio-economic segregation of schools and different access to resources.
* Large disparity of access to electricity between urban and rural households, which directly negatively affects the environmental conditions of individual rural households.
* No access to electricity due to both lacking rural infrastructure and electrical grid connection costs being too high.
* Rapid electrification will require both infrastructure expansion and policy commitment to finding ways of lowering grid connection costs.

-----

<!-- intro/overall -->
Benin in recent years has seen fairly stable real GDP growth rates and downward trending poverty levels in absolute terms.
Its growth rate averaged 6.4% for the years 2017 to 2019 and, with a decrease during the intermittent years due to the Covid-19 pandemic, has recovered to a rate of 6.6% in 2021 [@WorldBank2022b].
There only exists sporadic and fluctuating data on the country's overall inequality, with the World Bank Development Index noting a Gini coefficient of 38.6 for the year (2003) before rising to 43.4 (2011) and up to 47.8 (2015),
though decreasing below the 2003 level to 37.8 (2018) in its most recent calculation, see @fig-ben.
At the same time, the country's poverty rate, even measured based on the international line, only decreased at a very slow rate in its most recent years,
from a relative rate of households in poverty at 18.8% in 2019, to 18.7% in 2020 and 18.3% at the end of 2021,
with the reduction threatened to be slowed further through increased prices on food and energy [@WorldBank2022b].

```{python}
#| label: fig-ben
#| fig-cap: "Gini index of consumption per capita for Benin"
gni_cnsmpt = ben[ben['resource'].str.contains("Consumption")]
gni_cnsmpt_percapita = gni_cnsmpt[gni_cnsmpt['scale'].str.contains("Per capita")]
gini_plot(gni_cnsmpt_percapita)
```

::: {custom-style="caption"}
Source: Author's elaboration based on UNU-WIDER WIID (2022).
:::

<!-- poverty -->
Based on its national poverty line, Benin's overall poverty rate is 38.5%,
though it hides a strong spatial disparity in the incidence of poverty between rural (44.2%) and urban (31.4) areas [@WorldBank2022b].
Looking at the effect of income growth on the time to exit poverty,
@Alia2017 finds a general negative correlation with stronger growth indeed leading to shorter average exit times (7-10 years for a household at a per capita growth rate of 4.2%),
though this aggregate also hides a large heterogeneity primarily determined by a households size, its available human capital and whether it is located rurally.
So while the study does conclude for an overall equitable pro-poor growth in Benin,
rural households, beside already being relatively more poverty stricken,
are in danger of being left further behind during periods of overall growth.
@Djossou2017 find similar pro-poor growth with spatial disparities but surprisingly see urban households potentially benefiting less than rural households from additional growth,
with efforts to open up communities to harness the benefits of growth often primarily targeted at rural communities.

<!-- drivers: endowment/assets: education, ..? -->
Using the Learning Poverty index, which combines the share of school deprivation (the share of primary-aged children out-of-school) and learning deprivation (share of pupils below a minimum proficiency in reading),
a @WorldBank2022a report shows that 56% of children at late primary age in Benin are not proficient in reading,
55% do not achieve minimum proficiency levels at the end of primary school and 3% of primary school-aged children are not enrolled in school at all.
<!-- TODO These levels are higher than in Uganda, though, since ... gender dimension? -->
Looking purely at attendance rates, @McNabb2018 finds that the primary household-level determinants of attendance are the wealth of a household, its religion, as well as the education level of its household head.
Here, gender disparities persist, however,
with girls continuously less likely to attend and adopted girls being at the greatest disadvantage,
while boy tend to face higher opportunity costs than girls due to often working in the fields in which case the distance to a school begins to play an important role.
While the household-level variables do play a role ---
through the availability of educational resources at home, differences in schooling quality and overall health and well-being ---
@Gruijters2020 find that most of the disparity stems from the community-level:
the difference in school quality is large,
marked by high socio-economic segregation between schools,
and primarily determined through an unequal distribution of teaching resources including teachers and textbooks.

### Inequalities in access to electricity

<!-- electricity access -->
Thus, while growth is generally pro-poor in Benin, its primary determinants do not cluster only at the household level,
but are comprised of partly household-level but especially community-level differences.
One of the foremost examples of the effects of inequal endowments can have is brought by @VanDePoel2009 when they look at the determinants of rural infant death rates in Benin among others and find that environmental factors ---
such as access to a safe water source, quality housing materials and electricity ---
are the primary determinants, ahead even of access to a health facility in the community.
Access to electricity in the country especially underlies a large heterogeneity based on location.
The overall level of electrification of Benin has been rising slowly ---
though outpacing population growth ---
from 22% in 2000 to 26% in 2005, 34% in 2010, a decline to 30% in 2015 and then a faster increase to 40% in 2019, altough a broad difference in electrification levels between urban (65%) and rural (17%) regions remain [@WorldBank2021].
In rural areas there are generally three approaches to electrification that work outside of a connection to the main grid,
individual installation of solar panels or generators for smaller electric appliances,
collective solutions like kiosks offering electric charging for some cost,
or autonomous mini-grids powering a portion of a more densely populated rural area
(though often requiring permits or licenses if above certain sizes) [@Jaglin2019].

@Rateau2022 see one of the primary reasons for off-grid electrification in either physical unavailability in rural areas or a prohibitively high cost for connection to the grid.
However, these more individualized solutions are often only targeted at credit-worthy customers and can lead to a further increase in inequalities between income percentiles,
leaving behind households which are already neglected within the field of energy access [@Barry2020].
The former, physical access, is argued by @Djossou2017 as well, emphasizing the need for continued infrastructure expansion to more households,
in order to provide access to more durable goods (fridges, mobile phones and internet) which can help decrease the inequality gap.
The latter, prohibitively high costs, should not be disregarded in such an infrastructure expansion as well, however.
One of the major obstacles to main grid connection remains the high charge a customer is expected to pay with solutions requiring continued political commitment to identify, examine and implement more low-cost electrification processes as well as financing solutions.
@Golumbeanu2013 point out the main obstacles that need to be addressed here:
the lack of incentives to increase electrical affordability,
a weak utilities commitment toward providing broad electricity access with focus often lying more on high-consumption urban markets,
often overrated technical specifications for low loads,
too great distances between households and distribution poles in an area,
and an overall lack of affordable financing solutions.

<!-- conclusion -->
Thus, though having a relatively stable and growing real GDP,
Benin suffers from slow decreases in its poverty rates coupled with a relative unchanged income inequality.
Additionally, the country's poverty rates have a high heterogeneity with relatively more rural households and households with poor education in poverty.
A large part of education disparities happens at the community-level, with schools marked by high socio-economic segregation,
but household-level disparities, especially environmental ones, playing a role.
One of those determinants is a household's access to electricity,
of which there is an enormous disparity between urban and rural households.
The primary reasons for not having access to electricity are the lack of physical infrastructure available in rural areas,
as well as connection costs to the main electrical grid being too high.
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}
# 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'})
```

```{python}
#| label: fig-ben-aid-financetype
#| fig-cap: "Total ODA for Benin per year, by financing 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 amount, in millions of USD"}, markers=True, template="seaborn")
# 0-figure
fig.update_yaxes(rangemode="tozero")
fig.show()
```

::: {custom-style="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"] != "nondac")]

donortotals_grouped = donortotals.groupby(['Donortype', 'Year']).agg({'Value': ['sum']})
donortotals_grouped = donortotals_grouped.reset_index(['Donortype', 'Year'])
donortotals_grouped.columns = donortotals_grouped.columns.to_flat_index()
donortotals_grouped.columns = ['Donortype', 'Year', 'Value']
fig = px.line(donortotals_grouped, x='Year', y='Value', color='Donortype', labels={"Value": "Development aid amount, in millions of USD"}, markers=True, template="seaborn")
# 0-figure
fig.update_yaxes(rangemode="tozero")
fig.show()
```

::: {custom-style="caption"}
Note: Values shown are for all Official Development Assistance flows valid under the OECD ODA data, split into bilateral development donor countries (dac) and multilateral donors (mlt), 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.

```{python}
#| label: tbl-ben-aid-electricity
#| tbl-cap: "ODA for transmission and distribution of electric power in Benin per year, separated by financing type"
#| column: page
totals = df.loc[
    (df['RECIPIENT'] == 236) & # Benin
    ((df['SECTOR'] == 23630) | (df['SECTOR'] == 23631)) & # Total
    (df['CHANNEL'] == 100) &
    (df['AMOUNTTYPE'] == 'D') &
    ((df['FLOW'] == 11) | (df['FLOW'] == 13)) & # Total
    (df['FLOWTYPE'] == 112) &
    (df['AIDTYPE'] == "100") # contains mixed int and string representations
    ]
electricityaid = totals[totals['DONOR'] < 20000] # drop all 'total' aggregations

el_grouped = electricityaid.groupby(['Year', 'Flow']).agg({'Value': ['sum']})
el_grouped = el_grouped.reset_index(['Year', 'Flow'])
el_grouped.columns = el_grouped.columns.to_flat_index()
el_grouped.columns = ['Year', 'Flow', 'Value']

crosstab = pd.crosstab(el_grouped['Year'], el_grouped['Flow'], margins=True, values=el_grouped['Value'], aggfunc='sum')
Markdown(tabulate(crosstab.fillna("0.00"), headers="keys", tablefmt="github", floatfmt=".2f"))
```

::: {custom-style="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. The category under analysis is Electric Power transmission and distribution (centralized grids) within the data.
Source: Author's elaboration based on OECD ODA CRS (2022).
:::

@tbl-ben-aid-electricity shows the amounts of project-bound development aid to Benin for the transmission and distribution of electric power within its centralized grid.
The category subsumes grid distribution from the power source to end users and transmission lines.
It also includes storage of energy to generate power (e.g. batteries) and projects to extend grid access,
especially in rural areas.
For development aid to the electrification of Benin,
the monetary contributions are smaller but increasing and show trends quite different to that of overall development aid to the country.
The amount of overall development contributions to electrification increases from 2011 to 2020,
with significant increases in 2013 and 2015 for loans and 2019, 2020 for grants.
While there is a steady increase to the overall development aid toward electrification,
increases in grants tend to lag behind increases in loans for Benin,
with grants exceeding 10mil. USD for the first time in 2019 while loans already reached 18.90mil. USD in 2013.
Over the complete period of 2011 to 2020, however, grants for the transmission and distribution of electric power in Benin have consistently been lower than loans.
