Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nichtich/african-cabinets
https://github.com/nichtich/african-cabinets
Last synced: 19 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/nichtich/african-cabinets
- Owner: nichtich
- License: mit
- Created: 2020-07-09T19:41:48.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-12-06T20:34:11.000Z (about 2 years ago)
- Last Synced: 2024-10-27T17:26:11.980Z (2 months ago)
- Language: JavaScript
- Homepage: https://www.wikidata.org/wiki/Wikidata:WikiProject_Africa/Cabinets
- Size: 161 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# African Cabinets
This git repository contains scripts and tools for [Wikidata project African Cabinets](https://www.wikidata.org/wiki/Wikidata:WikiProject_Africa/Cabinets).
## Requirements
* Node
* jq
* make## Installation
Install files from this repository and its dependencies:
~~~
git clone https://github.com/nichtich/african-cabinets.git
cd african-cabinets
npm install
~~~## Usage
The repository contains two independent applications:
* command line scripts for data processing
* a web application to inspect Wikidata### Data processing
Manually download the following source files from to directory `data`:
* `cabinetchanges.xls`
* `portfolio.xls`Run `make` to convert these Excel files to JSON and to download the current list of states and positions from Wikidata:
make
To update states and positions from Wikidata call `make -B wikidata`.
Some statistics can be calculated for data analysis
make stats
To convert all ministers from a country to Wikidata items, call `bin/ministers` with the country name:
./bin/ministers Angola
The current version only emits ministers with matching generic position item on Wikidata. Positions not found are emitted to STDERR.
Next step to upload/update items in Wikidata:
* Put credentials in `config.json` (not to be commited!)
* Pass input of ministers script to `bin/import`. Newly created items will be logged in `items.created.ndjson`### Web application
The web application is made available at . During development run a hot-reloading server:
npm run web
Some important lists:
* `generic-positions`: needs to be cleaned up on Wikidata to only contain positions not specific to one country
* ...