This post is a continuation of the previous post from the following link.

https://www.thedataschool.com.au/kristiadi-uisan/alteryx-week-4-creating-an-analytic-app-based-on-api-of-choice-part-1-preparing-required-file/

In the above link, the required file to create the Analytic App had been prepared.

Processing Input

The next step is to access Code Snippet for the Analytic App that can be seen in Figure 1.

Figure 1. Code Snippets from Anime database API to get list of anime titles

The Text Input Tool used the URL from figure 1. Meanwhile, the Download Tool used the API Host and API Key from figure 1 to specify the Headers. These 2 tools are required before using the JSON parsing tool to download data from the database API. Demonstration and configuration of these tools are shown in figure 2-1 and figure 2-2, respectively.

Figure 2-1. Container for tools that process the input data

Figure 2-2. Configuration of Text Input tool

After running all input tools from figure 2-1, further data preparation was conducted to select relevant field and rows, remove unwanted values and improve the design of the output table. The used tools for data preparation include Text to Columns, Cross Tab, Filter, Select and Formula. Figure 3 shows the data preparation tools that are used in the created workflow.

Figure 3. Series of data preparation tools used for adjusting input data

Image Processing

Download and Image tools are used to process the field containing link to the image. Figures 4-1, 4-2 and 4-3 show the used image processing tools and their configuration.

Figure 4-1. Image inputting tools to prepare anime posters

Figure 4-2. Configuration of Download tool to a ‘Blob’ Output

Figure 4-3. Configuration of Image tool to get image from DownloadData field

Customising Reporting Layout

Following the image preparation, the report content adjustment step was conducted through using tools of Select for choosing relevant fields, Table to adjust data layout and Header to show report title. Figures 5-1 and 5-2 shows the illustration and configuration of tools related to setting the output table.

Figure 5-1. Report customisation tools to prepare content and header

Figure 5-2. Configuration of Table tool to adjust report content layout

Setting Interface Tools

The interface tools were added to enable the Analytic App to function. In this workflow, the Dropdown with 2 Actions was appended to show the Top 10 Anime based on Genre selection. For the Dropdown tool, ‘External Source’ option was selected to connect the workflow with the ‘Genres List’ csv file that was created by figure 3 workflow. As for the Action tools, the first and second Action tools are connected to the Text Input and Header tool, respectively. Figures 6-1 to 6-4 show the used Interface tools and their configurations.

Figure 6-1. Interface tools containing dropdown that shows the list of genres

Figure 6-2. Configuration of Dropdown tool to select genres

Figure 6-3. Configuration of Action tool to select genres in Text Input

Figure 6-4. Configuration of Action tool to select genres in Header

Finalising Output

The output was finalised using a Layout tool to adjust the position of Header and Table and a Render tool to create a PDF document. Figures 7-1, 7-2 and 7-3 show the used output tools and their configurations.

Figure 7-1. Reporting tools used to finalise output document

Figure 7-2. Layout tool configuration

Figure 7-3. Render tool configuration

Figure 8 shows the result of running the Analytic App.

Figure 8. Output window from running the Analytic App

Finally, the Analytic App is ready for all viewers who want to see the Top 10 Anime list based on the preferred genre that is illustrated in figure 9.

Figure 9. First page of output report

Kristiadi Uisan
Author: Kristiadi Uisan