Data Science applied to the government sector
You'll need to install Poetry and set a list of environment variables:
We are using the 1.1.10 version, type:
curl -sSL https://install.python-poetry.org | python3 - --version 1.1.10Add export PATH="/Users/<user.name>/.local/bin:$PATH" to your shell configuration file (eg. ~/.zshrc) and restart your terminal and check if Poetry was installed correctly.
poetry --versionThese are provisory instructions for working with provisory branches.
-
Clone the project:
git clone https://github.com/felipeeeantunes/chrimatocracy.git
-
Switch to the specific branch you are going to work on (
feature/structuring-modules, for instance):git switch feature/structuring-modules
-
Go inside the directory and build the environment:
cd chrimatocracy make buildPs. You can use the Poetry commands to create local environments and builds instead.
-
Code patterns
# run these commands below before adding files to commit make isort make black # then, git add <files>...
Under the research folder you find two applications of the library:
-
donationscontains the code of the paper Statistical analysis of Brazilian electoral campaigns via Benford’s law published at Physica A: Statistical Mechanics and its Applications. The preprint can be found on Arxiv as Evidence of Fraud in Brazil's Electoral Campaigns Via the Benford's Law -
networkcontains the code behind an ongoing research project called Detecting Anomaly donations by Combining Benford's Law and Social Network Analysis.
Also, you can find, under notebooks Jupyter notebooks (outdated) with descriptive analyses of the data.
You can find the data in raw format and already prepared (using data_preparation scripts) here. The raw data is public and was obtained from the TSE website.
Data from CEIS and CNEP (containing companies with restrictions) was obtained from Portal da Transparência and the links are: