Skip to content

OLAP explorer installation

johngriffin edited this page Oct 5, 2011 · 2 revisions
  1. Clone the following repositories:

  2. Install cubes (make sure you have SQLAlchemy installed first)

  3. Import the datashuttle_tools/scripts/import/sql/nic_indicators.sql.bz2 file into a MySQL database

  4. Edit the datashuttle_tools/scripts/import/import.php file and change the following values in the $config array (please ensure that the database user has permission to create tables):

    • $config['db']['user']
    • $config['db']['pass']
    • $config['db']['name']
  5. Run the import script (this will take a long time):

    ./import.php db

  6. Edit the datashuttle_tools/scripts/import/export-geojson.php file and change the following values in the $config array:

    • $config['db']['user']
    • $config['db']['pass']
    • $config['db']['name']
  7. Create an export of the areas boundaries:

    ./export-geojson.php > areas.json

  8. Move the newly created areas.json file to dataShuttle/cubes/public/data/

  9. Copy dataShuttle/cubes/model.json to datashuttle_tools/scripts/import/

  10. Edit datashuttle_tools/scripts/import/build-cubes-view.py and set the db_connect variable to your database connection string

  11. Run the cubes view build script:

    python build-cubes-view.py

  12. Create a VirtualHost entry in your Apache configuration for your site based on the following template:

    <VirtualHost *:80>

    ServerName cubes.datashuttle.dev
    
    DocumentRoot /var/www/dataShuttle/cubes/public
    <Directory /var/www/dataShuttle/cubes/public>
            Order allow,deny
            Allow from all
    </Directory>
    
    AddType application/json .json
    WSGIScriptAlias /api /var/www/dataShuttle/cubes/public/api/datashuttle.wsgi
    
  13. Edit dataShuttle/cubes/api.ini and update path to point to your model.json file and set url to your database connection string

  14. Restart Apache

  15. Visit your new site!

Clone this wiki locally