Icon

Charts and Spreadsheets

<p><strong>Charts and Spreadsheets</strong></p><p>This workflow shows how to create charts from spreadsheet data and add them to a new sheet.</p><p>The aim is to preprocess the data to create charts (a Pie Chart and a Bar Chart). We also want to save the created charts as images<br>in a new sheet of the existing spreadsheet. We use the athlete event result data from the Summer Olympic Games of 1896-1912 for <strong>Greece</strong>, <strong>Great Britain</strong> and the <strong>USA</strong>.</p><p>💡 <em>To view each node's configuration, select the node and see the configuration pane on the right side of the workflow editor.</em></p><p>Let's walk through the different nodes involved in this operation:</p><p><strong>Excel Reader nodes:</strong></p><ul><li><p>Since the folder with the data is already included when you download the workflow, in the "File and Sheet" tab, we choose to "Read from" the "Current workflow data area" and select the dataset.</p></li><li><p>In the "Data Area" tab, we select read the "Whole sheet". This configuration allows us to have the sheet as it is. The intent is to respect its original structure.</p></li></ul><p><strong>Column Filter node:</strong></p><ul><li><p>We clean the input tables from unnecessary columns, which we don't need.</p></li></ul><p><strong>Value Lookup node:</strong></p><ul><li><p>We add the actual country names ("country" column) to the athlete results data based on the NOC codes ("country_noc" column) and remove the "country_noc" column.</p></li><li><p>We set "country_noc" both as lookup column and key column.</p></li><li><p>Under "Output", we define to remove the lookup column ("country_noc") from the output table and move the "country_noc" column of the dictionary in the "Exclude" panel.</p></li></ul><p><strong>Duplicate Row Filter node:</strong></p><ul><li><p>Some athletes took part in multiple disciplines, however, we only want to consider each athlete once per Olympics edition.</p></li><li><p>We remove duplicate rows by including "athelte_id" and "edition" to identify the duplicates.</p></li></ul><p><strong>Table Splitter node:</strong></p><ul><li><p>The dataset contains results for Greece, Great Britain, and the USA. We split the table so that all results for Greece" are available at the top part, the results for Great Britain and USA at the bottom part.</p></li><li><p>We choose the "country" column as the lookup column, the matching criteria as "Equals", and the pattern as "Greece". We split the rows by the last match and include the matching row in the top table.</p></li></ul><p><strong>Row Filter + Row Aggregator nodes:</strong></p><ul><li><p>In the top branch, we continue processing the data for Greece.</p></li><li><p>We first filter the Greek data to the 1896 Olympics edition.</p></li><li><p>Second, we calculate the number of athletes participated in each discipline. Set "sport" as category column and select "Occurrence count" as aggregation method.</p></li></ul><p><strong>Pivot node:</strong></p><ul><li><p>In the bottom branch, we create a Pivot table that sums up the total number of athletes by country (GBR and USA) and Olympics edition.</p></li></ul><p><strong>Pie Chart node:</strong></p><ul><li><p>We set the category dimension to "sport" and the frequency dimension to "OCCURENCE_COUNT" .</p></li><li><p>Since we want to use the image later in the spreadsheet, we also enable image generation by ticking the "Generate image" checkbox.</p></li></ul><p><strong>Bar Chart node:</strong></p><ul><li><p>We set the category column to "edition" and select as frequency dimensions the columns "Great Britain" and "USA". In the "Plot" &gt; "Arrange bars" section we select "Stacked" to create a stacked bar chart.</p></li><li><p>Like with the Pie Chart, we enable image generation by ticking the "Generate image" checkbox to use the image later in the spreadsheet.</p></li></ul><p><strong>Image to Table + Column Appender nodes:</strong></p><ul><li><p>First, we convert each image into a table using the Image to Table node.</p></li><li><p>Second, we combine both tables containing the images using the Column Appender node.</p></li></ul><p><strong>Excel Writer node:</strong></p><ul><li><p>We write the images to a new sheet called "Sheet_2" in the existing file "Olympic_Athlete_Event_Results.xlsx".</p></li><li><p>After executing the node, the file will open automatically.</p></li></ul><p>As you can see from the output, we now have the images in "Sheet_2".</p>

Charts and Spreadsheets


This workflow shows how to create charts (Pie Chart and Bar Chart) from spreadsheet data and how to export them for further analysis or reporting. It involves data cleaning and preparation, performs data aggregation, and lastly creates two charts and appends them to a new sheet in an Excel file.

In this example, we access two Excel files:

  1. The athlete event results of the 1896-1912 Summer Olympic Games for Greece, Great Britain, and the USA; and

  2. The country code dictionary of the NOCs.

We proceed to filter the data to include only specific columns ("edition", "country_noc", "sport", "athlete_id"), add the country names to the event results (via a VLOOKUP function), and remove duplicate entries. We then split the data based on "country" and process the two subsets differently:

  1. In the top branch, we filter the data for Greece to the 1896 Olympic Games and calculate the number of athletes participated in each sport;

  2. In the bottom branch, we aggregate the data for Great Britain and the USA to derive the total number of athletes for each country and Olympics edition.

Lastly, we visualize the data in a Pie Chart and Bar Chart respectively and write the visualizations to a new sheet in the existing Excel file.

For a detailed overview of each node in this workflow, refer to the workflow description in the Info panel.


💡 To view each node's configuration, select the node and see the configuration pane on the right side of the workflow editor.

Data access

  1. Athlete event results data of Summer Olympic Games (1896-1912) for Greece, Great Britain, and the USA.

  2. Data containing country code dictionary of NOCs.

Data manipulation

  • Keep only relevant columns

  • Append country name from lookup table to athlete event results dataset

  • Remove duplicate athletes

Data aggregation

  • Top branch: Data for Greece. Filter data to 1896 Olympics game and calculate number of athletes per sport

  • Bottom branch: Generate Pivot table, calculating total number of athletes by countries (GBR and USA) and Olympics edition

Data visualization

  • Top branch: Pie Chart showing athlete distribution of Greece in the 1896 Summer Olympics

  • Bottom branch: Bar Chart displaying number of athletes participated in each Olympics edition comparing Great Britain vs. USA

Data export

  • Append created images to new sheet of existing athlete event results dataset

Read athlete event results
Excel Reader
Remove unnecessary columns
Column Filter
Read country codedictionary of NOCs
Excel Reader
Calculate total number of athletesby country and Olympics edition
Pivot
Write the Bar Chart into a table cell
Image to Table
Remove duplicate athletes
Duplicate Row Filter
Add country toathlete event resultsbased on NOC
Value Lookup
Athletes participated forGBR and USA in each Olympics edition
Bar Chart
Calculate number of Greekathletes for each sport
Row Aggregator
Athlete distribution in1896 Summer Olympics
Pie Chart
Append the image cells
Column Appender
Top: Greece Bottom: Great Britain & and USA
Table Splitter
Append new sheet to datasetwhich contains the created images
Excel Writer
Get data for1896 Olympics
Row Filter
Write Pie Chart into table cell
Image to Table

Nodes

Extensions

Links