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 table your CartoDB account with the following field names/types:
    • lat (number)
    • lng (number)
    • total_hits (number)
  3. Edit the oppia/utils/cartodb_update.py to update the cartodb_table variable with the name of your table in CartoDB.

  4. Run the following utility scripts:
    • ip2location.py <IP Address Labs API Key> <Geonames username>
    • cartodb_update.py <CartoDB Account Name> <CartoDB API Key>
  5. (optional) If you would like the map to be automatically updated, you can set up a shell script and crontab task to automatically run the 2 scripts from step 4.

  6. Edit oppia/templates/oppia/viz/map.html to embed your map from CartoDB