What is data analysis?
Lets understand this term with an example.You want to invest in share market (equity).You can make money if you can predict growth of equity.Everyday equity market opens at certain mark and closes at certain mark.In between the period fluctuations in value occur.This occurs everyday.So if you write down daily opening and closing price of an equity for say five years you have considerable amount of data.
Now this data is not meaningful unless you can make some decisions and derivations from it.What is maximum value of stock in this period?What is minimum value of stock in this period? What is the mean value?
To answer questions like this you need to analyze the data and make conclusions.So data analysis is termed as process or tools used to analyze the data and come up with a trend and conclusion to help in decision making.
What is Picalo?
Picalo is an open source software. It is used for Data Analysis,Statistical analysis,trend analysis using a nice simple graphic user interface.Picalo is based on Python.Python is one of the preferred programming languages for data analysis.Having its root in Python makes Picalo a strong tool for data analysis and fraud detection.
Picalo is powerful and can handle large data volume.The amount of data which can be handled depends on your system memory.You can use power of Python to extend functionality.The tool itself gives you great number of functions to use.
You can import data from excel sheets and also export data to excel sheets.I had once worked on a piece using Picalo.The learning curve was easy and it is fun to work with.This tutorial gives you insight into power of Picalo and its various features.
Picalo can be installed on any operating system (for example Linux distros like Fedora,OpenSUSE,Ubuntu,Mandriva,Centos etc,Solaris and Windows).The software dependencies required for Picalo installation is same for all above operating systems.The difference lies in commands to install these dependencies.The installation process of Picalo on Windows consist of below steps
- Installing Python2.6
- Installing wxPython2.8-unicode-py26
- Installing Picalo
- Download the Python installer for Windows from http://python.org
- Run the installer by double clicking the installer
- Install the Python in default location(C://Python26 is default location) for ease. If you are advanced user you can install it wherever you like.
Installing wxPython2.8-unicode-py26 —
- Download the wxPython installer for Windows from http://wxpython.org
- Run the installer by double clicking the installer
- Install the wxpython in default location.
- Install setuptools using instructions at http://pypi.python.org/pypi/setuptools
Installing chardet —
- Open the Windows Command prompt (Start -> Run As -> Type cmd -> click OK)
- Change the directory to the Python installation directory using cd command. If the Python is installed in default location use the first command cd to change the directory to the default directory else use the cd command to change the directory to Python installation directory. The second command is common and issued after the first command cd.
C:Python26Scripts> easy_install chardet.
Installing Picalo —
- Download Picalo from
- Install Picalo
- Picalo installation is same as any other windows application software.
Creating Picalo Detectlets
The real power of Picalo lies in detectlets. Detectlets are used to expand the functionality of Picalo.Suppose you want to use Picalo for analyzing data present in an Excel sheet and after performing specific operations on the data you want to generate result excel sheet.This functionality is not directly available in Picalo but Picalo can be expanded to perform this task using Detectlet.
To create a Detectlet perform below steps
- Create a subdirectory under the picalo-N.N/picalo/tools/Detectlets directory(where N.N are version number eg 4.40). e.g. The Example_Blog
subdirectory is created in this case
- Place the source code under the above sub directory e.g. Example_Blog. e.g. The source code analysis_blog.py is kept under the sub-directory Example_Blog.The analysis_blog.py contains code to perform above mentioned task of loading data from Excel sheet,performing operation on the data and creating reports
- Start the Picalo
- Go in the menu Tools–> Detectlets
- There the user will see an entry of the sub directory e.g in this case Example_Blog.
- In the Example_Blog sub menu the user will see the analysis_blog entry. Click on the entry.
- This will install the module in Picalo and is ready to use.
Coding Picalo detectlets
Detectlets are used to perform a specific operation needed by business.Detectlets are coded in Python language but with some difference(they do have .py extension).Detectlets are divided into 5 parts
Import section — The import section is used to import the functions needed later in the module.for example
from picalo import *
from math import log
from decimal import *
Declaration section — The declaration section is used to declare the detectlet version and detectlet standard
DETECTLET_STANDARD = 1.0
DETECTLET_VERSION = 1.0
Input Screen Section — The input screen section defines the input screens presented to the user.for example let the applications loads data from a worksheet of an excel file then the user should enter name of excel file and worksheet name of the excel file to be read by the application.The input screen section for this requirement can be coded as
wizard = ”’
Mention the fully qualified path name of Excel file containing the data to analyze.
for example On Unix platforms – /home/username/file-name.xls
<parameter type=”string” variable=”inputFileName”/>
Mention the Sheet Name of the Excel File containing the Data to analyze.
<parameter type=”string” variable=”inputSheetName”/> </page> </wizard>
The input screen section starts with wizard=”’ <wizard> and each user interface screen is defined within <page></page> tags.In above example there is one input screen with two text boxes defined by the <parameter /> tag. The type defines data-type of value inserted in the text boxes and variable is variable name used to hold the values.
Output Screen section — In this section the output screen is designed.for example let in output screen you want to display a set of values i.e. table then the output screen section be
RESULTS_TEXT = ”’
The output table contains following columns
– Column 1
– Column 2
– Column 3
– Column 4
– Column 5
– Column 6
Logic section — Logic section contains all the processing logic.It can be compared with main() function of C program or Python code.The Logic section begins with
for example if input is excel file name and excel worksheet name as mentioned above then the function call becomes
After this rest of function can be coded in same way as Python function.
Creating Picalo installers for Windows
Inno setup is an outstanding application and is great help to a new comer/freelancer.I have covered inno setup in details at this tutorial.To create installer using Inno setup follow below steps
- Download and install the Inno Setup software from http://www.jrsoftware.org/isdl.php.
- Click on the desktop icon to launch the application.The Inno setup start up screen is shown to the user.
Choose the option as shown in the picture to create a new Picalo Installer and click OK.Below screen will be displayed
On this screen dont choose any option and simply click on NEXT button.Application information screen is displayed.Provide all the information on application information screen and click on NEXT for details of application information screen visit blog Inno Setup Wizard application information screen
Application folder screen is displayed.Provide all the information on application folder screen and click on NEXT for details of application folder screen visit blog Inno Setup Wizard application folder screen
Application files screen is displayed.Provide all the information on application files screen and click on NEXT for details of application files screen visit blog Inno Setup Wizard Application files screen
The last screen Application icons screen is displayed.Choose the options suiting the applications and click on NEXT.
Consider sharing the post in case you found this helpful.