Getting started with Analytics (Unicode edition)

This getting started tutorial introduces you to the end-to-end process of analyzing data using Analytics.

 

Estimated time 60 minutes
Requirements No previous Analytics experience is required. Some basic data analysis experience is assumed, but not absolutely critical.
Analytics version 13.0 or later (Unicode edition)
Do the right version of the tutorial

Do this version of the tutorial if you're using the Unicode edition of Analytics.

If you're using the non-Unicode edition, do Getting started with Analytics (non-Unicode edition).

Tip

To find out which edition of Analytics you're using, on the Analytics main menu, click Help > About to open the Analytics dialog box. The edition designation appears after the version number.

Note

The Chinese and Japanese user interfaces are Unicode-only.

Scenario

Review corporate credit card transactions

You're asked to review corporate credit card transactions from a two-month period. Your goal is to get a general picture of how employees used cards during the period, and also to identify any possible misuse of cards.

The transaction data is contained in three separate Excel worksheets. Before you can analyze the data, you need to import it into Analytics, and combine the separate data sets into a single Analytics table.

After you've analyzed the data, you want to present the results of your analysis visually, to better engage your audience.

Optional section

You're told that from now on, reviewing corporate credit card transactions will be a recurring responsibility.

To allow yourself, or someone else, to perform future reviews quickly and accurately, you decide to create a script to automate some of the work.

PIPAR – the data analysis cycle in Analytics

The data analysis cycle in Analytics contains five stages, which are summarized by the acronym PIPAR:

Plan, Import, Prepare, Analyze, Report

Plan your work

Planning your data analysis work is important, and often critical. If you skip the planning stage, and jump straight into running analytical commands against data, you may run into problems, create extra work for yourself, or even miss important analytical insights.

Even a basic plan is better than no plan. With experience, and increasing knowledge of Analytics, your planning will become more fully developed and more precise. Good planning is the key to data analysis projects that progress smoothly and efficiently.

Planning guidelines

Import data

You must import data into Analytics before you can analyze it.

We'll familiarize with the import process by using the Data Definition Wizard to import three Excel worksheets. Importing from Excel is one of the most common methods for acquiring data for analysis in Analytics. However, Analytics supports importing data from a wide variety of data sources.

Open Analytics and "Sample Project.ACL"

Note

The steps below assume you have already activated Analytics.

Import the first two Excel worksheets

You will get started by importing two Excel worksheets at the same time. Importing multiple Excel worksheets simultaneously is a great way to reduce labor.

Import the third Excel worksheet

Now import the third Excel worksheet by itself. When you import a single worksheet, you have the option of manually adjusting some of the metadata settings during the import process, rather than doing it later in Analytics.

You should now have three new Analytics tables in the Overview tab of the Navigator. These tables contain read-only copies of the Excel data. They do not contain the Excel source data itself.

Prepare data

Often you must perform one or more data preparation tasks before data is ready to analyze.

For this tutorial, you'll perform two preparation tasks:

  • make additional adjustments to harmonize data fields
  • combine the three new Analytics tables into a single table for analysis

As well, as a best practice, you should always verify the validity of imported data before performing analytical work. Even a small amount of invalid data in a table can invalidate all your subsequent data analysis.

Why do I need to prepare data?

You're eager to get on with the analysis of the data, but without proper data preparation you may not be able to perform the analysis. Or the analysis you perform may be flawed.

A wide variety of issues can affect source data making it unsuitable for analysis without some initial preparation.

For example:

  • The source data is spread between several different files and needs to be consolidated so that it can be analyzed as a single set of data.
  • Corresponding fields in different files need to be "harmonized", which means making them identical in structure and format as a prerequisite to processing them.
  • "Dirty data" needs to be cleansed and standardized, which you can do with Analytics functions.

Key point

The time you spend importing and preparing data may exceed the time you spend on the actual analysis. However, they are critical initial stages, and provide the foundation that your analysis is built on.

Adjust the table layouts

