Skip to content

lanacioncom/2015_PASO_CABA_polling_stations_map

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2015 PASO CABA Elections map by polling station and political party

Introduction

This project was built to visualize the results of the past 2015 PASO CABA elections in terms of which party has won in each polling station.

Backend

For the backend we have received the results by polling table and political list as a CSV file together with other data dictionary files also as CSV.

We had also the geolocated polling stations provided by the city government in CSV format.

We have used csvkit command line binaries to crunch, clean and build the intermediate CSV files.

We have then ran them through a python script that uses dataset to load them into a postgreSQL database.

We then have imported the final results to cartodb postgis DB.

Usage info: here

Frontend

For the frontend we decided to give requirejs a try to be able to take a modular approach since the codebase was getting quite big.

We have found that it works nice to keep the code organized but it takes a while to get used to it, so we hope our implementation helps someone to go faster through the learning curve.

Once we finished with the development It is important that we use the optimizer to generate a combined javascript file and skip performing too many HTTP requests on the client side.

Since underscore comes bundled inside the cartodbjs library we have used it for our templates to generate a modular approach to the HTML generation. The requirejs text plugin let's you import templates nicely into the app so that you can keep them separatedly as in our webapp/templates folder.

Usage info: here

Server

We are using npm and gulp to automate the optimization and deployment process.

The deployment takes care of minimizing, uglifying and versioning the static files so that it plays nice with the newsroom http cache configuration.

We have used the gulp-requirejs node package to integrate the requirejs optimization in our gulp deployment process.

Usage info: here

Technologies && Libraries

Credits

Acknowledgments

We would like to thank the creators and maintainers of the libraries used for this project and specially Manuel Aristarán for the original idea and initial codebase that inspired this project.