Giter Club home page Giter Club logo

kenya-bank's Introduction

Exploring Kenyan Education

Welcome to the Exploring Kenyan Education site.

This is the public repository for the site: http://developmentseed.org/kenya-bank/

##Documentation

This documentation is divded into two parts. The first section covers how to set up github and fork the project, and explains the site architecture with file descriptions. The second section backs up to data processing and map design by providing links to tools to download, and docs for working with SQLite and Tilemill.

##Github and Site Architecture

###Setting up Github

Forking the project

To use this project as a starting point, fork the repository. This will create a new copy of the project on github. Make changes by setting up a local repo by cloning it to the file or directory that you desire, and then from there you can make changes and commit/push them to github. For example, I have a local github folder that I navigate to with cd Documents/github/ to clone all github projects. Then i navigate into the spcecific project to commit and push changes.

###Files

GH-pages branch

_layouts       Major page templates.
_posts         Content. Data for open data page, sources, about.
css            CSS stylesheets
ext            javascript libraries (that are not modified at all for site)
fonts          Fonts.
img            Images.
js             Javascript that is custom for site - where map layers and text are inserted 
README.md      This file.
_config.yml    Jekyll configuration file.
index.html     Home page.

Master branch

data           all data used in TileMill projects
img            all images used in TileMill projects
tilemill       Kenya-Bank tilemill projects.

###Jekyll The site uses Jekyll, a simple, logic aware, static site generator. In a nutshell you build a site with all the logic and source files you need and Jekyll creates a static copy of the website in a '_site/' directory. Note that you do not touch the contents of this directory. You make any additions or changes to the files outside of this.

Make sure you have Xcode installed before installing Jekyll. This is available for free in the Apple App store. Once this is complete you should be able to run:

  • gem install jekyll

If this doesn't work, read documentation available here about updating your ruby packages.

Once jekyll is installed, and you have downloaded the project, from terminal, navigate into the directory the project is in and type 'jekyll'. Locally, the site can be viewed at http://0.0.0.0:4000/index.html in any browser after it has been generated for the first time. This allows you to make local changes that are automatically reflected in your local version of the site, as long as jekyll is running in your terminal. To stop jekyll, type 'command c'.

####Site Configuration _config.yml sets up the default configuration for jekyll when reading all files. As seen below, it allows you to format the url, and allows for the exclusion of unnecessary files that jekyll doesn't need to generate.

	auto: true
	server: true
	exclude:
	  - README.md
	  - import.rb
	  - tilemill
	permalink: /:title
	baseurl: /internews-media

####Adding new pages Jekyll allows for easy referencing and adding logic for other pages in the header of each new page that you create. For our use case, in 0200-01-02-about.html, the header includes several options:

	title: About the Data
	category: about
	tags: about
	layout: pages

We reference posts with 'tags' and 'category' to control their display from the template pages located in '_layouts/'. The logic contained in these template files uses Liquid. You can learn more about the Liquid Templating System for more information on creating relationships between files in the _site directory.

####Naming conventions Jekyll has a default chronological pagination system. Posts are ordered such that the most recent post appears first, so we created fake dates to ensure hierarchy between the 'About' and 'Sources' links in the _posts directory.

hierarchy    file name
--------     ---------
 1           0200-01-02-about.html
 2           0200-01-01-data.html
 2       	   0200-01-01-sources.html

###Notes Where something requires explanation there are inline notes in the code.

TileMill + Data Processing

After you have cloned or downloaded the repository, find where you saved the tilemill folder, and point your TileMill to this location in the setting tab:

If you're working with a cloned version of the site with git, makes sure that you're looking at the branch master by navigating to the project location in the terminal, then typing git checkout master.

All of the TileMill projects are set up to point to the data, also in the master branch. So you will not need to worry about editing the Sqlite databases, however see below for more information about the joins that are happening between Sqlite files in TileMill.

Uploading maps

First, set up your TileMill to sync with your MapBox account. Then within any project, after making your desired changes, click upload, and the map layer will be pushed to the server with the name of the project folder. Unless you manually change the project folder name from your documents window, this will stay the same, and thus replace the corresponding map layer on your wb-education MapBox account. Create your own free account to upload tiles without making changes to the site.

Authorizing Sync

Uploading

Working with Sqlite

This tutorial walks through turning data sources into SQLite files. This requires downloading Quantum GIS, and Tilemill.

Qgis is a powerful tool for working with geographic files, but for right now we just want it to convert data formats like csvs and shapefiles into SQLite databases.

SQLite databases are the best tool for sorting data in Tilemill. SQLite lets you change the query on the data whenever you like, to find a different angle on your data. It is also an easy way to join databases with geographic information to those without geographic information, in the attach db field of the add SQLite layer in Tilemill. This process is outlined in the same tutorial as above, and can be seen in any of the Kenya-bank projects:

Since I have my education factors at the county level, I need shapes that correspond to each county. So I navigate to the Kenya_counties.sqlite.

Then in the attach DB field, you will navigate to the file Kenya_Database.sqlite, which has all of the education factors I want to visualize. The join between these two databases happens in the query field, and looks similar to this. The asterisk means select all, and the round(ptr_secondary) is rounding the number, finally the join is made on the key county, which is contained in both databases.

        (Select
         a.*,
         b.*,
        round(ptr_secondary) as ptr_secondary_r
        from kenya_county a
        left outer join secondary_indicators b on lower(a.county) = lower(b.County)
        )

##Map Design

This comes much easier, as it follows a css-type like language called carto. All of the basics and more advanced options of styling your data can be found in the mapbox.com/help, starting with styling data section.

Further Support

There are many more tutorials on data processing and TileMill at guides and support discussions. Please contact us as well if you get stuck!

