A Bipp Quickstart
In this quickstart we will provide a step-by-step walkthrough from datasource creation to dashboard generation using Bipp. As an example we will be using information related to ATP tennis players as our datasource. In this datasource we have information about ATP tournament players like name, height, birthdate, and country. We also have current rankings for players and data from ATP tournaments held in 2019. We will use this data to visualize the following
- Country wise distribution of top rated players.
- Plot for relation of height, age to player rank.
- Wins by type of surface.
- Distribution of left Vs right handed players.
1. Create a new datasource
A datasource in Bipp is essentially a connection to an external database. These connections can be managed on the Datasources screen that can be accessed from the main menu. To create a new datasource click on the New Datasource button on the Datasources screen. Provide the database connection details on this screen. For our example we will call our datasource
TennisData and enter the connection details to our
Players database. This is a MySQL database, hence the dialect chosen is MySQL.
After entering the required credentials, we click on the Create button to create the datasource. It will now be listed on the Datasources screen.
To ensure that Bipp can connect successfully to the new datasource, use the Ping option available in the datasource menu as shown.
A connection successful message should be shown. If Bipp is not able to connect to the database, an error message will be shown. Click on the Edit option to recheck the credentials entered in this case.
2. Create Project
The next step is to create a datamodel using Bling. By creating a datamodel, you can map the required tables and fields from the source database to a Bling datamodel. You can also define custom or derived tables and fields. A datamodel is stored as a project in Bipp. In order to create a datamodel, go to the Projects screen from the main menu. Click the New Project button on this screen. Enter the name of the project on the pop-up screen as shown and click on Validate.
If a project name is valid and not a duplicate, you will be asked to enter the Git repository details for the project.
You can either provide details of your own repository or select the I don’t have a repository option. A new blank project or datamodel will be created and listed on the Projects screen.
3. Create Datamodel
Creating the datamodel requires that we edit the project, link it to one or many datasources, add tables to be used from these datasources, and finally tailor the datamodel as per our needs. Let us start by editing the project by clicking on the Edit option for the
ATPTennisDataModel project that we created in the previous step.
A blank datamodel screen will be shown when we edit the project for the first time.
To start building the datamodel, click on the Files - Add - Table from Datasource option on the screen. The Add Table from Datasource screen is shown. We will select the
TennisData datasource from the panel on the left and select all three tables from this datasource.
Click on the Create File(s) button to return to the main screen. The Bling definition for the included tables will automatically be generated and included in the datamodel. We can now edit it as per our requirements.
We edit the datamodel based on the raw data that is coming in from our datasource and the transformations required to present it in our visualizations. Let us see the few ways in which we have tailored our tennis players data.
- Dataset name has been changed to a relevant name so that it can be easily identified on other screens in the future.
- Joins between tables defined so that information may be retrieved from multiple tables when viewing data.
Additional columns created to define common operations required. For example.
A PlayerName column has been created by concatenating FirstName and Last Name of the players that comes the database.
The database had the data ‘L’ for left-handed players and ‘R’ for right-handed players. A descriptive column has been introduced to help users interpret this data.
The database contains the birthdate as an
yyyymmddformat. This has been transformed to
datetimedatatype and the age of the player calculated as a difference in years.
RankRangecolumn has been introduced to group different ranks as one unit. For example ranks from 1 to 5 can be grouped as ‘Top 5’
Note that we have used MySQL syntax to define these transformations in SQL because we are using a MySQL database.
The required changes can be made incrementally as and when you find that you need to format some data or introduce a new column. In order to ensure that the changes made to the datamodel are available for visualization as Sheets, ensure that the changes are committed to the master. Also ensure that the sheets version is changed to use the latest datamodel version when you are testing your model. The Deploy Datamodel functionality can be used for this purpose.
4. Create Sheets
Sheets allow you to view the output of a datamodel in different ways so that you can tweak it as necessary. You can also incorporate data visualizations created in sheets on dashboards. To access/view data for a particular dataset for the first time, click on the Datasets main menu option and select the appropriate dataset on the Datasets screen.
This will take you to the sheets editor for the dataset. We will now use the data model we defined in the previous section to create the 4 visualizations that we mentioned in the introduction.
Country wise distribution of top rated players
For this visualization we need the country names and number of players from each country. We add the corresponding columns from the navigation panel on the left.
Since we need a count of players from each country, we apply the
Countaggregation on the player name field. Since we want to see the distribution of only top-rated players, we include a custom filter for
LatestRankings.Ranking <= 10in the Filter panel on the right. Click on Fetch to see the data retrieved from the model. The table view helps us to verify that we are getting the required data to generate the visualization.
We can now visualize this data using a
gMapvisualization. For this click on the gMap tab. To generate the map, we need to specify the field to be used for mapping to countries on the map and the field to be used as a measure. In our case, the field
Countryand the field
Count PlayerNameindicates the
Measure. On applying these settings, the distribution map will be generated as shown.
We can now save our first sheet by clicking on the Save As option from the Sheets menu.
Additional sheets may be added for the same dataset by clicking on the + button on the bar showing existing sheet names.
Plot for relation of height, age to player rank
In this visualization we will use the available data on players height, age and rank to check if there is any relation between players rank and the other two parameters. We add the respective columns for Ranking, Height and Age as shown below. We use the
Averageaggregation for Height and Age just in case the same rank is shared between multiple players.
To visualize this data, we will use a line chart that can be generated on the Bar tab. We adjust the settings as follows to get the output as a line chart.
- Ranking is mapped to the left axis by default while the two measures, Height and Age are mapped on the Y-axis.
- The range for height is mapped on the left side of the Y-axis while that for age is mapped on the right side.
- Different colors are used for each measure on the Y-axis.
- We limit the Y-axis range to 160 cm to 210 cm for height and 20 years to 40 years for age. This allows us to zoom into the data.
Wins by type of surface
We will now see how many matches were won on different types of surfaces (clay, grass, hard) in 2019 by top ranked players. For this we use the
RankRangecolumn that we defined in our datamodel to group different ranks together. We also
Sumthe wins by different players in the same
We can now visualize this data as a stacked bar chart as shown. The Stack All in the settings panel may be used to stack the bars one on top of the other.
Distribution of left Vs right handed players.
Finally we want to see the number of right-handed versus left-handed players. For this we just fetch the count of players for each type and map it on a pie-chart as shown.
5. Generate Dashboard
We will now see how these different visualizations could be clubbed on a single dashboard. Dashboards can be managed from the Dashboards screen that can be accessed from the main menu.
Click on the New Dashboard button to create a new dashboard. Enter the name for the new dashboard and select the sheets to be included. We will call our dashboard
TennisStats and select all four sheets that we created in the previous step.
Click on the Create button to create the dashboard. It will now be displayed in the list on the Dashboards screen. Click on the name of the dashboard to view the default dashboard generated as below.
We will now make some basic changes to this dashboard to refine it.
To edit a dashboard, click on the Edit option from the Dashboard menu on the dashboard listing screen. This will take you to the Ding dashboard editor.
We will first rearrange the dashboard tiles in the editor for a better view. For this we adjust the heights and widths (
basis) of certain tiles and change their positions in the container tile.
We increase the basis of the map and line-chart visualization types to 100 so that they can occupy the full-width available on the screen. We also set the panel visibility to hide so that the sheet names are not displayed on the dashboard.
We commit the dashboard model and view the generated dashboard after rearrange.
We will now add a dashboard level filter which can be applied on the visualizations. Let us say we want to filter the statistics displayed on the dashboard with respect to specific players. For this we need to add a
filter widget for
PlayerName on the dashboard. We can do this in the Ding editor as follows.
The filter will now be displayed on the dashboard. We can select specific player names in this and view the data as shown here.