{"id":28957113,"url":"https://github.com/developmentseed/kenya-bank","last_synced_at":"2025-06-23T21:41:32.551Z","repository":{"id":3148193,"uuid":"4177804","full_name":"developmentseed/kenya-bank","owner":"developmentseed","description":"Kenya Educational Mapping Site","archived":false,"fork":false,"pushed_at":"2018-10-17T17:54:53.000Z","size":44840,"stargazers_count":18,"open_issues_count":3,"forks_count":21,"subscribers_count":60,"default_branch":"gh-pages","last_synced_at":"2024-04-10T03:11:36.485Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"developmentseed.org/kenya-bank","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/developmentseed.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-04-29T21:54:49.000Z","updated_at":"2024-02-05T18:45:45.000Z","dependencies_parsed_at":"2022-09-08T17:30:46.338Z","dependency_job_id":null,"html_url":"https://github.com/developmentseed/kenya-bank","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/developmentseed/kenya-bank","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developmentseed%2Fkenya-bank","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developmentseed%2Fkenya-bank/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developmentseed%2Fkenya-bank/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developmentseed%2Fkenya-bank/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/developmentseed","download_url":"https://codeload.github.com/developmentseed/kenya-bank/tar.gz/refs/heads/gh-pages","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developmentseed%2Fkenya-bank/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261561356,"owners_count":23177587,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-23T21:41:29.382Z","updated_at":"2025-06-23T21:41:32.527Z","avatar_url":"https://github.com/developmentseed.png","language":"JavaScript","readme":"# Exploring Kenyan Education\n\nWelcome to the Exploring Kenyan Education site. \n\nThis is the public repository for the site: \u003chttp://developmentseed.org/kenya-bank/\u003e\n\n![](https://github.com/developmentseed/kenya-bank/raw/gh-pages/img/kenya-front.png)\n\n##Documentation \n\nThis 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. \n\n##Github and Site Architecture\n\n###Setting up Github\n - [Create an account](https://github.com/signup/free)\n - [Set up Git](http://help.github.com/mac-set-up-git/)\n - [Forking a repository](http://help.github.com/fork-a-repo/)\n\n\n### Forking the project\nTo use this project as a starting point, [fork the repository](http://help.github.com/fork-a-repo). 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. \n\n###Files\n-----\n\n#### GH-pages branch\n\n    _layouts       Major page templates.\n    _posts         Content. Data for open data page, sources, about.\n    css            CSS stylesheets\n    ext            javascript libraries (that are not modified at all for site)\n    fonts          Fonts.\n    img            Images.\n    js             Javascript that is custom for site - where map layers and text are inserted \n    README.md      This file.\n    _config.yml    Jekyll configuration file.\n    index.html     Home page.\n    \n### Master branch     \n    \n    data           all data used in TileMill projects\n    img            all images used in TileMill projects\n    tilemill       Kenya-Bank tilemill projects.\n\n\n###Jekyll\nThe 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.\n\nMake sure you have [Xcode](https://developer.apple.com/technologies/tools/) installed before installing Jekyll. This is available for free in the Apple App store.  Once this is complete you should be able to run: \n\n- `gem install jekyll`\n\nIf this doesn't work, read documentation [available here](https://github.com/mojombo/jekyll/wiki/install) about updating your ruby packages.\n\nOnce 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'.\n\n####Site Configuration\n`_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.\n\n\t\tauto: true\n\t\tserver: true\n\t\texclude:\n\t\t  - README.md\n\t\t  - import.rb\n\t\t  - tilemill\n\t\tpermalink: /:title\n\t\tbaseurl: /internews-media\n\n####Adding new pages\nJekyll 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:\n\n\t\ttitle: About the Data\n\t\tcategory: about\n\t\ttags: about\n\t\tlayout: pages\n\nWe 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](https://github.com/shopify/liquid/wiki/liquid-for-designers) for more information on creating relationships between files in the `_site` directory.\n\n####Naming conventions\nJekyll 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.\n\n    hierarchy    file name\n    --------     ---------\n     1           0200-01-02-about.html\n     2           0200-01-01-data.html\n     2       \t   0200-01-01-sources.html\n\n###Notes\nWhere something requires explanation there are inline notes in the code.\n\n## TileMill + Data Processing \n\nAfter 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: \n\n![](https://img.skitch.com/20120628-9xb3u6if563m3k6tt5nbkyqke.png)\n\nIf 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`.\n\n![](https://img.skitch.com/20120628-pkts8e5snk4tx6h1iwe7qrd2qy.png)\n\nAll 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. \n\n##### Uploading maps\n\nFirst, 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. \n\nAuthorizing Sync \n![](https://img.skitch.com/20120628-1u1gu7jte2rgb3pjxtjbdnphdc.png)\n\nUploading\n\n![](https://img.skitch.com/20120628-dm5d2b1ef7mjrus6r9dw5sbu2m.png)\n\n### Working with Sqlite\n\n[This tutorial](http://mapbox.com/tilemill/docs/tutorials/sqlite-work/) walks through turning data sources into SQLite files. This requires downloading [Quantum GIS](www.qgis.org), and [Tilemill](www.tilemill.com).\n\nQgis 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. \n\nSQLite 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](http://mapbox.com/tilemill/docs/tutorials/sqlite-work/) as above, and can be seen in any of the Kenya-bank projects: \n\n![](https://img.skitch.com/20120628-g3c5rbu74y1yaaiftxseuewusj.png)\n\n\nSince 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`.\n\nThen 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.\n\n            (Select\n             a.*,\n             b.*,\n            round(ptr_secondary) as ptr_secondary_r\n            from kenya_county a\n            left outer join secondary_indicators b on lower(a.county) = lower(b.County)\n            )\n\t\t\t\n\n##Map Design \n\nThis 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](http://mapbox.com/help), starting with [styling data](http://mapbox.com/tilemill/docs/crashcourse/styling/) section.\n\n\n## Further Support\nThere are many more tutorials on data processing and TileMill at [guides](http://mapbox.com/tilemill/docs/guides/add-shapefile/) and [support discussions](http://support.mapbox.com/discussions/tilemill). Please contact us as well if you get stuck!","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevelopmentseed%2Fkenya-bank","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevelopmentseed%2Fkenya-bank","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevelopmentseed%2Fkenya-bank/lists"}