Every table in an Analytics project has a table layout. The table layout contains metadata such as field names, the start position of fields, the length of fields, the data type of fields, and so on.

Before we can combine the three new Analytics tables into a single table, we need to harmonize some of the metadata in the table layouts.

Here's what the Trans_Apr table layout looks like. You'll quickly learn your way around table layouts as you become more familiar with Analytics. You can do a lot of useful things in the table layout.

Adjust the Trans_Apr table layout

First, you need to change the data type of two fields in the Trans_Apr table.

Adjust the Trans_May table layouts

To finish the adjustments, you need to change the data type of two fields in both the Trans1_May and the Trans2_May layouts. You may also need to make an adjustment to the DATE field.

Verify the imported data

Now let's verify the data in the three imported tables to make sure it's safe to proceed with additional data preparation, and data analysis.

Note

We're verifying the data after updating the data types. When you verify data in Analytics, you're checking that all the values in a field conform to the requirements of the field's data type. So it makes sense to verify data only once the data types are finalized.

Learn more

If you want to see what happens when Analytics does identify data validity errors, open Tables\Badfile and run the verification process.

Combine the three Analytics tables

For the final data preparation task, you combine the three new Analytics tables into a single table.

For simplicity, the tutorial combines only three tables. However, you could use the same process to combine 12 monthly tables into a single annual table and perform analysis on data for an entire fiscal year.

You're now ready to move on to some actual data analysis.

Analyze data

You perform analysis in Analytics by using commands and other tools to gain general insights about the data you are investigating, and to answer specific questions.

Note

The analysis stage is where the strength of your earlier planning becomes apparent. If you've formulated clear objectives regarding your investigation, you'll have a clearer idea of the types of analysis to perform.

The data analysis

For this tutorial, you'll perform the following analysis of the data in the Trans_All table:

  • group the credit card transaction records by merchant category code in order to discover:
    • how employees are using corporate credit cards
    • how much money is being spent in each category
  • create a filter to isolate any prohibited transactions

Group credit card transactions by merchant category code

Grouping or summarizing a set of data is an excellent way of quickly getting an overview of the data.

Simple tools for investigation

Now that you have a summarized version of the data, you can use some basic Analytics tools to gain general insight into corporate credit card use.

You can learn a lot about patterns of use, and possible misuse, in just a few clicks.

To gain this insight: Do this in the Trans_All_Grouped table:
What was the total amount charged by employees during April and May?
  • Select the Total AMOUNT header.
  • Select Analyze > Total.

Total expenditure was $187,177.13.

Where did employees spend the most money?
  • Right-click the Total AMOUNT header and select Quick Sort Descending

The Description field shows you that the most money was spent on:

  • Caterers
  • Eating places and Restaurants
  • Hilton International
What were the largest single expenditures?
  • Right-click the Maximum AMOUNT header and select Quick Sort Descending

The Description and Maximum AMOUNT fields show you that the largest single expenditure was a Club Med amount of $1999.06.

Is Club Med an authorized merchant code for the corporate credit card? If the credit card limit is $2000, was an employee charging an amount just under the limit?

What does an examination of infrequently used codes reveal?
  • Right-click the COUNT header and select Quick Sort Ascending

Five categories had only a single charge each. Are some of them prohibited categories? Perhaps one or more employees thought that misusing a company card only very occasionally would allow them to escape detection.

  • Cigar Stores & Stands
  • Dating & Escort Svcs.
  • Babysitting services
  • Amusement Parks
  • Civic, Fraternal, and Social Associations
Are any of the categories prohibited?
  • Right-click the DESCRIPTION header and select Quick Sort Ascending to alphabetize the field values for easier scanning
  • Scan down the field looking for suspicious categories

Perhaps one or more of these categories are prohibited?

  • Babysitting services
  • Betting (including Lottery Tickets, Casino)
  • Civic, Fraternal, and Social Associations
  • Dating & Escort Svcs.
  • Massage Parlors
  • Precious Stones and Metals, Watches and Jewel
  • Video Game Arcades/Establishments

Note

