Download and Install the Plotly Database Connector App
Launch and Connect
Having launched the app, select Postgres by clicking on its icon.
Enter your username, password, database server name (host) and its port number.
Finally, click on the connect button!
Once connection is established, your connection credentials will be saved and greyed out to avoid unintentional changes. If you wish to modify your connection, click on edit credentials.
Preview Your Indexes and Docs
Two dropdown menus will appear. The options are the indexes and documents respectively of the database.
Send a Query to Your Database
Having connected your app, visit Plotly Chart Creator and click on import data in the top right corner.
Choose SQL from the options on the top.
If you have not setup your connector to use HTTPS protocol, you do not need to modify any of the options. See HTTPS tutorial to setup your connector to use the HTTPS protocol. Once done, come back to this point and select the HTTPS option.
Click on Connect
The modal will close and a new panel will be added to your Plotly Chart Creator.
On the right, your available connections from the Plotly Database Connector will be displayed. If you have more than one, make sure you select the database connection that you want to use when writing the query.
Also to your right, you will see a dropdown for the database indexes and documents. Once one of each is selected you will be able to view the Fields (column names) to help you with your search.
You can write a search string in the search bar such as John Smith which will cause Elasticsearch to only return entries that contain that string somewhere within them.,
To aggregate your results click on the aggregation-type dorpdown menu. Here we chose Significant terms to find most occuring words within the Response column and count them. The choice of counting them was made by selecting the option Count in the Compute dropdown menu.
Once your query is finalized, click Run Query. If you wish to set your query on a schedule to keep your grid's data updated to the latest entries of your database, visit our schedule a query tutorial.
Making a plot!
Let's visualize the most occuring terms in company's response messages in a pie chart. Click on Graph on the left side of the window and choose Pie Chart as Chart Type. Select Company Response as the labels and value Count as the values for the chart.
Let's make sure to go back to the graph and make a title to clarify our message.
Finally let's not forget to save and share our graph. You can press Control + S to save or click on the Save button on the left of the window.
You will be prompted to choose your privacy settings for this graph and data. There is nothing here to classify, let's simply set both plot and data to public. Click SAVE.
Let's share this interactive plot with a friend or a coworker (or both)! Click on the SHARE tab on the left.
The fastest way is to send the Shareable Link, copy and paste it into your favorite e-mail or other communication service. Try out our Twitter, Facebook and Google+ links as well or embed it into your website by obtaining the iframe link in the Embed tab. If you set the settings to public previously, your friend or coworker will be able to view it even without an account and give you feedback.