Skip to content
This repository

The website powering the Observatory of Economic Complexity

branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 oec
Octocat-spinner-32 .gitignore
Octocat-spinner-32 babel.cfg
Octocat-spinner-32 messages.pot
Octocat-spinner-32 oec.wsgi
Octocat-spinner-32 requirements.txt

The Atlas of Economic Complexity Site

The Atlas is a site housing The Observatory, the master's thesis work of Alexander Simoes. This Observatory is a tool that allows users to quickly compose a visual narrative about countries and the products they exchange.


The observatory provides access to bilateral trade data for roughly 200 countries, 50 years and 1000 different products of the SITC4 revision 2 classification. The source of the data we are using is:

1962 - 2000

The Center for International Data from Robert Feenstra

2001 - 2009



The Observatory will run in all modern browsers so long as they have Javascript turned on and have full support for SVG graphics. This includes the latest versions of Firefox, Chrome (Chromium), Safari (WebKit), Opera and IE.

Note: Internet Explorer versions 8 and below will not work as they do not have SVG support built in.

Adding the Observatory to computer via virtualenv

Getting The Observatory Running Locally via Virtualenv

  1. Clone from github (this will create an atlas_economic_complexity folder in the current directory)

    git clone
  2. Create the virtual environment

    mkvirtualenv atlas_economic_complexity
  3. Activate this newly created environment

    workon atlas_economic_complexity
  4. Install the required Python libraries

    pip install -r requirements.txt
  5. Create a MySQL database on your local machine
  6. Import the latest dump of the database from

    mysql -u username -p -h localhost DB_NAME < observatory_xxxx-xx-xx.sql
  7. Be sure to create the following local environment variables

    export OEC_SECRET_KEY=some_s3cret_k3y
    export OEC_DB_USER=my_db_username
    export OEC_DB_PW=my_db_password
    export OEC_DB_HOST=localhost
    export OEC_DB_NAME=oec
    * export OEC_REDIS_HOST=localhost
    * export OEC_REDIS_PORT=6379
    * export OEC_REDIS_PW=redis_password
    * only necessary if using redis for caching
  8. Updating translations (if something is changed)

    pybabel extract -F babel.cfg -o messages.pot oec
    pybabel update -i messages.pot -d oec/translations
    pybabel compile -d oec/translations

Getting The Observatory Running With Redis Caching enabled (Optional)

  1. If you would like to run the Observatory with a cache (if, for instance, you wished to deploy it on a live server) All you will need to do is install the proper libraries and resources --

  2. Download, extract and compile Redis itself with:

    $ wget
    $ tar xzf redis-2.6.7.tar.gz
    $ cd redis-2.6.7
    $ make  
  3. Install the redis-py client with (from

    $ sudo easy_install redis
    $ sudo python install
  4. Install the django-redis backend (from

    easy_install django_redis
  5. You will also need the following serialization library: (from

    easy_install msgpack-python
  6. The constants defined in have REDIS turned on by default. The example constants in the comments can be used to turn it off.

Something went wrong with that request. Please try again.