Skip to content

Repository for code to automate the creation of infographic posters for the World Bank's DIME team's scorecard evaluation in Burkina Faso.

Notifications You must be signed in to change notification settings

boyercb/DIME-infographics

Repository files navigation

DIME-infographics

This repository contains code to automate the creation of infographic posters for DIME team's scorecard evaluation in Burkina Faso.

Data Source

Data for the infographic indicators were collected via interviews with key informants in the municipalities, schools, and district sanitation offices. Responses were recorded using SurveyCTO. The raw survey exports are copied, by year, to the data/raw folder. Exports must include the following csv files files (shown for the 2014/2015 year below):

  • [CEB 2014_WIDE.csv](data/raw/2014/CEB 2014_WIDE.csv)
  • [Directeur Ecole 2014_WIDE.csv](data/raw/2014/Directeur Ecole 2014_WIDE.csv)
  • [Directeur Formation Sanitaire 2014_WIDE.csv](data/raw/2014/Directeur Formation Sanitaire 2014_WIDE.csv)
  • [District Sanitaire 2014_WIDE.csv](data/raw/2014/District Sanitaire 2014_WIDE.csv)
  • [Municipalite 2014_WIDE.csv](data/raw/2014/Municipalite 2014_WIDE.csv)

In addition, data about the availability of potable water is derived from government sources. This is normally in the form of an Excel spreadsheet, but, for the purposes of this project, it should be converted to a csv file and copied, by year, to the data/raw folder (example from 2014/2015 below):

  • [Access Potable Water 2014.csv](data/raw/2014/Access Potable Water 2014.csv)

Construction of the Infographic Posters

We use Stata 13 MP to clean the data, calculate the indicators, and create JSON-formatted text files describing the layout of the posters. The latter are then read by a short Java script that uses the Processing Development Environment to build the infographic images.

Stata Files

Below are brief descriptions of each of the Stata do-files. We've made liberal use of comments throughout the do-files to explain the program structure/flow.

Java Files

The poster1.pde and poster2.pde sketchbook files process the JSON files exported by Stata and create the infographic poster PDFs stored in poster1/pdf and poster2/pdf.

Instructions for Replication

  1. Clone the repository to your local directory.
  2. Download and install the Processing Development Environment.
  3. Open and run 00_master.do. This will run all other do-files and process the raw data and create poster1.json and poster2.json.
  4. If you are using Stata 13 you will need to open the json files at this point (poster1.json and poster2.json) and replace the character É with the character É and save both with UTF-8 encoding (Stata 14 supports Unicode).
  5. Open and run poster1.pde. This will create the infographic posters for poster design #1.
  6. Open and run poster2.pde. This will create the infographic posters for poster design #2.

Instructions for Creating New Posters

  1. Create new folders for year X in the data/raw folder and add all the raw data source files for year X (see above).
  2. Open 00_master.do. Update the year global macro to X; update the national_average global to the average rate of admission to the CEP for year X; and indicate whether the raw data was exported with group names using the groupnames global. Then run.
  3. If there are duplicate observations they will be written to duplicates_FILENAME.csv in the data/etc folder. You can mark which to keep (e.g. the most recent submission) in the replacements_FILENAME.csv file. You will need to re-run 00_master.do.
  4. If there have been any changes in the names of variables you can update them in either the 01_clean.do file or the 02_calculate_scores.do.
  5. If you are using Stata 13 you will need to open the json files at this point (poster1.json and poster2.json) and replace the character É with the character É and save both with UTF-8 encoding (Stata 14 supports Unicode by default).
  6. Open poster1.pde. Update the year variable to X and run. This will create the infographic posters for poster design #1.
  7. Open poster2.pde. Update the year variable to X and run. This will create the infographic posters for poster design #2.

Example Posters

Poster 1

Banfora

Poster 2

Banfora

About

Repository for code to automate the creation of infographic posters for the World Bank's DIME team's scorecard evaluation in Burkina Faso.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published