$ npm install
$ npm run start
To grab the data from RethinkDB via Horizon server, we need to add a configuration file called horizon-config.json
in ./src/connectors/
.
The format of this configuration file is listed as follow:
{
"horizon": {
"host": "140.112.42.53",
"port": 8181,
"table": "firetony"
}
}
host
is the address of Horizon server.port
is the listening port of Horizon server.table
is the target table in RethinkDB.
Now, we can visualize the data stored in the RethinkDB. In this repository, we have created the table and inserted some humidity/temperature data in our database. To visualize the data in assigned time period, see the follwoing steps.
- Open the Vision app in browser
- Click "add chart" button in the upper left.
- Input the following
yaml
format to describe the data sourcetitle: humidity sources: - name: humidity type: start_time: '2019-05-15 14:29:23' end_time: '2019-05-15 17:50:26' segment: aggr_func:
- Show the chart
In src/connectors/index.js
line 9:
export * from './rethinkdb-horizon'
change to
export * from './firestore'
and add a configuration file called firebase-config.json
in ./src/connectors/
.
The format of this configuration file is listed as follow:
{ "apiKey": "",
"authDomain": "",
"databaseURL": "",
"projectId": "",
"storageBucket": "",
"messagingSenderId": ""
}