Skip to content

dadicool/isie_scrape

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repo has moved under our new organization OpenGovTN isie_tnac_collection

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

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published