kenya-bank's People

Contributors

mayarichman avatar svasdev avatar wildintellect avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kenya-bank's Issues

recap note for Edward

@smit1678

Can you draft a recap note for Edward selling him on the scope that he signed off on today.

Recapping yes

Edward,
I just wanted to recap on the scope you signed off on yesterday to 100% make sure we have this tight. xxxxxxx sections xxxx with the goal of xxxxx.

  • xxx
  • xxx
  • xxx

In short this site will sow the art of the possible with xxxxxx.

Nate

Data Processing

Data Processing

The following layers require some mathematical transformations, including the creation of gender ratios or aggregate value, before we can join them to district and constituency administrative level shape files.

The datasets will be chosen first from the ghost note Nate has written, starting with the most common layers for all three options.

Layer Action
School locations, by primary and secondary Clean up dataset to include only relevant columns
Literacy rates, total Average male and female percentages for "Can Read/Write"
Population Aggregate sublocations and locations for population by district

When these are complete, I will move on to calculating more gender specific differences for:

  • Literacy
  • Net Attendance
  • Reason for Not Attending School
  • Population

Steps to process:

  • Create 5 polygon spatial files (sqlite) in mercator projection: province, district, and division, location and sublocation
  • Create data sqlite files with province, district, divisons, locations and sublocations ID's, depending on what the data provides, and run calculations from original data tables.
  • Create /data folder in kenya-bank repo and push spatial and data files to repo

Jumping back on Kenya

@davejohn @mayarichman

Just jumping back on the Kenya project here now that I'm getting caught up from Moldova. Since I've been out, we've had the performance data come in - I want to sync up with you guys about the performance data and the overall status of the site. Let's talk narrative, site design, colors, and the data. These were all discussed on the call this afternoon and are only slightly different from the original plan, so let's see where we are at and how we can finish this out.

I had some great talks with Edward in Moldova so it'll be good to get on the same page. The work thus far is awesome, and everyone's been working on other projects so and now that we've been able to sync up with Edward a bit more, I think we can knock this out.

Teamwise - @tristen has a bit of time to jump on for some design work and then do a code review to help walk this out.

10am work?

results change map interactivity

@mayarichman

I think the exam results change map could have the interactivity reorganized a little bit to emphasize the value of change. What do you think of rearranging like this? But put 2006 on the left and 2010 on the right.

data work on Kenya?

@mayarichman @davejohn How much more data work is there packaged for Kenya? Is it well packaged so that someone else, like Matt or Chris could jump on the project? I am just asking to get a sense of schedule here - since both Matt and Chris might have some extra bandwidth this week, stating COB Monday.

Kenya Education Site

@mayarichman @smit1678 We are going to do a light site visualizing Kenya education data from the kenya open data portal.

Process and schedule

We are being brought in for both strategy and building and design. So this is largely in our control. The high level goal is 'make something awesome with education data form Kenya'. Scope wise we have a good week on this for two people - I think that will be plenty and we can bring in someone (like Jue) for design.

We are still finalizing this contract, so I don't want to run too fast here but I want to be able to have a full data review so we know what we can build and a light wireframe for the site done by mid week.

Data prep

As you can see from the site there are 27 sets of education data sets on the Kenya data portal that I liked to above. I would like to spend 1 day with the two of you looking over the data and writing up potential cool mashups. Ideally this sites lets us map all the schools in the country and provides a lawyer switcher to provide other contexturalized data that help tell a story. Maybe a layout like http://data.awidercircle.org or data.nai.org.af meets nigeria.mixmarket.org

Next actions

Can you two review the data in the Kenya open data site, come up with a list of layers that could be cool, and wire out (pen and paper is fine) a site and how it could look? I want to have a plan done by COB tomorrow.

Kenya testing data

@mayarichman how did the new data we got from the Bank today look? What can we do with the data? Any questions / follow up needed?

Write up methodology section

We need to write up a methodology section. This will be more detailed than an About the Data section and will walk through the process of cleaning the data and the challenges seen.

wrapping up Keyna

@mayarichman @davejohn nice work, Edward is sold on the maps that we have done so far :). The last data set we need to map is the performance data for schools.

I know you guys are both meeting with @smit1678 @tristen tomorrow at 10am. Nate met w/ Edward in Moldova - helped prep him, and needs to be the one that makes the final sale on the site. I have asked him to review the site you guys have done and see if he has any suggestions to help packaged everything event tighter, now that we have.

@tristen is going to rock a design touch on the site and do a code review for @mayarichman (you two can meet and debrief on Tuesday.

The only part that is not one, that needs to be, is the /data section by @MateoV - but I don't know what his schedule is looking like.

Ideally we get the site done done by DOB on Tuesday and then demo it to them next Thursday and just deliver it. Clearly everyone does not need to be in on this.

How does this all sound?

Links to datasets

@mayarichman

Can you review all the layers and make sure that the source links directly to the dataset page on Kenya OpenData?

final site copy

@davejohn What's the status of the final site copy for Kenya? Will you be able to finish that out this afternoon?

icons for data and methodology section

@tristen
cc/ @mayarichman

What are your thoughts here? I don't want to disrupt the design aesthetic too much, but what do you think of two icons here? We need links to the /open section and the Methodology modal. Or do we stick with "Data" and then use "?" for the methodology modal?

IE7 Tweaks

@smit1678 The biggest issues are related to opacity and margins with main content and story. I will make a separate sheet for IE7 on Monday. Report back then.

Blogging Kenya before Open Data for Development Camp

We will either have the Kenya site presented or we will present the site via video conference for the Open Data for Development Camp in Nairobi on June 27 and 28.

We need to have a blog post live by June 26.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.