Creating Reports for a Python or R Model

When an application runs in Akumen, any outputs specified in the code will be pushed to the Data tab. The data stored here can be turned into a report in Akumen.

To create a new report:

  1. Go to the Report tab (next to the Data tab). Tabs Tabs
  2. Hover over the blue “+” button at the bottom right of the screen
  3. Select Blank Report from the options list.

You will be taken to your Reports dashboard. The dashboard is actually a reports service called Redash. For this part of the tutorial we will only go into how to put the report together and for information on redash and the dashboards you can click here

Redash Screen Redash Screen

Before you do anything click on the full screen symbol at the top right of the screen so that you can see the full dashboard. The reports dashboard has six parts to it:

  1. Your Dashboard;
  2. The Menu;
  3. Favorites Link;
  4. Search Bar;
  5. User Options; and
  6. And Dashboard Options.

When your dashboard is created you will see that the current text box on the screen gives you instructions on how to set up a query in order ot create your first graph. Welcome Widget Welcome Widget

By following these instructions and the directions to create queries we can create lots of types of graphs.

As the text box says the first thing that users will need to do is go to the create button at the top of the screen in the navigation bar and select Query from the list. Create List Create List

By selecting Query you will be taken to the queries page.

Query Screen Query Screen

The query page has two main parts to it. The right side of the page is where the pulled data and visuals are displayed, and the left side where the Schema Browser is. The schema browser is where all the currently executed model output views are available for every model in that particular client.

The first thing to do with this screen is to copy and paste the line of code in the text box into the code window at the top right of the screen.

select concat(StudyName, '.', ScenarioName) AS "Study/Scenario::multi-filter", * from "client_name"."model_name_table_name_vw" Code Window Code Window

The client_name will already be preset in your line of code to the client you are currently in. You will want to replace the model_name and table_name_vw with the appropriate model name and table that you want to draw data from. The table you will want to select will say something along the lines of coffee_shop_python_app_monthly_balances_vw. The model name will change depending on what you named your model.

Once you have entered the query, execute the model to pull the result into the model. From here you can create your graph by clicking on Edit Visualization or New Visualization.

New Visual New Visual

There are two types of charts that we can create;

  • Exploratory; or
  • Static.

Static visuals require specific code so that they only plot specific scenarios, and exploratory allows users to see all of the scenarios in a study and model on the one visual.