Manual scanning is impractical for all but small data sets. We'll look at a more practical, more reliable method next.

Learn more

Perhaps you just want to perform some quick analysis and you don't want to output the results to a new table. When you summarized the Trans_All table, instead of selecting File in the Summarize dialog box, you could select Screen, and output the results to the Analytics display area.

Outputting to screen is only practical for smaller data sets. However, it has the advantage of providing an easy way to drill-down on individual groups and see only the source records in each group.

Create a filter to isolate prohibited transactions

Filters allow you to isolate just the records you are interested in at a particular moment. Filters are a powerful tool for answering specific questions about data.

A general review of the corporate credit card transactions alerted you to some possible prohibited transactions. You decide to confirm whether any transactions are prohibited by matching a list of prohibited merchant category codes against the data.

Learn more

Beyond filters

Filters work well if the number of criteria or conditions contained by the filter are manageable. The filter you created in this tutorial contains only 9 codes. But what if your list of prohibited merchant category codes was several dozen, or more?

A more efficient approach would be to join an Analytics table containing the prohibited codes with the transactions table. Every match in the joined output table would be a prohibited transaction.

Joins are beyond the scope of this tutorial, but they are a frequently used feature in Analytics.

Report results

Once your data analysis is complete, Analytics gives you several different ways to report or present your results.

Traditional reports with columns of data are available, but we'll look at conveying results using the more engaging data visualization described below.

Treemap visualization

This treemap visualization shows the grouped credit card transactions you output in the Trans_All_Grouped table. The relation between groups is conveyed in two different ways:

  • size of the box indicates the count of individual transactions in each group

    The larger the box, the greater the number of transactions. The boxes are arranged in size from top left to bottom right.

  • color intensity of the box indicates the total amount of each group

    The darker the box, the greater the total amount.

So, for example, the size of the Club Med box, in the bottom right quadrant, indicates only a small number of transactions, but the color indicates that the total transaction amount is significant.

First, a little pre-work

You're going to create the treemap visualization in Results, the issue remediation app in the cloud-based HighBond platform. Access to a lite version of Results is included in your ACL Robotics subscription.

In order to create the visualization, you must first create a simple, two-level data container to hold it. The first level is called a Collection, and the second level is called an Analysis. They're quick and easy to create.

Sign in to Launchpad and access Results

Note

If for some reason you cannot sign in to Launchpad or access Results, you can use one of the alternative report creation methods listed in Other reporting methods in Analytics.

Create a Collection

Create an Analysis

Export data from Analytics to Results

The next stage is to export the Trans_All_Grouped table from Analytics to Results.

Create the visualization

Now you're ready to create the visualization in Results.

Save the visualization

If you want to keep any visualizations you create you need to save them. You need to save each visualization individually, and also the container that holds them, called an interpretation.

Publish to Storyboards

Create a storyboard to display the visualization you just created. A storyboard is a communication platform that displays multiple visualizations and rich text content in a single presentation.

Other reporting methods in Analytics

In addition to the data visualizations available in Results, Analytics has several other methods you can use for reporting the results of your data analysis:

Reporting method Description
Data visualizations in the Analysis App window

The data visualization capability in Results is also available locally in the Analysis App window, a freestanding component of Analytics.

Note

Some of the charts and visualizations available in Results may not be available in the Analysis App window until a new version of Analytics is released.

For more information, see Interpretations and visualizations.

Legacy Analytics charts

Analytics contains a legacy charting and graphing capability that allows you to create basic visual reports.

For more information, see Working with Analytics graphs.

Traditional columnar reports

In some cases, a traditional text- and number-based report with rows and columns of data is all you need.

For more information, see Formatting and generating Analytics reports.

Third-party reporting tool

You can use a third-party reporting tool such as Tableau or Microsoft BI and import data directly from Analytics.

For more information, see Connecting to Analytics from a third-party reporting application.

Exporting data to Excel or CSV

You can export data to Excel, or to a comma-separated file, and use the reporting capabilities of Excel, or of any tool that can work with a CSV file.

