Ottawa on International Aid, Visualization Team
If you don't have Ruby or Sass installed yet, grab 'em. In terminal:
sudo apt-get install ruby-full rubygems1.8
sudo gem install sass
sudo gem install compassSwitch to the dev folder:
cd path/to/cdndevhack/And tell compass to watch the project!
compass watchFor reference (i.e. you don't need to do this!), the command that I used to set up compass in this directory was:
compass create --syntax sass --sass-dir "static/stylesheets/sass" --css-dir "static/stylesheets/css" --javascripts-dir "static/js" --images-dir "static/img"I grabbed it here.
While we're still working on dummy markup, if you want to make tweaks to the 1000 line behemoth just change the following and run it through emmet:
nav>ul>li*4>h2{Year}+ul>li*12>h3{Month}+ul>li*3>img.icon[src="demoIcon.png"]+time{2013-08-01}+{$3M Columbia}+h4{Agriculture}
Install python, pip, and python-lxml
Get virtualenv: sudo pip install virtualenv
cd backend -- get into the back end folder.
virtualenv venv -- make a virtual environment to work from.
source venv/bin/activate -- turn on the virtual environment.
pip install -r requirements.txt -- install all of the project dependancies.
cd into the backend folder. If you are not activated, activate the virtualenv:
source venv/bin/activate
run!
python app.py
ta daa
required:
- lang: language code (
en,fr, ...)
{
"source-generated": "iso-date",
"resources": [
{
"name": "policies",
"uri": "/api/policies/"
},
{
"name": "activities",
"uri": "/api/activities/"
}
]
}required:
- lang: language code
####Returns
[
{
"code": "number (0-7)",
"name": "string",
},
...
]required:
- lang: language code like
en,fr, etc.
filters:
- policy: iati_code
- country: iati_code
[
{
"uri": "uri",
"start": "iso date",
"end": "iso date",
"policy": "code name",
"country": "country name",
"organization": "name"
},
.
.
.
]
required
- lang: language code like
en,fr, etc.
{
"id": "unique id",
"title": "string",
"start": "iso date",
"end": "iso date",
"policy": [
{
"iati_code": "code",
"name": "string",
"significance": "int (0 - 3; not significant - exclusive focus)"
},
...
],
"country": "name",
"organizations": [
"name"
],
"description": "description",
"result": "result description"
}