<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Analyse This &#187; Visualisation</title>
	<atom:link href="http://www.prashantraju.com/category/visualisation/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.prashantraju.com</link>
	<description>The Trials and Tribulations of a Data Analyst</description>
	<lastBuildDate>Mon, 30 Aug 2010 10:22:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Creating Dynamic Sizing Charts with Pentaho Report Designer.</title>
		<link>http://www.prashantraju.com/2010/05/tip_creating-dynamic-sizing-charts-with-pentaho-report-designer/</link>
		<comments>http://www.prashantraju.com/2010/05/tip_creating-dynamic-sizing-charts-with-pentaho-report-designer/#comments</comments>
		<pubDate>Mon, 17 May 2010 09:30:23 +0000</pubDate>
		<dc:creator>Prashant Raju</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Pentaho]]></category>
		<category><![CDATA[Report Designer]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Visualisation]]></category>

		<guid isPermaLink="false">http://www.prashantraju.com/?p=1392</guid>
		<description><![CDATA[Pentaho Report Designer&#8217;s (PRD) charting capability is great &#8211; it has numerous charts to choose from and the formatting is extremely flexible. However I did have a problem with charts represent large data sets. For example I had a list of countries and a bar chart showing the population for each country, users were able [...]]]></description>
			<content:encoded><![CDATA[<p>Pentaho Report Designer&#8217;s (PRD) charting capability is great &#8211;  it has numerous charts to choose from and the formatting is extremely flexible. However I did have a problem with charts represent large data sets. For example I had a list of countries and a bar chart showing the population for each country, users were able to view one or more countries at a time using a multi value list parameter. The problem occurred when there were too many countries, the chart&#8217;s labels became unreadable. One method was to create a chart which had a dynamic width depending on the amount countries a user selected.</p>
<p><span id="more-1392"></span></p>
<h3>Scenario.</h3>
<p>I wanted to create a bar chart which has a dynamic width (<em>expand or <img title="More..." src="http://www.prashantraju.com/wp-includes/js/tinymce/plugins/wordpress/img/trans.gif" alt="" />contract</em>) depending on the amount of categories a user selected from a multi value list parameter. This would ensure that the chart didn&#8217;t become squashed and unreadable. in this tutorial I will be using a data set which represents population by countries.</p>
<h3>Data Set.</h3>
<p>Below is an example of the data set I will be using for this tutorial, as you can see each country has a population (you can download a spreadsheet version of the sample data at the end of this tutorial).</p>
<table>
<tbody>
<tr>
<th>ID</th>
<th>COUNTRY</th>
<th>POPULATION*</th>
</tr>
<tr>
<td>1</td>
<td>China</td>
<td>1337490000</td>
</tr>
<tr>
<td>&#8230;</td>
<td>&#8230;</td>
<td>&#8230;</td>
</tr>
</tbody>
</table>
<p>* Population is calculated in the millions</p>
<h3>Step 1 &#8211; Data Source.</h3>
<p>Start PRD and create a new report. Right click on the <strong>Data Sets</strong> icon and select the <strong>JDBC</strong> option from the menu.</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/05/datasource_jdbc_option.png" target="_blank"><img class="alignnone size-thumbnail wp-image-1350" title="Data Source &gt; JDBC option" src="http://www.prashantraju.com/wp-content/uploads/2010/05/datasource_jdbc_option-150x150.png" alt="Data Source, JDBC option" width="150" height="150" /></a></p>
<p>After selecting the <strong>JDBC</strong> option a <strong>JDBC Data Source</strong> window will appear. I have already created a connection to my database which includes the data that I will be working on, in this example it is called <strong>Geography</strong>.</p>
<p><img class="alignnone size-full wp-image-1424" title="Geography Data Source" src="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-11.05.57-AM.png" alt="Geography Data Source" width="266" height="175" /></p>
<p>Once you have a working connection to your database you are now ready to create your queries.</p>
<h3>Step 2 &#8211; Queries.</h3>
<p>This report contains two separate queries:</p>
<ol>
<li><strong>qCountries </strong>: Retrieves a distinct list of countries, this will be used for the countries parameter</li>
<li><strong>qDataset</strong> : Retrieves the population for the countries selected by a user</li>
</ol>
<h4>pCountries.</h4>
<p>The <strong>qCountries</strong> query needs to return a distinct list of countries<strong>, </strong>the SQL query looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span>   <span style="color: #993333; font-weight: bold;">DISTINCT</span> COUNTRY
<span style="color: #993333; font-weight: bold;">FROM</span>     dataset</pre></div></div>

<p>A screen shot of the <strong>JDBC Data Source</strong> window of the <strong>qCountries</strong> query looks like this:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-11.03.56-AM.png" target="_blank"><img class="alignnone size-medium wp-image-1423" title="qCountries" src="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-11.03.56-AM-300x211.png" alt="qCountries" width="300" height="211" /></a></p>
<h4>qDataset.</h4>
<p>The <strong>qDataset</strong> query needs to return the population for countries which the user has selected<strong>, </strong>the SQL query looks like this (this query will need to use a parameter which I will add in later):</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">-- Use a sub query to calculate the total amount of countries selected</span>
<span style="color: #993333; font-weight: bold;">SELECT</span>    t1<span style="color: #66cc66;">.</span>COUNTRY <span style="color: #993333; font-weight: bold;">AS</span> COUNTRY<span style="color: #66cc66;">,</span>
               SUM<span style="color: #66cc66;">&#40;</span>t1<span style="color: #66cc66;">.</span>POPULATION<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> POPULATION<span style="color: #66cc66;">,</span>
               SUM<span style="color: #66cc66;">&#40;</span>t2<span style="color: #66cc66;">.</span>COUNTRY_COUNT<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> COUNTRY_COUNT
<span style="color: #993333; font-weight: bold;">FROM</span>      dataset t1<span style="color: #66cc66;">,</span>
          <span style="color: #66cc66;">&#40;</span>
              <span style="color: #993333; font-weight: bold;">SELECT</span> COUNT<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">*</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> COUNTRY_COUNT
              <span style="color: #993333; font-weight: bold;">FROM</span> dataset
              <span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> COUNTRY
          <span style="color: #66cc66;">&#41;</span> t2
<span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> COUNTRY</pre></div></div>

<p>A screen shot of the <strong>JDBC Data Source</strong> window with the <strong>qDataset</strong> query looks like this:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-16-at-12.17.37-AM.png" target="_blank"><img class="alignnone size-medium wp-image-1468" title="qDataset" src="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-16-at-12.17.37-AM-300x213.png" alt="qDataset" width="300" height="213" /></a></p>
<h3>Step 3 &#8211; Parameter.</h3>
<p>There is only one (multi value list) parameter in this report which will display a distinct list of countries and be populated by the <strong>qCountries </strong>query. To create a new parameter right click on the <strong>Parameters </strong>option under the <strong>Data </strong>tab and click the <strong>Add Parameter&#8230; </strong>option:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-1.06.19-AM.png" target="_blank"><img class="alignnone size-full wp-image-1407" title="Add Parameter..." src="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-1.06.19-AM.png" alt="Add Parameter..." width="220" height="248" /></a></p>
<p>This will bring up the <strong>Add Parameter</strong> window. After filling out all the options the <strong>Add Parameter</strong> window now looks like this:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-1.13.43-AM.png" target="_blank"><img class="alignnone size-medium wp-image-1409" title="sCountries" src="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-1.13.43-AM-292x300.png" alt="sCountries" width="292" height="300" /></a></p>
<p>Where the options and values are:</p>
<ul>
<li><strong>Name</strong> : This is the name of the parameter, this is used within report queries i.e. the WHERE clause of qDataset</li>
<li><strong>Label </strong>: The text which sits next to the parameter on the report i.e. <em>Select one or more countries</em></li>
<li><strong>Value Type </strong>: The data type of the sCountries value i.e. COUNTRY is a String</li>
<li><strong>Mandatory </strong>: For the report to run a parameter value must be selected i.e. Checked (true)</li>
<li><strong>Display Type </strong>: The parameter type i.e. Multi Value List</li>
<li><strong>Value </strong>: The parameters value which will used within queries etc. i.e. the field COUNTRY</li>
<li><strong>Display Name </strong>: What the user will see the parameter value as i.e. the field COUNTRY</li>
<li><strong>Visible items </strong>: The amount of items which are shown to the user in the multi value list parameter i.e. 3</li>
</ul>
<p>Click <strong>OK</strong> to save the parameter, it should now be visible under the <strong>Parameters item</strong> under the <strong>Data</strong> tab.</p>
<p><img class="alignnone size-full wp-image-1410" title="sCountries Parameter" src="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-1.21.48-AM.png" alt="sCountries Parameter" width="238" height="104" /></p>
<p>After adding the <strong>sCountries </strong>parameter the next step is to use the parameter as part of the <strong>qDataset</strong> WHERE clause. Right click on the <strong>qDataset</strong> item under the <strong>Data</strong> tab and click the <strong>Edit Query </strong>option:</p>
<p><img class="alignnone size-full wp-image-1427" title="Edit Query" src="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-11.57.41-AM.png" alt="Edit Query" width="235" height="172" /></p>
<p>Modify the <strong>qDataset</strong> query so that it now includes the <strong>sCountries</strong> parameter:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">-- Use a sub query to calculate the total amount of countries selected</span>
<span style="color: #993333; font-weight: bold;">SELECT</span>    t1<span style="color: #66cc66;">.</span>COUNTRY <span style="color: #993333; font-weight: bold;">AS</span> COUNTRY<span style="color: #66cc66;">,</span>
               SUM<span style="color: #66cc66;">&#40;</span>t1<span style="color: #66cc66;">.</span>POPULATION<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> POPULATION<span style="color: #66cc66;">,</span>
               SUM<span style="color: #66cc66;">&#40;</span>t2<span style="color: #66cc66;">.</span>COUNTRY_COUNT<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> COUNTRY_COUNT
<span style="color: #993333; font-weight: bold;">FROM</span>      dataset t1<span style="color: #66cc66;">,</span>
          <span style="color: #66cc66;">&#40;</span>
              <span style="color: #993333; font-weight: bold;">SELECT</span> COUNT<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">*</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> COUNTRY_COUNT
              <span style="color: #993333; font-weight: bold;">FROM</span> dataset
              <span style="color: #993333; font-weight: bold;">WHERE</span> COUNTRY <span style="color: #993333; font-weight: bold;">IN</span> <span style="color: #66cc66;">&#40;</span>$<span style="color: #66cc66;">&#123;</span>sCountries<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>
              <span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> COUNTRY
          <span style="color: #66cc66;">&#41;</span> t2
<span style="color: #993333; font-weight: bold;">WHERE</span> COUNTRY <span style="color: #993333; font-weight: bold;">IN</span> <span style="color: #66cc66;">&#40;</span>$<span style="color: #66cc66;">&#123;</span>sCountries<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> COUNTRY</pre></div></div>

<p><a href="../wp-content/uploads/2010/05/Screen-shot-2010-05-16-at-12.14.17-AM.png" target="_blank"><img title="qDataset" src="../wp-content/uploads/2010/05/Screen-shot-2010-05-16-at-12.14.17-AM-300x223.png" alt="qDataset" width="300" height="223" /></a></p>
<h3>Step 4 &#8211; Bar Chart.</h3>
<p>The next step is to create a bar chart whose width is dynamic based on the amount of countries a user selects. To get started drag and drop the chart object onto the report header.</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-1.27.11-AM.png" target="_blank"><img class="alignnone size-medium wp-image-1413" title="Bar Chart on Report Header" src="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-1.27.11-AM-300x187.png" alt="Bar Chart on Report Header" width="300" height="187" /></a></p>
<p>As you can see the width is fixed at the moment but before I start to make any changes to the chart&#8217;s width I will need to configure my chart to display our data and see how it becomes unreadable when we increase the amount of categories on the x axis. Double click on the chart and to bring up the <strong>Edit Chart </strong>window.</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-1.29.34-AM.png" target="_blank"><img class="alignnone size-medium wp-image-1414" title="Edit Chart" src="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-1.29.34-AM-300x199.png" alt="Edit Chart" width="300" height="199" /></a></p>
<p>By default the chart is set to a bar chart and without going through every available option I made the following changes to represent my data set:</p>
<ul>
<li><strong>chart-title</strong> : Chart title i.e. Population of Countries (optional)</li>
<li><strong>gridlines</strong> : Are the vertical and horizontal grid markers i.e. Set to False (optional)</li>
<li><strong>x-axis</strong><strong>-title</strong> : Label of the x-axis i.e Countries</li>
<li><strong>x-axis</strong><strong>-label-rotation<strong> </strong></strong>: Rotation of the x-axis label i.e. 90</li>
<li><strong>y-axis</strong><strong>-title</strong> : Label of the y-axis i.e. Population (millions)</li>
<li><strong>category-column</strong><strong> </strong>: Field which will be on the x-axis i.e. COUNTRY</li>
<li><strong>value-columns</strong><strong> </strong> : Field which populates the y-axis i.e. POPULATION</li>
<li><strong>series-by-field</strong> : Field which defines the series i.e. COUNTRY</li>
</ul>
<p>After previewing the chart with all the countries selected you can see that the output is squashed and unreadable.</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-12.30.08-PM1.png" target="_blank"><img class="alignnone size-medium wp-image-1433" title="Preview Non Dynamic Chart" src="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-12.30.08-PM1-300x127.png" alt="Preview Non Dynamic Chart" width="300" height="127" /></a></p>
<p>One way around this is to make the width (or height) of your chart dynamic by the amount of countries the user selects from the multi value list parameter. Select the chart and on the right hand side under the <strong>Style</strong> tab locate the <strong>size &amp; position </strong>option and click the <img class="alignnone size-full wp-image-688" style="padding: 0; margin: 0; border: none;" title="Plus Icon" src="http://www.prashantraju.com/wp-content/uploads/2010/01/plus_icon.jpg" alt="Add a new query icon" width="15" height="15" /> icon under the <strong>Formula</strong> column. This will display an <strong>Expression </strong>window, click on the <img class="alignnone size-full wp-image-1434" style="padding: 0; margin: 0; border: none;" title="Screen shot 2010-05-15 at 1.35.05 PM" src="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-1.35.05-PM.png" alt="" width="32" height="20" /> icon which will then open the <strong>Formula Editor</strong> window.</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-1.37.51-PM.png" target="_blank"><img class="alignnone size-medium wp-image-1436" title="Formula Editor" src="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-1.37.51-PM-300x169.png" alt="Formula Editor" width="300" height="169" /></a></p>
<p>The formula below retrieves the COUNTRY_COUNT field and multiplies it by the width of the chart which suits one category (country) on the x axis, which in this example is 150.</p>

<div class="wp_syntax"><div class="code"><pre class="properties" style="font-family:monospace;"><span style="color: #808080; font-style: italic;"># If there is only one country selected then use default width otherwise calculate width</span>
<span style="color: #000000;">=</span>IF<span style="">&#40;</span><span style="">&#91;</span>COUNTRY_COUNT<span style="">&#93;</span><span style="color: #000000;">=</span><span style="">1</span>;<span style="">150</span>;<span style="">&#91;</span>COUNTRY_COUNT<span style="">&#93;</span>*<span style="">150</span><span style="">&#41;</span></pre></div></div>

<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-9.20.29-PM.png" target="_blank"><img class="alignnone size-medium wp-image-1449" title="Width Formula" src="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-9.20.29-PM-300x177.png" alt="Width Formula" width="300" height="177" /></a></p>
<p>Save the formula. Now you are ready to preview the report.</p>
<h3>Step 5 &#8211; Preview.</h3>
<p>Click on the preview icon <img class="alignnone size-full wp-image-723" style="padding: 0px; margin: 0px; border: none;" title="Preview Icon" src="http://www.prashantraju.com/wp-content/uploads/2010/01/preview_icon.jpg" alt="Preview icon" width="26" height="26" /> and select one country from the multi value list parameter, as you can see the width is set to our default width, 150.</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-10.51.17-PM.png" target="_blank"><img class="alignnone size-medium wp-image-1457" title="1 Parameter" src="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-10.51.17-PM-300x137.png" alt="1 Parameter" width="300" height="137" /></a></p>
<p>Selecting two countries from the multi value list parameter will expand the width to 300.</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-10.51.37-PM.png" target="_blank"><img class="alignnone size-medium wp-image-1458" title="2 Parameters" src="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-10.51.37-PM-300x135.png" alt="2 Parameters" width="300" height="135" /></a></p>
<p>Selecting four countries from the multi list parameter will expand the width to 600.</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-10.52.34-PM.png" target="_blank"><img class="alignnone size-medium wp-image-1459" title="4 Parameters" src="http://www.prashantraju.com/wp-content/uploads/2010/05/Screen-shot-2010-05-15-at-10.52.34-PM-300x136.png" alt="4 Parameters" width="300" height="136" /></a></p>
<p>So that is how you create a chart which can expand or contract depending on the amount of categories displayed on the x axis.</p>
<h3>Downloads.</h3>
<table>
<tbody>
<tr>
<th>Filename</th>
<th>Type</th>
<th>Notes</th>
</tr>
<tr>
<td><a href="http://docs.google.com/leaf?id=0B9Jmocc0fj_EYjg1MTM2YTEtYzhjZi00N2Y1LTg5YmQtNTg2ZWU0Mjg3Zjhl&amp;hl=en" target="_blank">DynamicChartsData</a></td>
<td>ODS</td>
<td>Released 17/05/2010</td>
</tr>
<tr>
<td><a href="http://docs.google.com/leaf?id=0B9Jmocc0fj_EOGMxMjRhZmYtOGIzMS00NmNlLTgzNjAtMTNlNWZiMGE0MDcz&amp;hl=en" target="_blank">DynamicCharts</a></td>
<td>PRPT</td>
<td>Released 17/05/2010</td>
</tr>
</tbody>
</table>
<h3>Final Notes.</h3>
<p>A couple of things to note about the method I used:</p>
<ul>
<li>The query to generate the amount of selected countries uses a sub query and could cause performance issues with large data sets etc.</li>
<li>This method can be used for both the width and height and on any other object within PRD i.e. shapes, labels, pictures etc.</li>
</ul>
<p>Hopefully this comes in handy when you start handling large data sets and charts!</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prashantraju.com/2010/05/tip_creating-dynamic-sizing-charts-with-pentaho-report-designer/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Pentaho Report Designer and Excel Data Sources.</title>
		<link>http://www.prashantraju.com/2010/04/pentaho-report-designer-and-excel-data-sources/</link>
		<comments>http://www.prashantraju.com/2010/04/pentaho-report-designer-and-excel-data-sources/#comments</comments>
		<pubDate>Thu, 08 Apr 2010 03:23:57 +0000</pubDate>
		<dc:creator>Prashant Raju</dc:creator>
				<category><![CDATA[Pentaho]]></category>
		<category><![CDATA[Report Designer]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Visualisation]]></category>

		<guid isPermaLink="false">http://www.prashantraju.com/?p=1097</guid>
		<description><![CDATA[Last week I had a regular Excel/Access user approach me with a problem: I have 40 sale campaigns. I need to put together a quick presentation (as a PDF) which will show 2 key metrics (New and Loss revenue) for each of the 40 sale campaigns. Do you know of a quick way I can [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I had a regular Excel/Access user approach me with a problem:</p>
<blockquote><p>I have 40 sale campaigns. I need to put together a quick presentation (as a PDF) which will show 2 key metrics (New and Loss revenue) for each of the 40 sale campaigns. Do you know of a quick way I can produce this presentation?</p></blockquote>
<p>I thought this would the perfect opportunity to show off Pentaho Report Designer (PRD) as an alternative to Mircosoft Excel, Access or other big BI vendors. Below is a step by step guide on how I accomplished this.</p>
<p><span id="more-1097"></span></p>
<h3>Scenario.</h3>
<p>The above statement sums up the users requirements, visually the the report needed to look like this:</p>
<p><img class="alignnone size-full wp-image-1167" title="Report Structure" src="http://www.prashantraju.com/wp-content/uploads/2010/04/report_structure1.jpg" alt="Report Structure" width="311" height="190" /></p>
<p>After I knew the structure of the report I got the user to export the data into an Excel Worksheet &#8211; this was going to be my data source &#8211; after this it took me only 5 minutes to create the presentation using PRD.</p>
<h3>Data Source.</h3>
<p>The end user was able to produce a raw extract of the data which the report needed to be based on. Here is a preview of the data:</p>
<table>
<thead>
<tr>
<th>Campaign</th>
<th>Week_Ending</th>
<th>New_09</th>
<th>New_10</th>
<th>Loss_09</th>
<th>Loss_10</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>04/04/2010</td>
<td>12313</td>
<td>23423</td>
<td>34534</td>
<td>3463</td>
</tr>
<tr>
<td>&#8230;</td>
<td>&#8230;</td>
<td>&#8230;</td>
<td>&#8230;</td>
<td>&#8230;</td>
<td>&#8230;</td>
</tr>
</tbody>
</table>
<ul>
<li><strong>Campaign</strong>: Campaign identifier which duplicates for each week row</li>
<li><strong>Week</strong>: Week ending date which is for 2010</li>
<li><strong>New_09, Loss_09:</strong> Revenue for 2009</li>
<li><strong>New_10, Loss_10</strong>: Revenue for 2010</li>
</ul>
<p>To use an Excel worksheet as a data source make sure the <strong>Data</strong> tab is active, right click on the <strong>Data Sets</strong> icon and select the <strong>Table</strong> option:</p>
<p><img class="alignnone size-full wp-image-1153" title="Table Data Source" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Table_Datasource.jpg" alt="Table Data Source (Data &gt; Data Sets &gt; Table)" width="285" height="269" /></p>
<p>After clicking the <strong>Table</strong> option a <strong>Table Datasource Editor</strong> window is displayed:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/04/Table_Datasource_Editor.jpg"><img class="alignnone size-medium wp-image-1154" title="Table Datasource Editor" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Table_Datasource_Editor-300x282.jpg" alt="Table Datasource Editor Window" width="300" height="282" /></a></p>
<h4><strong>Step 1. Create a Query.</strong></h4>
<p>The first step is to create a query which will store the data set. Click on the <img class="alignnone size-full wp-image-688" title="Plus Icon" src="http://www.prashantraju.com/wp-content/uploads/2010/01/plus_icon.jpg" alt="Add a new query icon" width="15" height="15" /> (Add Query) icon and then specify a name, in this example I&#8217;m naming the query <strong>dataset</strong>.</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/04/Table_Datasource_Editor_New.jpg"><img class="alignnone size-medium wp-image-1155" title="Table Datasource Editor New Query" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Table_Datasource_Editor_New-300x282.jpg" alt="Table Datasource Editor New Query" width="300" height="282" /></a></p>
<h4><strong>Step 2. Select the Excel Worksheet.</strong></h4>
<p>The next step is to select the Excel worksheet which contains the data set. Click on  the <img class="alignnone size-full wp-image-1127" title="Table Icon" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Screen-shot-2010-04-07-at-11.04.45-PM.png" alt="Table Icon" width="44" height="38" /> icon located in the bottom left hand corner to open up a file browser window, select the Excel file which contains the data set and click <strong>OK</strong>. Your data set should now be visible (as my Excel worksheet has headers I have checked the <strong>Use First Row as  Header</strong> option).</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/04/Table_Datasource_Editor_Pre.jpg"><img class="alignnone size-medium wp-image-1156" title="Table Datasource Editor Preview Data" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Table_Datasource_Editor_Pre-300x282.jpg" alt="Table Datasource Editor Preview Data" width="300" height="282" /></a></p>
<p class="notice">At the moment you can only use .XLS files so if you are using Office 2007+ make sure you save the extension as .XLS instead of .XLSX <strong>and </strong>if your .XLS file contains formulas they will not be recognised by PRD so be sure to paste special as values.</p>
<h4><strong><strong>Step 3. Manipulate the Data.</strong></strong></h4>
<p>You can add empty rows and columns or remove rows and columns by using these icons:</p>
<p><img class="alignnone size-full wp-image-1157" title="Modify the Dataset" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Table_Datasource_Editor_Edi.jpg" alt="Modify the Dataset" width="322" height="45" /></p>
<p>You are also able to change the column headers and data type by double clicking on the column header:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/04/Table_Datasource_Editor_Col.jpg"><img class="alignnone size-medium wp-image-1158" title="Table Datasource Editor - Modify Column Data Types and Names" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Table_Datasource_Editor_Col-300x282.jpg" alt="Table Datasource Editor - Modify Column Data Types and Names" width="300" height="282" /></a></p>
<p class="notice">In this example I didn&#8217;t need to make any modifications to the data however I did have trouble converting the Week_Ending field into a date format so in the Excel worksheet I converted it into a string using the TEXT() function &#8211; if anyone knows how to get this working please lleave a comment.</p>
<p>Once you are happy with the data set click the <strong>OK</strong> button. The data set should now be visible as fields under the <strong>Data Sets</strong> &gt; <strong>Table &gt; dataset</strong> icon under the <strong>Data</strong> tab:</p>
<p><img class="alignnone size-full wp-image-1159" title="Data Sets Fields" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Data_Sets_Fields.jpg" alt="Data Sets Fields" width="314" height="210" /></p>
<h3>Building the Report.</h3>
<p>The next step was to build the report, from the report structure (above) I knew I had to create one group Campaign, and within that group add 2 charts which represented the New and Loss Revenue for 2009 and 2010.</p>
<h4><strong>Step 1. Add the Group.</strong></h4>
<p>To get started add the <strong>Campaign</strong> field as a group by right clicking on the <strong>Groups</strong> item under the <strong>Structure</strong> tab and selecting the <strong>Edit Group</strong> .. option:</p>
<p><img class="alignnone size-full wp-image-1160" title="Edit Group Option" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Edit_Group.jpg" alt="Edit Group Option" width="314" height="210" /></p>
<p>After clicking the <strong>Edit Group ..</strong> option an <strong>Add Group </strong>window will appear, specify a name for the group i.e. Campaign and using the arrows move the field over which defines the group which in this example is Campaign and click <strong>OK</strong> when done.</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/04/Add_Group.jpg"><img class="alignnone size-medium wp-image-1161" title="Add Group Window" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Add_Group-300x150.jpg" alt="Add Group Window" width="300" height="150" /></a></p>
<p>The Campaign field will now be defined under the <strong>Attributes</strong> tab for the <strong>Group</strong> <strong>item</strong>:</p>
<p><img class="alignnone size-full wp-image-1162" title="Campaign Group Attributes" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Campaign_Group_Attr.jpg" alt="Campaign Group Attributes" width="314" height="210" /></p>
<p>The next step is to make the <strong>Group Header </strong>and <strong>Details Header </strong>are visible on the report canvass. Click on the <strong>Groups</strong> &gt; <strong>Group</strong> <strong>Header</strong> item under the <strong>Structure</strong> tab and and under the <strong>Attributes</strong> tab uncheck the <strong>hide-on-canvass</strong> option:</p>
<p><img class="alignnone size-full wp-image-1163" title="Group Header Visible" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Group_Header_Visible.jpg" alt="Group Header Visible" width="314" height="210" /></p>
<p>Repeat the above steps for the <strong>Groups &gt; Details Body &gt; Details Header </strong>item as well:</p>
<p><img class="alignnone size-full wp-image-1164" title="Details Header Visible" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Details_Header_Visible.jpg" alt="Details Header Visible" width="314" height="210" /></p>
<h4><strong><strong>Step 2. Functions.</strong></strong></h4>
<p>I will need to create three functions; one which will convert the Week_Ending field into a date and the other two will be display dynamic chart titles.</p>
<h5><strong>Converting the Date.</strong></h5>
<p>As I mentioned above I had some issues with letting PRD convert the Week_Ending field into a date from the Table Datasource Editor, so to get around this I created a formula which would take the Week_Ending field (as a string) and convert it into a Date.</p>
<p>To do this create a new function by right clicking on the <strong>Functions </strong>option under the <strong>Data</strong> tab and click the <strong>Add Function&#8230;</strong> option.</p>
<p><img class="alignnone size-full wp-image-1168" title="Add Function Menu Option" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Add_Fucntion_Option.jpg" alt="Add Function Menu Option" width="314" height="210" /></p>
<p>From the<strong> Add Function&#8230;</strong> window expand the<strong> Common</strong> folder and select the<strong> Open Formula</strong> option and click the <strong>Add </strong>button:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/04/Add_Function_Open_Form.jpg"><img class="alignnone size-medium wp-image-1169" title="Add Function Open Formula" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Add_Function_Open_Form-300x154.jpg" alt="Add Function Open Formula" width="300" height="154" /></a></p>
<p>This will add an <strong>Open Formula</strong> function under the <strong>Functions </strong>option (seen under the <strong>Data</strong> tab) :</p>
<p><img class="alignnone size-full wp-image-1170" title="New Open Formula Created" src="http://www.prashantraju.com/wp-content/uploads/2010/04/New_Open_Formula_Created.jpg" alt="New Open Formula Created" width="314" height="210" /></p>
<p>To change the name of the function (named by default as FormulaExpression1) click on the function and in the area below change the value that is set for the <strong>Function Name</strong>, in this example I named the function New_Week_Ending:</p>
<p><img class="alignnone size-full wp-image-1171" title="New Function Name" src="http://www.prashantraju.com/wp-content/uploads/2010/04/New_Function_Name.jpg" alt="New Function Name" width="314" height="210" /></p>
<p>To edit the formula of the function click on the <img class="alignnone size-full wp-image-1172" title="Dot Dot Dot" src="http://www.prashantraju.com/wp-content/uploads/2010/04/dotdotdot.jpg" alt="Dot Dot Dot" width="19" height="15" /> icon which is displayed when you click in the <strong>Formula </strong>value area, this will display a <strong>Formula Editor</strong> window:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/04/Formula_Editor.jpg"><img class="alignnone size-medium wp-image-1173" title="Formula Editor Window" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Formula_Editor-300x136.jpg" alt="Formula Editor Window" width="300" height="136" /></a></p>
<p>As my date is in the current format YYYY-MM-DD I needed to use the DATE function with a combination of LEFT, MID and RIGHT functions to convert it into a date. I won&#8217;t go into too much detail with this section as all these functions are pretty self explanatory and are well documented in the Formula Editor but the final formula looked like this:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">=DATE(LEFT([Week_Ending];4);MID([Week_Ending];6;2);RIGHT([Week_Ending];2))</pre></div></div>

<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/04/Formula_Editor_Window.jpg"><img class="alignnone size-medium wp-image-1175" title="Date Formula inside Formula Editor" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Formula_Editor_Window-300x182.jpg" alt="Date Formula inside Formula Editor" width="300" height="182" /></a></p>
<p>Click the <strong>OK </strong>button to save the New_Week_Ending formula. I have just created a function which will convert the Week_Ending (string) field into a New_Week_Ending (date) field so that the X-Y Chart TimeSeries Collector will now recognise it as a date.</p>
<h5><strong><strong>Dynamic Chart Titles.</strong></strong></h5>
<p>Each chart needs to have a dynamic title which will output the campaign and the measure which is represented i.e. 1 &#8211; New Revenue ($). As I have two charts for each campaign I will need to create two functions: one for the New Revenue chart and one for the Loss Revenue chart.</p>
<p>Following the steps outlined above to create two new functions (with the names sNewChart and sLossChart) using the <strong>Open Formula</strong> type and specify the formulas to be:</p>

<div class="wp_syntax"><div class="code"><pre class="properties" style="font-family:monospace;"><span style="color: #808080; font-style: italic;"># New Revenue Charts (sNewChart)</span>
<span style="color: #000000;">=</span><span style="">&#91;</span>Campaign<span style="">&#93;</span> &amp; <span style="color: #933;">&quot; - New Revenue ($)&quot;</span>
<span style="color: #808080; font-style: italic;"># Loss Revenue Charts (sLossChart)</span>
<span style="color: #000000;">=</span><span style="">&#91;</span>Campaign<span style="">&#93;</span> &amp; <span style="color: #933;">&quot; - Loss Revenue ($)&quot;</span></pre></div></div>

<p>I have now created three functions:</p>
<p><img class="alignnone size-full wp-image-1183" title="Three New Functions" src="http://www.prashantraju.com/wp-content/uploads/2010/04/three_new_func.jpg" alt="Three New Functions" width="314" height="210" /></p>
<h4><strong>Step 2. Add the Group Header.</strong></h4>
<p>To add the Campaign as the Group Header drag and drop the <strong>Campaign</strong> field from the <strong>Data </strong>tab onto the <strong>Group Header</strong> area and apply some formatting:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/04/Group_Header_Campaign.jpg"><img class="alignnone size-medium wp-image-1176" title="Group Header with Campaign " src="http://www.prashantraju.com/wp-content/uploads/2010/04/Group_Header_Campaign-300x206.jpg" alt="Group Header with Campaign " width="300" height="206" /></a></p>
<h4><strong><strong>Step 3. Add the Charts.</strong></strong></h4>
<p>Each chart needed to look similar to this mockup (I have already created the Chart Title and New_Week_Ending functions):</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/04/chart_structure1.jpg"><img class="alignnone size-full wp-image-1182" title="Chart Structure" src="http://www.prashantraju.com/wp-content/uploads/2010/04/chart_structure1.jpg" alt="Chart Structure" width="383" height="300" /></a></p>
<p>Drag and drop a chart object <a href="http://www.prashantraju.com/wp-content/uploads/2010/04/chart_icon.jpg"><img title="Chart Icon" src="http://www.prashantraju.com/wp-content/uploads/2010/04/chart_icon.jpg" alt="Chart Icon" width="22" height="18" /></a> from the panel located on the left hand side onto the <strong>Details Header</strong> section and double click the object to open up the<strong> Edit Chart</strong> (properties) window . To create a<strong> X-Y Chart </strong>which uses a <strong>TimeSeries Collector</strong> make sure you <strong>Edit Chart</strong> (properties) window looks like this:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/04/Edit_Chart_Properties.jpg"><img class="alignnone size-medium wp-image-1181" title="Edit Chart Properties" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Edit_Chart_Properties-300x155.jpg" alt="Edit Chart Properties" width="300" height="155" /></a></p>
<p>After setting up all the options the <strong>Edit Chart</strong> (properties) window now look like this (for the New Revenue measure):</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/04/Chart_Prop_Setup.jpg"><img class="alignnone size-medium wp-image-1185" title="Chart Properties for New Revenue Measure" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Chart_Prop_Setup-300x207.jpg" alt="Chart Properties for New Revenue Measure" width="300" height="207" /></a></p>
<ul>
<li><strong>Title</strong>
<ul>
<li><strong>chart-title-field:</strong> Field or function which is the chart title i.e. sNewChart or sLossChart</li>
</ul>
</li>
<li><strong>Primary DataSource</strong>
<ul>
<li><strong>Common<br />
</strong></p>
<ul>
<li><strong>category-time-option</strong>: Value of the x-axis, this must match the amount of series you have in the value-column option i.e. New_Week_Ending (twice)</li>
<li><strong>time-period-type</strong>: Type of period the above field is i.e. Week and New_Week_Ending is an increment of weeks</li>
<li><strong>value-column</strong>: Field(s) which contain the y-axis, you can specify more than one as there can be multiple series i.e. New_09 and New_10 or Loss_09 and Loss_10</li>
</ul>
</li>
<li><strong>Series</strong>
<ul>
<li><strong>series-by-value:</strong> Name of the each series specified for the above option i.e. 2009 and 2010</li>
</ul>
</li>
<li><strong>Group</strong>
<ul>
<li><strong>reset-group:</strong> Reset the charts after a specific group(s) i.e. Campaign</li>
</ul>
</li>
</ul>
</li>
</ul>
<p>There was alot of extra formatting on the charts so be sure to check out the available .PRPT file if you interested in what they look like.</p>
<p>After I created the chart for New Revenue I just copied and pasted the chart object and made changes to the properties to create the Loss Revenue chart:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/04/Loss_revenue_chart_prop.jpg"><img class="alignnone size-medium wp-image-1188" title="Loss Revenue Chart Properties" src="http://www.prashantraju.com/wp-content/uploads/2010/04/Loss_revenue_chart_prop-300x207.jpg" alt="Loss Revenue Chart Properties" width="300" height="207" /></a></p>
<p>The final report structure looks like this:</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/04/report_structure_complete.jpg"><img class="alignnone size-medium wp-image-1189" title="Report Structure Complete" src="http://www.prashantraju.com/wp-content/uploads/2010/04/report_structure_complete-300x182.jpg" alt="Report Structure Complete" width="300" height="182" /></a></p>
<p class="success">There are a lot of options in the charting library of PRD so I suggest you pick up Will Gorman&#8217;s book <a href="http://www.amazon.com/gp/product/1847193196/ref=oss_product" target="_blank">Pentaho Reporting 3.5 for Java Developers</a> which has a couple of chapters which cover the charting library in detail.</p>
<h4><strong><strong><strong><strong>Step 4. Add the Page Break.</strong></strong></strong></strong></h4>
<p>The last step was to add a page break after each Campaign group. To do this click on the <strong>Details Body</strong> item under the <strong>Structure </strong>tab and check the <strong>pagebreak-after </strong>option:</p>
<p><img class="alignnone size-full wp-image-1191" title="Page Break" src="http://www.prashantraju.com/wp-content/uploads/2010/04/page_break.jpg" alt="Page Break" width="314" height="210" /></p>
<h3>Output.</h3>
<p>After previewing the report the final output as a PDF looks like this (you can download the actual PDF file below):</p>
<p><a href="http://www.prashantraju.com/wp-content/uploads/2010/04/preview.jpg"><img class="alignnone size-medium wp-image-1194" title="Preview" src="http://www.prashantraju.com/wp-content/uploads/2010/04/preview-300x241.jpg" alt="Preview" width="300" height="241" /></a></p>
<h3>Downloads.</h3>
<table>
<thead>
<tr>
<th>Filename</th>
<th>Type</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="https://docs.google.com/leaf?id=0B9Jmocc0fj_EM2QzYTc5ZWYtYTIwMC00Mjk3LTkzNTYtZmVlMjZjNzkxNDUx&amp;hl=en" target="_blank">ExcelDataSource</a></td>
<td>PRPT</td>
<td>Released 8/04/2010</td>
</tr>
<tr>
<td><a href="https://docs.google.com/fileview?id=0B9Jmocc0fj_EODdmMmEyMzItZWEwNS00MzgxLWI4M2QtN2Y5NmQwYWZhZTlh&amp;hl=en" target="_blank">ExcelDataSourceSampleData</a></td>
<td>XLS</td>
<td>Released 8/04/2010</td>
</tr>
<tr>
<td><a href="https://docs.google.com/fileview?id=0B9Jmocc0fj_EYjUzYjZkZWYtNTVjOS00OGU5LWE1ZjYtNjJkOTkyNmVkODYw&amp;hl=en" target="_blank">ExcelDataSourcePreview</a></td>
<td>PDF</td>
<td>Released 8/04/2010</td>
</tr>
</tbody>
</table>
<h3>Final Notes.</h3>
<p>This post is very detailed as it covers some interesting areas but as this was an ad hoc request it took me under 5 minutes to whip together this report and have it in the user&#8217;s inbox. Do you have any examples of how you handled ad hoc requests with PRD? If so, leave a comment or send me an <a href="mailto:prashant.g.raju@gmail.com">email</a>.</p>
<p>One user converted <em>n</em> to go! Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prashantraju.com/2010/04/pentaho-report-designer-and-excel-data-sources/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Free Tools to Create Sparklines.</title>
		<link>http://www.prashantraju.com/2010/02/free-tools-to-create-sparklines/</link>
		<comments>http://www.prashantraju.com/2010/02/free-tools-to-create-sparklines/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 13:17:15 +0000</pubDate>
		<dc:creator>Prashant Raju</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Pentaho]]></category>
		<category><![CDATA[Visualisation]]></category>

		<guid isPermaLink="false">http://www.prashantraju.com/?p=856</guid>
		<description><![CDATA[Sparklines are an invention by Edward Tufte and are a great way to provide a bare-bones and space efficient time-series context for measures (Few, Stephen. 2006. Information Dashboard Design). If you would like to read more up on Sparklines I suggest you get Edward Tuftes book Beautiful Evidence – there is a whole chapter dedicated [...]]]></description>
			<content:encoded><![CDATA[<p>Sparklines are an invention by <a title="Edward Tufte" href="http://www.edwardtufte.com" target="_blank">Edward Tufte</a> and are a great way to <em>provide a bare-bones and space efficient time-series context for measures </em>(Few, Stephen. 2006. <a title="Information Dashboard Design - Stephen Few" href="http://www.amazon.com/Information-Dashboard-Design-Effective-Communication/dp/0596100167" target="_blank">Information Dashboard Design</a>). If you would like to read more up on Sparklines I suggest you get Edward Tuftes book <a title="Edward Tufte - Beautiful Evidence" href="http://www.edwardtufte.com/tufte/books_be" target="_blank">Beautiful Evidence</a> – there is a whole chapter dedicated to Sparklines.</p>
<p>Below is a list of open source and free tools which support or are dedicated to creating Sparklines or Microcharts.</p>
<p><span id="more-856"></span></p>
<p><span id="more-184"> </span></p>
<h3><a title="Jquery Sparkline" href="http://omnipotent.net/jquery.sparkline/" target="_blank">Jquery Sparkline</a></h3>
<p>This <a href="http://jquery.com/">jQuery</a> plugin generates Sparklines (small inline charts) directly in the browser using data supplied either inline in the HTML, or via javascript.</p>
<p style="padding: 10px 0px 10px 30px; background: #eee;"><strong>Last updated</strong> : 14th of September, 2009<br />
<strong>Requirements</strong> : jQuery 1.2+<br />
<strong>Supported chart types :</strong> Line, Bar, Tristate, Discrete, Bullet,   Pie, Box</p>
<h3><a title="Sparklines for Excel" href="http://sparklines-excel.blogspot.com/" target="_blank">Sparklines for Excel</a></h3>
<p>A set of free User Defined Functions for Excel to create Sparklines. This is probably the most flexible and up to date sparkline implementation for Excel 2003 and 2007.</p>
<p style="padding: 10px 0px 10px 30px; background: #eee;"><strong>Last updated</strong> : 02/04/2010 (Excel 2003) and 01/25/2010 (Excel 2007)<br />
<strong>Requirements</strong> : Excel 2003 and 2007<br />
<strong>Supported chart types :</strong> Line, Area, Bar, Horizon, Vari, Bullet,  Scale, Pie, Stacked, Box Plot, Spread, Stripe</p>
<h3><a title="Pentaho Report Designer" href="http://reporting.pentaho.org/report_designer.php" target="_blank">Pentaho Report Designer</a></h3>
<p>The ability to create Sparklines is now a feature of Pentaho Report Designer 3.5+.</p>
<p style="padding: 10px 0px 10px 30px; background: #eee;"><strong>Last updated</strong> : 27/10/2009<br />
<strong>Requirements</strong> : Pentaho Report Designer 3.5+<br />
<strong>Supported chart types :</strong> Line, Bar</p>
<h3><a title="Google Visulization API - Sparklines" href="http://code.google.com/apis/visualization/documentation/gallery/imagesparkline.html" target="_blank">Google Visulization API</a></h3>
<p>Single or multiple sparklines that are rendered with images using the <a href="http://code.google.com/apis/chart">Google Charts API</a>. The images are contained in a HTML table.</p>
<blockquote><p>The Google Chart API is an extremely simple tool that lets you easily create a chart from some data and embed it in a webpage. You embed the data and formatting parameters in an HTTP request, and Google returns a PNG image of the chart. Many types of chart are supported, and by making the request into an image tag you can simply include the chart in a webpage.</p></blockquote>
<p style="padding: 10px 0px 10px 30px; background: #eee;"><strong>Last updated</strong> : Unknown<br />
<strong>Requirements</strong> : Flash<br />
<strong>Supported chart types :</strong> Line</p>
<h3><a title="Sparkline PHP Graphing Library" href="http://www.sparkline.org" target="_blank">Sparkline PHP Graphing Library</a></h3>
<p>A PHP based graphing library to create Sparklines.</p>
<p style="padding: 10px 0px 10px 30px; background: #eee;"><strong>Last updated</strong> : 10th of November, 2007<br />
<strong>Requirements</strong> : PHP 4.0.6+, GD 2.0 built as a PHP module<br />
<strong>Supported chart types </strong>: Line, Bar</p>
<h3><a title="Sparklines for Java" href="http://www.representqueens.com/spark/" target="_blank">Sparklines for Java</a></h3>
<p>Sparklines for java is a package that contains a Servlet that can be added to a web project to create sparklines based on request parameters. It also includes a taglib for easily formatting the required parameters. There’s also an API to directly create a <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/awt/image/BufferedImage.html">BufferedImage</a> in any Java code.</p>
<p style="padding: 10px 0px 10px 30px; background: #eee;"><strong>Last updated</strong> : 3/11/2007<br />
<strong>Requirements</strong> : Java<br />
<strong>Supported chart types :</strong> Line, Bar</p>
<h3><a title="Sparklines (Ruby)" href="http://nubyonrails.com/pages/sparklines" target="_blank">Sparklines (Ruby)</a></h3>
<p>A library for generating small sparkline graphs from Ruby. Use it in desktop apps or with Ruby on Rails.</p>
<p style="padding: 10px 0px 10px 30px; background: #eee;"><strong>Last updated</strong> : 17/02/2009<br />
<strong>Requirements</strong> : Ruby<br />
<strong>Supported chart types :</strong> Line, Bar, Bullet, Pie, Discrete, Area</p>
<h3><a title="NanoCharts" href="http://www.bloggpro.com/nanocharts-enables-excel-in-cell-charts-with-sparklines-concept/" target="_blank">NanoCharts</a></h3>
<p>NanoCharts is an Excel 2003 supported add-in where users can add in Sparklines into cells.</p>
<p style="padding: 10px 0px 10px 30px; background: #eee;"><strong>Last updated</strong> : 08/10/2008<br />
<strong>Requirements</strong> : Excel 2003<br />
<strong>Supported chart types :</strong> Line, Bar, Dot</p>
<h3><a title="Sparklines for Excel Add-in - TinyGraphs" href="http://www.spreadsheetml.com/products.html" target="_blank">Sparklines Excel Add-in – TinyGraphs</a></h3>
<p>TinyGraphs is an open source add-in for Excel that creates sparklines, mini column graphs, and area graphs from a row of data. It generates beautiful tiny graphics that are as small as a cell and is useful for visualizing large quantities of data, such as stock prices and exchange rates.</p>
<p style="padding: 10px 0px 10px 30px; background: #eee;"><strong>Last updated</strong> : Unknown<br />
<strong>Requirements</strong> : Excel 2000, 2003 and 2007<br />
<strong>Supported chart types :</strong> Line, Bar, Area</p>
<h3><a title="Tufte Sparklines Photoshop Script" href="http://www.lodgephoto.com/blog/tufte-sparklines-photoshop-script/18/" target="_blank">Tufte Sparklines Photoshop Script</a></h3>
<p>The Tufte Sparklines Photoshop script automates the production of sparklines. It works by reading a data series from a text file and plotting a sparkline image as a Photoshop path, and then stroking it with the pencil tool. This produces a bitmap image which can then be cut-and-pasted into the target document.</p>
<p style="padding: 10px 0px 10px 30px; background: #eee;"><strong>Last updated</strong> : 24/02/2008<br />
<strong>Requirements</strong> : <a title="Adobe" href="http://www.adobe.com/" target="_blank">Adobe Photoshop CS,  CS2, CS3</a><br />
<strong>Supported chart types :</strong> Line</p>
<h3><a title="sparklines.js" href="http://willarson.com/code/sparklines/sparklines.html">sparklines.js</a></h3>
<p>parklines.js is a simple javascript utility for building sparklines. It has support for displaying lines at percentage points and at fixed values in terms of your data set.</p>
<p style="padding: 10px 0px 10px 30px; background: #eee;"><strong>Last updated</strong> : Unknown<br />
<strong>Requirements</strong> : <a title="Processing.js" href="http://processingjs.org/download" target="_blank">Processing.js  0.4</a><br />
<strong>Supported chart types :</strong> Line</p>
<p>Know of anymore? Let me know and I’ll add them to this list.</p>
<p>Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prashantraju.com/2010/02/free-tools-to-create-sparklines/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VisualPlace – A Victorian Government Map Mashup.</title>
		<link>http://www.prashantraju.com/2010/02/visualplace-a-victorian-government-map-mashup/</link>
		<comments>http://www.prashantraju.com/2010/02/visualplace-a-victorian-government-map-mashup/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 13:09:18 +0000</pubDate>
		<dc:creator>Prashant Raju</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Visualisation]]></category>

		<guid isPermaLink="false">http://www.prashantraju.com/?p=849</guid>
		<description><![CDATA[In December 2009 the Victorian Government released a “proof of concept” mashup with demographic and government services data known as VisualPlace. VisualPlace is a six month Proof of Concept testing innovative ways of capturing, exploring and visualising government information and services through maps. VisualPlace brings together information from a wide variety of sources from service [...]]]></description>
			<content:encoded><![CDATA[<p>In December 2009 the Victorian Government released a “proof of concept” mashup with demographic and government services data known as <a title="VisualPlace" href="http://www.vic.gov.au/visualplace/" target="_blank">VisualPlace</a>.</p>
<blockquote><p>
VisualPlace is a <strong>six month</strong> Proof of Concept testing innovative ways of capturing, exploring and visualising government information and services through maps. VisualPlace brings together information from a wide variety of sources from service locations to demographic data to allow you to create custom maps.
</p></blockquote>
<p><span id="more-849"></span></p>
<p>VisualPlace uses a <a title="Silverlight" href="http://www.microsoft.com/silverlight" target="_blank">Silverlight</a> powered application known as <a title="IDV Solutions - VisualFusion" href="http://www.idvsolutions.com/products_what_is_visual_fusion_suite.aspx" target="_blank">VisualFusion</a> (developed by <a title="IDV Solutions" href="http://www.idvsolutions.com/" target="_blank">IDV Solutions</a>) and can map data from 2006 National Census, Government Service locations and even Tram and Train station and lines. For example here is a mashup of “People who travelled to work by Public Transport as a proportion of All Employed People” (shaded areas where yellow are high percentages and blue are low percentage) against “Train Stations” (green markers):</p>
<p style="text-align: center;"><a href="http://www.prashantraju.com/wp-content/uploads/2010/02/VisualPlace.jpg" target="_blank"><img class="size-medium wp-image-871 aligncenter" title="VisualPlace Example" src="http://www.prashantraju.com/wp-content/uploads/2010/02/VisualPlace-300x187.jpg" alt="VisualPlace example" width="300" height="187" /></a></p>
<p>The only thing that annoys me is that if the Governement Services related data is available why not make it easily accessible to the public via an API or <a title="http://data.australia.gov.au/" href="http://data.australia.gov.au/" target="_blank">data.government.gov.au</a>. If you would like to gain access to Demographic (Census) data visit the Australian Bureau of Statistics <a title="Australian Bereau of Statistics" href="http://www.abs.gov.au/" target="_blank">website</a>.</p>
<p>Be sure to check it out quick as it will be taken down by July 2010.</p>
<p>Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prashantraju.com/2010/02/visualplace-a-victorian-government-map-mashup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
