Setting up the User Map Visualization

To set up the user map visualization to reflect the your users’ location on your server:

  1. Create accounts on:

  2. Set up a public map/table called oppiamobile_users in your CartoDB account with the following field names/types:

    • lat (number)

    • lng (number)

    • country_code (string)

    • source_site (string)

    • total_hits (number)

  3. In the Django admin pages, go to the Settings > Setting Properties model, and update the string values for the following settings, to enter your specific API keys etc:




  4. Again, in the Settings, change the OPPIA_MAP_VISUALISATION_ENABLED boolean value to be true

  5. Create a cron script to run the Django management commands ip2location and cartodb_update. For example:

    cd /home/oppia/
    source env/bin/activate
    python ./django-oppia/ ip2location
    python ./django-oppia/ cartodb_update
  6. Set up this cron task to run regularly, for example once per day. After the cron task has been run at least once, you should start to see the user locations appearing on the map.