[PYTHON] Easy analysis and sharing with re: dash, an open source data visualization tool Part 1-Installation

Numerical data accumulates when operating web services, social games, etc. It is very important to analyze the numerical data and utilize it for the next measure.

It is also good to hit the raw data with MySQL etc., put it out as a numerical value, and paste the graph in Excel, but it takes man-hours to do it every time. Ideally, directors, engineers, and anyone can come up with the numbers they want.

There are tools such as Tableau, but they are too expensive to buy. Even if you are alone, if you want to share it with a team, the license fee will be hundreds of thousands.

So open source re: dash. (Although there is a need to hit SQL)

environment

I'm assuming you created the latest version of Amazon Linux on EC2. Amazon Linux AMI 2015.09.1 (HVM), SSD Volume Type - ami-383c1956

re:dash

re:dash

re: dash works with data sources such as Redshift and MySQL to visualize that data. Since re: dash itself is a web server, you can check the visualized data with a browser. Moreover, re: dash is open source, so you can build it for free.

However, I tried to build it on mac or Amazon Linux of EC2 by myself, but it is quite difficult to install. If you don't know nginx, gunicorn, supervisord, celery, redis, postgresql, etc., it's difficult to debug when you can't build. In the first place, I have a script for Amazon Linux, but I can't install it because the script is already broken.

Ubuntu and Docker are easy, but I wanted to build it on Amazon Linux. So I forked re: dash and fixed the installation script so that it can be installed on EC2 with Ansible.

Repository

Constitution

re: dash uses Flask, so if you want to fix it, you can use python. nginx is in front, but I feel that it doesn't have to be separate. The main DB of re: dash is PostgreSQL. I don't need only re: dash for MySQL, but I have it installed because I want to use it as a data source.

server_pptx.png

Installation procedure

You can install it by doing the following. Please install Ansible.

clone git clone https://github.com/wapa5pow/ansible-redash-amazon-linux

Make hosts one of EC2. EC2 keeps ssh and http ports open cd ansible-redash-amazon-linux vi hosts

Set your-private-key.pem as EC2 SSH private key and do the following ansible-playbook site.yml --private-key=~/.ssh/your-private-key.pem -u ec2-user -i hosts

If Ansible fails, try the same command above again and it will succeed.

How to use re: dash

Login

Log in as admin / admin.

re_dash_Login.png

Add data source

re: dash connects to various databases, but to add MySQL installed on the same instance, do as follows.

re_dash___Data_Sources.png

re_dash___Data_Sources.png

Creating a query

After creating the data source, create a query.

re_dash___Country_Analytics.png

Visualization

From the issued query, you can create a graph etc. from "+ New Visualization" at the bottom of the same screen.

re_dash___Country_Analytics.png

Creating a dashboard

You can create a dashboard by collecting visualized graphs. If you summarize it here, it seems that regular KPI confirmation will be easy.

re_dash___Home.png

re_dash___Home.png

re_dash___国ごとの統計.png

スクリーンショット_2016-01-26_12_13_02.png

Summary

Next time, I will introduce what kind of visualization can be done.

Recommended Posts

Easy analysis and sharing with re: dash, an open source data visualization tool Part 1-Installation
Easy analysis sharing with re: dash, an open source data visualization tool Part 2 ~ Graph
Easy analysis sharing with re: dash, an open source data visualization tool Part 4 ~ pivot table
Easy analysis sharing with re: dash, an open source data visualization tool Part 2 ~ Graph
Easy analysis sharing with re: dash, an open source data visualization tool Part 4 ~ pivot table
Easy analysis and sharing with re: dash, an open source data visualization tool Part 1-Installation
Try to get CloudWatch metrics with re: dash python data source
Easy data visualization with Python seaborn.
Data analysis starting with python (data visualization 1)
Data analysis starting with python (data visualization 2)
Python visualization tool for data analysis work
Beautiful graph drawing with python -seaborn makes data analysis and visualization easier Part 1
Beautiful graph drawing with python -seaborn makes data analysis and visualization easier Part 2
Beautiful graph drawing with python -seaborn makes data analysis and visualization easier Part 1
Beautiful graph drawing with python -seaborn makes data analysis and visualization easier Part 2
Try to get CloudWatch metrics with re: dash python data source
Easy data visualization with Python seaborn.
Data analysis starting with python (data visualization 1)
Data analysis starting with python (data visualization 2)
[In-Database Python Analysis Tutorial with SQL Server 2017] Step 3: Data Exploration and Visualization
Starbucks Twitter Data Location Visualization and Analysis
Python visualization tool for data analysis work
Implement "Data Visualization Design # 3" with pandas and matplotlib
Data analysis planning collection processing and judgment (Part 1)
Data analysis planning collection processing and judgment (Part 2)
Get a large amount of Starbucks Twitter data with python and try data analysis Part 1