For more information, see Exporting data.

You're finished

Congratulations! You've completed your end-to-end introduction to analyzing data using Analytics.

Where to next?

You have several options for continuing to learn about Analytics:

Academy

Academy offers a range of courses for various experience levels. ACL Analytics Foundations Program is a series of six mini-courses that teaches Analytics basics for new users.

Academy is the Galvanize online training resource center. Go to the course catalog to see the available courses.

Academy courses are included at no extra cost for any user with a subscription.

Analytics and ACLScript Help

You're currently in the Analytics and ACLScript Help. The Help provides reference-style conceptual material, step-by-step instructions, and ACLScript syntax for all aspects of Analytics.

For example, here are the Help topics for the append operation, which formed part of the tutorial you just completed:

Community

Community is a web-based platform with a variety of customer resources, including a customer forum where experienced Analytics users share their expertise and answer questions.

The customer forum is the best place to learn about the real-world usage and application of Analytics.

Script your work (optional section)

Estimated time 20 minutes
Requirements No previous scripting experience is required.
Analytics version 13.0 or later (Unicode edition)

You can gain a lot of value using Analytics in an ad hoc or manual fashion without ever writing a script. For the most part, anything that can be done in a script can be done in the user interface, and vice versa. However, to gain the most value, power, and efficiency from Analytics, you need to script.

The good news is that Analytics provides tools to make scripting relatively easy, even for a novice.

The case for scripting

Imagine that in addition to all your current responsibilities you're now responsible for reviewing corporate credit card usage on a regular basis.

Save time

The basic review process is standardized. With each review cycle, you can spend time repeating the basic process manually, or you can save time by automating the process.

Delegate with confidence

If the process is automated, maybe you can delegate the task to a more junior staff member. A tested script gives you the confidence that less experienced employees can perform the task consistently and accurately, without a significant increase to their workload.

What is a script?

An Analytics script is a series of ACLScript commands that perform a particular task, or several related tasks. For example, everything that you just did manually in the first part of this tutorial could also be performed using a script.

ACLScript is the command language that forms the basis of Analytics. Scripts are stored in Analytics projects. Individual scripts appear in the Navigator, and are prefaced by the script icon .

How the Analytics command log works

You may have noticed that the Navigator contains the Log tab. As a script writer, you'll discover that the Analytics command log is your best friend.

Building a script by copying commands from the log

You'll again reuse ACLScript syntax from the log, but this time you'll copy the syntax to an Analytics script. To keep things quick and easy, you'll script only a portion of the work you performed manually in the tutorial, but you could script all of it.

Note

We're going to skip over some scripting best practices in order to keep this introduction to scripting brief. The goal is to demonstrate how easy it is for even new users to create scripts in Analytics.

The entire tutorial in a script

The entire tutorial you just performed manually appears below in a script (in the "Steps" section). To finish this brief introduction to scripting, you're going to copy the script to Analytics and then redo the tutorial work, but this time with just a couple of clicks of the mouse.

Note

The script assumes that the Sample Data Files folder is installed in the default location. If the folder is installed in a different location, you need to modify the navigation paths in the script to point to the correct location.

The tables created by the script are appended with _s so that they don't overwrite the tables you created manually.

You're finished

That's the end of this brief introduction to scripting. We hope you've seen enough to be convinced of the value of scripting and that you want to learn more.

Where to next?

You have several options for learning more about scripting in Analytics:

Option Useful information
Tutorials

The Analytics Help contains the following beginner-level tutorials:

The Help also contains a complete ACLScript language reference with detailed information about every Analytics command and function.

Academy

Academy offers both an introductory and an advanced scripting course:

  • Introduction to scripting in ACL Analytics (ACL 106)
  • ACL Analytics Scripting (ACL 303)

Academy is the Galvanize online training resource center. Go to the course catalog to see the available courses.

Academy courses are included at no extra cost for any user with an ACL subscription.

Community

Community is a web-based platform with a variety of customer resources, including a customer forum where Analytics scripting is frequently discussed in depth.