Mira is developed using Ruby on Rails. You upload CSV files to it and it tries to give you a read-only HTTP API (if it likes the files you upload ;))
CSV files are uploaded to Mira along with a corresponding tabular data package (a datapackage.json file). The datapackage.json file provides the CSV file metadata, i.e. file names, columns, column-types, delimiters etc. See here and here for more information on tabular data packages.
A Mira instance is running here providing APIs to several datasets:
For example, some dummy clinical trial data has been uploaded and its API details are found here:
http://178.62.193.189/projects/6/api-details
Some examles of interacting with a Mira API:
http://davbre.github.io/mira-examples/
-
You're familiar with Ruby and Ruby on Rails.
-
PostgreSQL is installed
[https://www.digitalocean.com/community/tutorials/how-to-use-postgresql-with-your-ruby-on-rails-application-on-ubuntu-14-04] (https://www.digitalocean.com/community/tutorials/how-to-use-postgresql-with-your-ruby-on-rails-application-on-ubuntu-14-04)
-
Clone the repository
-
Run bundle
bundle install -
Update the config/database.yml file with your database credentials. Assuming you've created a user "mira" with full access to a database of the same name:
default: &default adapter: postgresql encoding: unicode pool: 5 host: localhost port: 5432 username: mira password: **your_password_here** development: <<: *default database: mira_dev test: <<: *default database: mira_test -
Create and migrate database, and seed database with a single admin user (email = admin@example.com and password = topsecret):
rake db:create rake db:migrate rake db:seed -
Start your local development server
rails s -
In a separate terminal start a background job to process uploaded files
rake jobs:work -
Open up the Mira homepage:
[http://localhost:3000] (http://localhost:3000)
-
Download sample csv files + their datapackage.json file:
[mira_sample_data.tar.gz] (https://github.com/davbre/dummy-sdtm/blob/master/output/mira_sample_data/mira_sample_data.tar.gz) or [mira_sample_data.zip] (https://github.com/davbre/dummy-sdtm/blob/master/output/mira_sample_data/mira_sample_data.zip)
-
Log in, create a new project, first upload the datapackage.json file, then the sample csv files
-
Navigate to the following address for the project's API details: