Skip to content

dadicool/isie_tnac_collection

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Intro

This is a set of scripts and tools to extract the detailed results of Tunisian Constitutional Assembly from the ISIE website There are two versions: Python (deprecated) and Java

The Database choice to host the data and make it available through a REST API is CouchDB

Java

  • Start Eclipse
  • Import Existing Project from TnElectionData directory
  • Run target (GetAllMetadata) as "Java Application" - You can specify the path to where the data is going to be dumped by adding the path as the sole argument
  • Run target (GetRawData) as "Java Application" - You can specify the path to where the data is going to be dumped by adding the path as the sole argument
  • Watch the .csv files pile up :)

Database Import

  • Run the website scraper (TBD)
  • Run patch.sh in the directory where the raw .json files are located - This script adds an "_id" field to every document
  • Run upload.sh to import the .json files into your local CouchDB (for testing/debugging)
  • To make the data available publicly, replicate your database onto a public Hosted CouchDB instance

Python (deprecated)

Pre-requisites

  • Python 2.6+

Steps:

Go into the python

Install BeautifulSoup

Run inside the BeautifulSoup directory :

 python setup.py build

 python setup.py install

Run the script

python isie_scrape.py

Result

  • HTML corresponding to the election results for the first voting booth
  • Election_results.csv (Future)

About

Collect tnac results from isie website

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 80.2%
  • Java 19.5%
  • Shell 0.3%