Kossisoroyce's picture
Add README.md
2a82575 verified
|
Raw
History Blame Contribute Delete
4.63 kB
metadata
annotations_creators:
  - no-annotation
language_creators:
  - found
language:
  - en
license: cc-by-4.0
multilinguality:
  - monolingual
size_categories:
  - n<1K
source_datasets:
  - original
task_categories:
  - tabular-regression
task_ids: []
tags:
  - africa
  - humanitarian
  - hdx
  - electric-sheep-africa
  - rule-of-law
  - separation-of-powers
  - benin
  - botswana
  - cape-verde
  - ethiopia
  - kenya
pretty_name: Rule of Law, 2021
dataset_info:
  splits:
    - name: train
      num_examples: 74
    - name: test
      num_examples: 18

Rule of Law, 2021

Publisher: Bertelsmann Stiftung · Source: OpenAfrica · License: cc-by · Updated: 2023-01-23


Abstract

Expert assessments and index. It combines information on the extent to which political power is separated, the judiciary is independent, office abuse is prosecuted, and civil rights are enforced. It ranges from 1 to 10 (most rule-based). Score Rule of Law

1 - 2.49 Poor 2.5 - 4.49 Overflawed 4.5 - 6.49 Fair 6.5 - 8.49 Sound 8.5 - 10 Excellent

Each row in this dataset represents tabular records. Data was last updated on OpenAfrica on 2023-01-23. Geographic scope: BENIN, BOTSWANA, CAPE-VERDE, ETHIOPIA, KENYA, NIGERIA, SENEGAL, SOUTH-AFRICA, and 4 others.

Curated into ML-ready Parquet format by Electric Sheep Africa.


Dataset Characteristics

Domain Humanitarian and development data
Unit of observation Tabular records
Rows (total) 93
Columns 5 (2 numeric, 3 categorical, 0 datetime)
Train split 74 rows
Test split 18 rows
Geographic scope BENIN, BOTSWANA, CAPE-VERDE, ETHIOPIA, KENYA, NIGERIA, SENEGAL, SOUTH-AFRICA, and 4 others
Publisher Bertelsmann Stiftung
OpenAfrica last updated 2023-01-23

Variables

Geographicrule_of_law_index_2005_2021 (Benin, Botswana, Ethiopia).

Identifier / Metadataunnamed_1 (range 2005.0–2021.0), unnamed_2 (range 1.0–8.25), esa_source (HDX), esa_processed (2026-04-28).


Quick Start

from datasets import load_dataset

ds    = load_dataset("electricsheepafrica/africa-rule-of-law-2021")
train = ds["train"].to_pandas()
test  = ds["test"].to_pandas()

print(train.shape)
train.head()

Schema

Column Type Null % Range / Sample Values
rule_of_law_index_2005_2021 object 1.1% Benin, Botswana, Ethiopia
unnamed_1 float64 3.2% 2005.0 – 2021.0 (mean 2013.0)
unnamed_2 float64 3.2% 1.0 – 8.25 (mean 5.4722)
esa_source object 0.0% HDX
esa_processed object 0.0% 2026-04-28

Numeric Summary

Column Min Max Mean Median
unnamed_1 2005.0 2021.0 2013.0 2013.0
unnamed_2 1.0 8.25 5.4722 5.75

Curation

Raw data was downloaded from OpenAfrica via the CKAN API and converted to Parquet. Column names were lowercased and standardised to snake_case. Common missing-value markers (N/A, null, none, -, unknown, no data, #N/A) were unified to NaN. 6 column(s) with >80% missing values were removed: unnamed_3, unnamed_4, unnamed_5, unnamed_6, unnamed_7, unnamed_8. 2 column(s) were cast from string to numeric or datetime based on parse-success rate (>85% threshold). The dataset was split 80/20 into train and test partitions using a fixed random seed (42) and saved as Snappy-compressed Parquet.


Limitations

  • Data originates from Bertelsmann Stiftung and has not been independently validated by ESA.
  • Automated cleaning cannot correct for misreported values, definitional inconsistencies, or sampling bias in the original collection.
  • This dataset spans 12 countries; geographic and methodological inconsistencies across national boundaries may affect cross-country comparability.
  • Refer to the original HDX dataset page for the publisher's own methodology notes and caveats.

Citation

@dataset{openafrica_africa_rule_of_law_2021,
  title     = {Rule of Law, 2021},
  author    = {Bertelsmann Stiftung},
  year      = {2023},
  url       = {https://open.africa/dataset/rule-of-law-2021},
  note      = {Repackaged for machine learning by Electric Sheep Africa (https://huggingface.co/electricsheepafrica)}
}

Electric Sheep Africa — Africa's ML dataset infrastructure. Lagos, Nigeria.