User Guide Stat Planet

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 72

DownloadUser Guide Stat Planet
Open PDF In BrowserView PDF
STATPLANET
&

STATTrends

USER GUIDE

v 3.26 - © 2015 StatSilk
www.statsilk.com

Creative Commons BY-SA 3.0
1

TABLE OF CONTENTS
1.

About ............................................................................................................................. 5

2.

System requirements ...................................................................................................... 6

3.

Features and options ...................................................................................................... 7

4.

3.1.

Thematic map................................................................................................................... 7

3.2.

Indicators panel ................................................................................................................ 9

3.3.

Graph panel .................................................................................................................... 10

3.4.

Options panel ................................................................................................................. 12

3.5.

Table panel ..................................................................................................................... 14

3.6.

Selection panel ............................................................................................................... 14

3.7.

Story panel ..................................................................................................................... 15

3.8.

Time slider ...................................................................................................................... 16

3.9.

Interface options ............................................................................................................ 16

Importing or creating maps ........................................................................................... 18
4.1. Importing ESRI Shapefile maps .......................................................................................... 18
4.2. Instructions for manually setting up shapefiles ................................................................. 20
4.3. Create a map using Adobe Flash ........................................................................................ 23

5.

Importing or adding data .............................................................................................. 24
5.1. Basic steps for adding data ................................................................................................ 24
5.2. The StatPlanet Data Editor ................................................................................................. 26
5.3. Defining variables (StatTrends only) .................................................................................. 27
5.4. Importing data automatically ............................................................................................. 27

2

5.5. Importing data manually .................................................................................................... 29
5.6. Data file structure .............................................................................................................. 30
5.7. Settings file structure ......................................................................................................... 33
5.8. Loading data from a database............................................................................................ 34
5.9. Troubleshooting ................................................................................................................. 36
6.

Customization .............................................................................................................. 40
6.1. Global customizations and startup settings ....................................................................... 40
6.2. Map customization ............................................................................................................. 42
Add custom ‘zoom-to’ map regions or groups ...................................................................... 42
Add or import map points (cities, places, aggregations, etc.) ............................................... 44
Add or position map text labels ............................................................................................ 46
Map legend customization .................................................................................................... 47
Map symbols / icons and overlays ........................................................................................ 50
Map area popup text and links .............................................................................................. 52
Other map settings and options ............................................................................................ 53
6.3. Customizations at category & indicator level .................................................................... 54
Data source ............................................................................................................................ 55
Indicator/category descriptions and story panel .................................................................. 55
Indicator unit ......................................................................................................................... 57
Graph options ........................................................................................................................ 58
Using multiple data files ........................................................................................................ 59
General options ..................................................................................................................... 60
Map area popup text or clickable links ................................................................................. 62
Indicator ID (Composite Indicator module) ........................................................................... 63
3

6.4. Data editing without Excel ................................................................................................. 64
6.5. Language and translation ................................................................................................... 64
6.6. Right-click menu options .................................................................................................... 66
7.

Publishing ..................................................................................................................... 68
7.1. Web publishing options ..................................................................................................... 68
7.2. Reducing the download size of your web application ....................................................... 69
7.3. Creating an index of indicators in StatPlanet / StatTrends ................................................ 70
7.4. Creating custom links to indicators .................................................................................... 71

4

1. ABOUT
StatPlanet and StatTrends are powerful interactive data visualization tools, used by many
different kinds of organizations including schools, universities, government agencies such as
NASA, UN organizations such as UNESCO and UNDP, and Global 500 companies such as
Samsung and Siemens. StatPlanet can also be used as education software for children (ages 9
and up) to learn about the world through interactive maps.
StatPlanet and StatTrends enable also non-technical users to explore statistics through its userfriendly interface. Moreover, the software automates the normally complex processes of
converting raw data into interactive maps and visualizations. It requires only a basic familiarity
with spreadsheet software to create interactive maps and visualizations with relative ease. You
can import your own data and through StatPlanet can import maps or use the embedded USA
or world maps.
StatPlanet comes in different versions to cater to different needs. All versions of StatPlanet are
free except for StatPlanet Plus, which has more advanced features such as support for large
datasets. All versions of StatPlanet can be used both as a stand-alone application for offline use,
and as a web-based application which can be published online. The desktop version of
StatPlanet Plus is free for non-commercial purposes. Similarly, StatTrends Plus is a non-free
advanced version of StatTrends, and the desktop version is free for non-commercial purposes.
The aim of the software is to promote evidence-based decision making by improving and
facilitating the communication and interpretation of information, by providing: (i) attractive
interactive visualizations which facilitate the interpretation of information, (ii) a user friendly
interface that is accessible also to non-technical users, (iii) automated data visualization
(including the processes of merging and synchronizing data from different sources), and (iv) an
easy to disseminate software system which can enable anyone to explore and create data
visualizations - regardless of technical skills, availability of Internet connectivity, and computer
hardware or software.
StatPlanet and StatTrends are produced by StatSilk, an Australian company founded by Frank
van Cappelle. From 2008 to 2010, the development of a tailored version of StatPlanet was
undertaken as part of the SACMEQ research programme at the UNESCO International Institute
for Educational Planning (IIEP), Paris, France.
For more information, please see www.statsilk.com

5

2. SYSTEM REQUIREMENTS
StatPlanet and StatTrends are designed to be usable in as many places as possible regardless of
the available computers and infrastructure. It can be used online, through an intranet as well as
offline – making it usable in places where there is no Internet connectivity. It is easy to
disseminate due to its very small size – small enough to fit on any USB flash drive (USB stick) or
to be sent as an e-mail attachment. The software does not require installation, so even those
without administrator rights on their PC can run both the offline and online versions, and it runs
directly off a CD or USB flash drive.
The software runs in the Adobe Flash Player, which has the following minimum system
requirements1. The system requirements are low, and any computer purchased within the past
8 years should be able to run the software.
Windows®

Macintosh

Linux®

Intel® Pentium® II 450MHz, AMD
Athlon™ 600MHz or faster processor (or
equivalent)

PowerPC® G3 500MHz
or faster processor

Modern processor
(800MHz or faster)

Intel Core™ Duo
1.33GHz or faster
processor
128MB of RAM

128MB of RAM

512MB of RAM, 128MB
of graphics memory

128MB of VRAM*
*Recommended for GPU hardware acceleration–dependent features. Flash Player will use
software mode for systems that do not meet the system requirements.

1

http://www.adobe.com/products/flashplayer/systemreqs/

6

3. FEATURES AND OPTIONS

3.1. Thematic map
Choropleth map
Shade map areas according to the value represented by each area (for example, life
expectancy). The map legend shows which map colors are associated with each data range (for
example, higher values are typically shaded in increasingly dark colors). The map and map
legend colors, ranges and values can be customized. Besides quantitative maps, qualitative or
descriptive maps can also be displayed which convey non-numerical information. See also the
example: map of language distribution.

Proportional symbol map
A proportional symbol map scales symbols (usually circles) according to the indicator being
mapped. Each symbol can represent a country or other map area. Proportional symbol maps
are most suitable when there is a large range of values and measurements are continuous
7

(rather than at interval level), for example population numbers.
In StatPlanet the symbol map is overlaid on top of the choropleth map (see above). This means
that two data sets can be shown on the same map – one for the choropleth map and one for
the symbol map.
To show the symbol map, click the symbol icon in the bottom-left corner of the screen. If you
have bookmarked an indicator, the symbol map represents the data for the bookmarked
indicator, whereas the choropleth map represents the data for the selected indicator. (If the
bookmarked indicator is currently selected, both the symbol map and the choropleth map
represent the bookmarked indicator).

Select country or other map area using the map


Mouse over a country or map area: Moving the mouse over a country or other map
area brings up a popup containing information about that particular country or map
area for the selected indicator (as well as the bookmarked indicator, if there is one).



Click on a country or map area: You can select a country or other map area by clicking
on it in the map. See also the Selection panel for additional selection options.

Map legend
Map colors: Clicking on any of the colors in the legend will bring up a color selection panel. In
this panel you can change both the colors (either Sequential or Diverging color schemes), as
well as the number of color classes (between 3 and 9). The color schemes are from the Color
Brewer website (http://colorbrewer2.org/), which is an excellent resource for more
information on selecting map colors.

Data range: To adjust the data range of the map legend, click on the top or bottom value. Use
the popup to increment or decrement the value, or enter a whole new value. The
8

intermediate values will be adjusted automatically.

Creating or importing maps
You can use StatPlanet to create your own maps, using the included map template (map.fla).
This requires the Adobe Flash software. For importing shapefile maps, please see the section
“Importing ESRI Shapefile maps”.

Save/export (StatPlanet Plus / StatTrends Plus only)
You can find the save/export button in the bottom-left corner of the screen. This button
enables you to save the current map or graph as an image, or download the data as a CSV file.
To change the image type, size or quality, use the Options panel. This feature is only available
in the web version of StatPlanet Plus.

Map zoom
The map zoom controls are normally hidden from view. Move the mouse towards the bottomright of the screen to make them appear.





Zoom: You can zoom in and out of the map using the 'zoom in' and 'zoom out' buttons,
or by dragging the zoom slider up or down. If your mouse has a scroll wheel, you can
also use this to zoom in and out.
Moving the map: click and drag the map with the mouse to move it to a new position.
Restore map position: the button shown on the left restores the map to the original
coordinates for the selected region.

3.2. Indicators panel
Select category (optional)
The category selection drop-down is hidden by default2. Use the drop-down menu in the
top of the Indicators panel to select a new category. When switching categories, StatPlanet
/ StatTrends will remember which year was selected and check if data exists for this year in
the new category. If there is no data for this year, it will select the year closest to the
previously selected year for which data is available in the new category.

2

The category dropdown can be added through the StatPlanet Data Editor sheet ‘settings’, variable ‘V-IND-O’.

9

Indicator bars (optional)
Indicator bars are hidden by default3. The bars are scaled in proportion to the maximum
value of that particular indicator for all countries in the selected region. For example, if the
value for country X is 20 and the maximum value for all countries is 100, the bar will be
scaled at 20%.

Bookmark indicator (optional)
The bookmark indicator option is hidden by default4. Click the 'star' button in the Indicators
panel to bookmark the selected indicator. The bookmarked indicator will stay even when
you switch to another category. This allows you to (i) create scatter plot graphs, (ii)
compare the bookmarked indicator with indicators from other categories, and (iii) compare
two indicators through the choropleth map (representing the selected indicator) and the
proportional symbol map (representing the bookmarked indicator).

Indicator definitions
If a definition exists for an indicator, the definition will appear in a popup when moving the
mouse over the indicator. The definition only shows for the indicator which is selected or
bookmarked.

3.3. Graph panel
In StatPlanet, click the 'graph' button in the bottom-left corner of the screen to open or close
the Graph panel.

Bar chart / Column chart
The bar chart and column chart buttons are located in the top left corner of the Graph panel.
Use the "sort" button to sort the graph from lowest to highest, highest to lowest, highest to
lowest starting in the middle, or alphabetically.

Time series
The time series button is located in the top left corner of the Graph panel. Use the Selection
panel to add countries, map areas or other variables (depending on your data set) to the time
series graph. Click on it again if you wish to to remove it. Countries or other map areas can also
3

The indicator bars can be added through the StatPlanet Data Editor sheet ‘settings’, variable ‘V-IND-B’.

4

The bookmark indicator icon can be added through the StatPlanet Data Editor sheet ‘settings’, variable ‘V-IND-O’.

10

be selected directly from the map (See also: Selection panel).
Use the "sort" button to sort the time series labels.

Vertical bubble chart
This button enables the display of country data as with the column chart, but with the values
on the y-axis marked as bubbles rather than the top of a column. This display type has the
advantage that it allows a second indicator to be visualized in the form of the bubble size. The
bubble size follows the formula: value / maximum value.

Scatter plot (bubble chart)
The scatter plot button is located in the top left corner of the Graph panel. Clicking on the
button will automatically use the selected indicator as the x-axis variable. You need to select a
second indicator as the y-axis variable.
The x-axis and y-axis variables can be selected in the Graph panel (see below), or in the
Indicators panel (see Bookmark indicator above).
Press the ‘play’ button to see an animation of changes over time, with each bubble (point)
moving to the corresponding x and y positions (depending on whether data is available for
each time interval). If ‘Show trails’ is selected (next to the play button), each bubble will leave
a trail to mark previous positions over time.
Clicking on a scatter plot bubble will display the associated label. They can also be repositioned
through ‘drag and drop’, by right-clicking and selecting 'move text labels or map points'.
A third indicator can be visualized through the bubble size parameter. This indicator can be
selected through the drop-down above the scatter plot. The bubble size follows the formula:
value / maximum value.
The scatter plot has an 'options' icon
which can be used to show or hide the trendline.
Move the mouse over the trendline to see the slope and trendline equation.
Graph Multiple Indicators (available as an add-on module)
Display and analyze multiple indicators over time for a particular map area or variable (the
indicators would need to be within the same category). To activate this graph type, click on the
icon shown on the left, and then select a map area. To remove an indicator, click on the
indicator name displayed in the graph. To add it back again, select the indicator from the
indicator panel, or click twice on the icon shown on the left (to reset the graph).
View the demo (in StatWorld)

11

Select x-axis / y-axis indicator
Click on the x-axis or y-axis label, then select an indicator from the drop-down menu.
Use the drop-down menu in the top of the Graph panel to change the scale of the 'bubbles'
according to a selected indicator.

Search (StatPlanet Plus / StatTrends Plus only)
The search function brings up a popup which enables you to filter the list of indicators to find
the one you need. The example below shows the filter “gdp” applied to find all indicators
related to GDP.

Adjust graph size
To change the graph size, move the mouse to the sides or corners of the Graph panel until you
see the cursor change to look like the one shown on the left. Click and hold down the left
mouse button, then drag the panel to the size you want. Release the mouse button once you
have the right size.

Adjust graph scale
The graph scale can be adjusted by clicking on the top or bottom graph values. The value can
then be edited in the popup window.

3.4. Options panel
Click the 'options' button in the bottom-left corner of the screen to open the options panel.

12

Map:


Map colors: map background, map borders, map text color, map text outline color, etc.;



Map text size;



Map symbol size (proportional symbol map symbols);



Map legend - estimate best value distribution: adjust the values so that there is a more
equal distribution of countries for each color class. This will usually result in a map with
a better distribution of colors. If this is switched off, the value range for each color class
will be set at equal intervals based on the highest and lowest value in the data range.



Map legend - show maximum & minimum values



Map legend colors.

See also the section “Map options” below for customizing the map legend within StatPlanet.

Graph/Chart:


Graph colors: background, bar & scatter points, scatter point borders;



Graph text size;



Transparency level of graph area (bars / bubbles);



Size of bubbles (scatter plot graph);



Bullet graph.

General options:




Animation duration;
Decimal places shown;
Adjust the map/graph scale: StatPlanet automatically adjusts the map and graph scale
to suit the data set. However, in some cases you may wish to keep it fixed, for example
if you made some changes to it yourself. You can set (or prevent) the automatic
updating of the map/graph scale on (i) changing indicator, (ii) changing region, (iii)
changing year. The default setting is for StatPlanet to adjust the scale when changing
indicator or region, but not year.

13

Save/export map or graph: (web version only)




Set the image type: PNG or JPEG
Change the image size as % of original
Change the image quality (for JPEG images only)

3.5. Table panel
The Table Panel is hidden from view by default. In StatPlanet Plus, the tables are
multidimensional and can be customized to display the data you are interested in.
Click the ‘Table’ button in the bottom-left corner of the screen to get a data table of the
selected indicator. If an indicator has been bookmarked, the data for both the bookmarked
and selected indicator will be displayed.

Save / Export table (StatPlanet Plus / StatTrends Plus only)
Save the table as a .CSV file, which can be opened by most spreadsheets (such as Excel). You
can find the export button in the bottom-left corner, if export has been enabled. Alternatively,
to copy and paste data into Excel, you can also right-click anywhere in StatPlanet or
StatTrends, and select 'Copy data'.

Copy table
The desktop version of StatPlanet does not allow you to save the data as a file. Instead, you
can copy the entire table into Excel using the 'copy' button, and then 'paste' it in Excel. If you
do not have Excel, you can also do the following: (i) paste the data into a basic text editor such
as Notepad, (ii) save the document as 'data.html', (iii) open the file using your Web Browser.

3.6. Selection panel
Countries, map areas (or in StatTrends – any other defined variables) can be selected in various
ways. An efficient way of finding and selecting a country or map area is through the selection
panel, as explained below. However, a country or map area can also be selected by clicking on it
in the map, in the data table panel, or in the graph panel. In each case it will be highlighted in
all of these StatPlanet components.
Click on a country/map area/variable in the list to select it. Clicking on a selected item will
deselect it. You can press the first one or two letter of an item in the list to quickly jump to that

14

item. For example, if it contains a list of countries, press 'b' to quickly jump to countries starting
with the letter 'b'.
If the Selection panel is hidden, click the 'select' button in the bottom-left corner of the screen
to make it appear.

Select regions
Use the drop-down menu in the top of the indicators panel to select and zoom into a different
region, such as 'Africa' or 'Europe'. It is also possible to select countries to define a custom
region (see Selection panel).

Select button
Press the Select button to reduce the list to your selection. Any items which are not selected
will be removed from view.

Deselect All button
Press the Deselect All button to clear your selection.

Refresh button
The Refresh button appears once you have created a custom region or group of items. It can
be used to return to the original list.

Remove button
To remove items from the list, select those you wish to remove and press the Remove button.

3.7. Story panel
The Story Panel (StatPlanet Plus only) can optionally be used to display ‘stories’ or descriptive
text for each indicator. The text can be formatted using HTML, with support for image
embedding and links to web-pages or documents. For more details, please see the section
“Indicator/category descriptions and story panel”.

15

3.8. Time slider

Use the slider or click on the arrow buttons to change the year. Click on the play button to show
changes over time as an animation, starting from the beginning. The animation speed can be
set in the Options panel.

3.9. Interface options
View panel
Move the mouse over the 'View' button in the bottom-left of the screen to see various
options for showing or hiding map & graph elements, and other StatPlanet components.





Show or hide country or map area names on the map or graph (country names can
be shown in full, in abbreviated form or as ISO3 codes);
Show or hide country or map area statistics on the map;
Show or hide the map popup and its components - bar chart, indicator and statistic;
Show or hide various panels.

Shrink / enlarge
The buttons in the top-left corner of the panel can be used to shrink or enlarge them.
This may be useful for space management when you have several panels open at the
same time, or to focus in on certain areas.

Help / minimize / close
The buttons in the top-right corner of the screen are the help, minimize and close
buttons.

Adjust panel size
Drag and drop the graph panel borders to adjust the size of the top panels.

Full screen
Click on this button in the bottom-left of the screen to either switch to fullscreen
mode, or go back to normal panel mode.

16

Changing category
When switching to another category, StatPlanet/StatTrends will remember which year was
selected and check if data exists for this year in the new category. If there is no data for this
year, it will select the year closest to the previously selected year for which data is available in
the new category.

17

4. IMPORTING OR CREATING MAPS
4.1. Importing ESRI Shapefile maps


Please see http://www.statsilk.com/maps/download-free-shapefile-maps to obtain free
shapefile maps. Importing shapefile maps requires either StatPlanet Plus or StatPlanet
Lite.

1.

In the folder “Shapefile_map_(ESRI)” open the sub-folder 'map'. Copy your map files
here.

2.

Run the file “update_map.bat”. This automates the following procedure which can also
be done manually: (i) remove the included example shapefiles (map of Indonesia), and
(ii) rename your map files (e.g. “mycountry.shp” and “mycountry.dbf”) to “map.shp”
and “map.dbf”
Please note that there are two map folders in “Shapefile_map_(ESRI)” to which you
need to copy your map files:


\map



\web\map (for the web version)

(for the offline version)

3.

Open the StatPlanet_data_editor file. Click on the button 'Setup shapefile' (in the topleft, macros need to be enabled).

4.

Select your “map.dbf” file in the map folder, and follow the instructions. Make sure that
the ‘ID’ column is alphabetical (a-z), numerical (0-9), or alpha-numeric (a combination of
alphabetical and numeric characters such as “reg21”). Special characters such as ē ạ & /
- may cause problems in loading the map. If you do not have a suitable ID column, you
could use software such as Open Office Calc to edit the “map.dbf” file and create/edit
an ID column. Open Office Calc is free software (http://www.openoffice.org/).

5.

Run StatPlanet to see the results with the included sample data.

You can now start importing or inserting data for your map, but first you may wish to modify
the map position and add text labels.

18

Map positioning:
To change the position and size of the map, move the mouse to the bottom-right of the screen
to see the map zoom controls:




Zoom: You can zoom in and out of the map using the 'zoom in' and 'zoom out' buttons,
or by dragging the zoom slider up or down. If your mouse has a scroll wheel, you can
also use this to zoom in and out.
Moving the map: click and drag the map with the mouse to move it to a new position.

Once the map is in the right position, right-click and select 'Copy map coordinates'. In the
StatPlanet Data Editor, go to the sheet 'Map regions', select the cell below 'X'. Then paste the
coordinates here.

Text labels:
1.

To show the text labels for the map, click on ‘Show text labels’ in the StatPlanet Data
Editor (sheet Import, below the Save button).

2.

Click on “Save data” and open StatPlanet to see the results. It is likely that the position
of some or all of the text labels will need some adjusting.

3.

To adjust the position of the text labels, right click anywhere in StatPlanet and select
‘Move text labels or map points’ in the menu. Click on any of the text labels to drag
them to a new position.

4.

Once you have finished moving the text labels, right click and select ‘Copy map text
label coordinates’ in the menu.

5.

In the StatPlanet Data Editor, go to the sheet ‘Settings’. Select the cell next to ‘Text label
coordinates’ (variable ‘TXT-COORD’), and paste the coordinates here. (You may also
wish to modify other settings in this sheet, such as the text font size.)

6.

Click on ‘Save settings’ (or alternatively, ‘Save data’ in the Import data screen). The
coordinates have now been saved for when you next open StatPlanet.

7.

In the sheet ‘Settings’, you can also change additional settings such as the font size of
the text labels.

Finding a map:

19

The StatSilk website maintains an up-to-date list of websites for finding free maps in the
shapefile format. Many country-level shapefile maps can also be downloaded directly from this
web-page.
Shapefile maps are often very large in size and therefore not ideally suited for the web. To
simplify these maps and significantly reduce the file size, please see the StatSilk GIS shapefile
map tools web-page.

4.2. Instructions for manually setting up shapefiles
The following steps can be conducted using any spreadsheet software, so Excel is not required:
1. Copy your map shapefiles as explained above. (Copy and replace the existing map shapefiles
in the folder 'map', i.e. the files 'map.dbf' and 'map.shp' - so you would need to rename your
shapefiles 'map.dbf' and 'map.shp' - any other files such as 'map.shx' are not required by
StatPlanet).
2. Open the ‘map.dbf’ file in the map folder. On Windows PCs, the ‘map.dbf’ file can be opened
using Excel. On a Mac, if the ‘map.dbf’ does not open in Excel, you could use the free NeoOffice
(www.neooffice.org).
Note:


If you are editing the data.csv and settings.csv directly, please follow steps 3a to 5a
below.



If you are using the StatPlanet Data Editor, please follow steps 3b to 5b further below.

3a. In the ‘map.dbf’ file, find the column which uniquely identifies each map area (usually a
code, e.g. AFG for Afghanistan). Copy the header name for this column (from the first row).
Then paste it into the ‘settings.csv’ file in the cell next to the variable name 'DBF-ID'. Please
note: This ID column should contain unique values only, and characters need to be
alphanumeric (i.e. cannot contain spaces or special characters/symbols).
4a. Open the ‘data.csv’ file and remove the existing map area IDs found in row 1, from column
‘L’ onward (so after the column header ‘TYPE’). From the ‘map.dbf’ file, copy the entire list of
map area IDs from this column (excluding the column header). Then paste them into the
‘data.csv’ file, in the same place (i.e. row 1, from column ‘L’ onward). You would need to
‘transpose’ the data to change it from vertical to horizontal alignment. In Excel the step would
be ‘Paste’ -> ‘Transpose’ (or ‘Paste Special’ -> ‘Transpose’).
20

5a. Copy and paste the map area ‘names’ from the map.dbf file to replace the existing ones in
the bottom of the file settings.csv. This time the data does not need to be transposed, so it is a
simple copy and paste. These are the names which are actually displayed in the map in
StatPlanet (in contrast to the map ‘IDs’ in the previous step which are used to identify each map
area). The order of ‘names’ in the sheet ‘settings.csv’ should match the order of the ‘IDs’ in the
sheet ‘data.csv’. (They should be automatically aligned if you copied and pasted them from the
data.dbf, as long as you did not re-order them prior to copying).
Using the StatPlanet Data Editor:
3b. Open the StatPlanet Data Editor, and then open the sheet ‘Settings’. In the ‘map.dbf’ file,
find the column which uniquely identifies each map area (usually a code, e.g. AFG for
Afghanistan). Copy the header name for this column (from the first row). Then paste it into the
StatPlanet Data Editor sheet ‘Settings’ in the cell next to the variable name 'DBF-ID' (row 6,
column C). Please note: This ID column should contain unique values only, and characters need
to be alphanumeric (i.e. cannot contain spaces or special characters/symbols).
4b. In the StatPlanet Data Editor, open the sheet ‘Data’ and remove the existing map area IDs
found in row 1, from column ‘L’ onward (so after the column header ‘TYPE’). From the
‘map.dbf’ file, copy the entire list of map area IDs from this column (excluding the column
header). Then paste them into the sheet ‘Data’, in the same place (i.e. row 1, from column ‘L’
onward). You would need to ‘transpose’ the data to change it from vertical to horizontal
alignment. In Excel the step would be ‘Paste’ -> ‘Transpose’ (or ‘Paste Special’ -> ‘Transpose’).
5b. In the StatPlanet Data Editor, open the sheet ‘Import’ and remove the existing map area
names found in row 1, from column ‘L’ onward (so after the column header ‘TYPE’, as in the
previous step). Copy and paste the map area ‘names’ from the map.dbf file to replace the
existing ones in row 1, from column ‘L’ onward. You would need to ‘transpose’ the data to
change it from vertical to horizontal alignment. In Excel the step would be ‘Paste’ -> ‘Transpose’
(or ‘Paste Special’ -> ‘Transpose’). These are the names which are actually displayed in the map
in StatPlanet (in contrast to the map ‘IDs’ in the previous step which are used to identify each
map area).

GIS Shapefile Reader - Source Code
The source code for reading the shapefiles is included in the directory SHPreader. It can be
compiled to the file SHPreader.swf, which is read by StatPlanet.
The code was written by Edwin van Rijkom under the LGPL license, with some additions by
Andy Woodruff, and some slight modifications for use in StatPlanet.

21

If you wish to change the names of the map files being read, you can change this in
SHPreader.as, and publish it as SHPreader.swf through the file SHPreader.fla.
For more information, see: http://shp.riaforge.org/

22

4.3. Create a map using Adobe Flash
To create custom interactive maps for use in StatPlanet, you need the following:


StatPlanet Plus



Adobe Flash CS3 or higher



A map file in “vector” format, such as Adobe Illustrator (.ai), FreeHand (.fh*, .ft*), or
Adobe Flash (.swf).
(See also: Converting bitmap images to vector)

For creating Flash maps, please see the online tutorial.

23

5. IMPORTING OR ADDING DATA
5.1. Basic steps for adding data
The following is an example for importing country level data into the “World Map” version of
StatPlanet. However, the process is the same for other versions of StatPlanet and StatTrends.
1.

Download

Download StatPlanet or StatPlanet Plus and extract the files to
your computer.5

2.

Open

In the folder 'World_map', open the file ‘StatPlanet_data_editor’.
Make sure macros are enabled. Press the 'Clear data' button to
remove the example data.

3.

Import

Press the import data button and select a file containing data you
wish to import. You can also add data manually using any
spreadsheet software (see ‘Data file structure’ below).

4.

Save

Press the 'Save data' button. This saves the data to the
file ‘data.csv’, and the settings to the file ‘settings.csv’.

5.

View

Click on StatPlanet.exe or StatPlanet.html (in the ‘web’ directory)
to view the results.

6.

Publish

Copy the contents of the folder ‘Web’ to your website to publish
it online.

To publish StatPlanet online, all you need to do is to upload the contents of the folder Web to
the website (web-server). For publishing it within a CMS (Content Management System), please
see the website FAQ: http://www.statsilk.com/support/faq#CMS
The web folder contains the following files:


StatPlanet.html (the webpage which displays your interactive map)



StatPlanet_small.html (alternative with smaller map embedded inside a webpage)



StatPlanet.swf (file which shows loading progress)

5

The files need to be extracted to a location where you have permission to save data, for example, your
“Documents” folder or the desktop. Extracting it to the “Program Files” directory (on Windows-based computers)
may cause problems when trying to save the data.

24



content.swf (the actual software)



settings.csv (settings in comma-separated values format)



data.csv (data in comma-separated values format)



swfobject.js (required to run ‘Flash’ content)



Sub-folders ‘export’ and ‘map’ (StatPlanet Plus and StatTrends Plus only): For StatPlanet
Plus and StatTrends Plus, the ‘web’ folder also contains the sub-folder ‘export’ for
exporting the maps and graphs. In the Shapefile map version of StatPlanet, there is also
an additional sub-folder ‘map’ (containing the shapefile map files). These sub-folders
would also need to be uploaded.

Enabling macros in Excel
When you open StatPlanet_Data_Editor.xls you will normally get a message asking you whether
you wish to enable macros. The message depends on the version of Excel.


Excel 2007 or newer: In the top of the screen, next to 'Security Warning', click the
button 'Options'. Select 'Enable this content' and click on 'OK'.



Older versions of Excel: Select 'Enable macros' in the popup window.

If you do not receive this message, the macro security level in Excel is set to high. Follow the
instructions below to change the security level to a lower setting.


Excel 2007 or newer: Click the Microsoft Office Button (top-left) and click Excel Options.
In the Popular category, check 'Show Developer tab in the Ribbon' (if it is not already
checked). Click on 'OK', then select the Developer tab. Click on 'Macro security' (on the
left). Select 'Disable all macros with notification'.



Older versions of Excel: In the Tools menu, go to -> Macro -> Security. Change the
security level to Medium.

25

5.2. The StatPlanet Data Editor
The Excel-based StatPlanet Data Editor comes included with each version of StatPlanet and
StatTrends. To edit the data files directly (bypassing the StatPlanet Data Editor) please see the
section ‘Data editing without Excel’.
The StatPlanet Data Editor consists of the following sheets:
Sheet “Import”: This is the main Excel sheet where you import your data. In the ‘shapefile’
version of StatPlanet, this sheet also includes a ‘Setup Shapefile Map’ button (for setting up
shapefiles, please see Chapter 4). Row 2 lists the map area or variable names as they are
displayed in StatPlanet / StatTrends.
Sheet “Import names”: This sheet can be used to ‘teach’ the StatPlanet Data Editor different
spelling variations of the map areas or variables you wish to import. For an example, please see
the ‘World Map’ version of StatPlanet, where this sheet contains many variations of the spelling
of country names. For more details please see also the section on importing data below.
Sheet “Data”: In most cases this sheet does not need to be modified. The ‘Data’ sheet is
identical to the sheet ‘Import’, but row 1 contains the map area or variable IDs. These are used
to identify each of these in StatPlanet, as well as link them to their text label coordinates in the
sheet ‘settings’. Unlike the names in the sheet “Import’, the IDs cannot contain commas or
symbols and should be alphanumeric only. It may sometimes be necessary to modify this sheet
when adding ‘map points’. For more details please see the section ‘Add map points or
additional map areas’.
Sheet “Map regions” (StatPlanet) or ‘Groups’ (StatTrends): This sheet can be used to
optionally define specific map regions within StatPlanet, or variable groups within StatTrends.
For more details please see the section “Custom ‘zoom-to’ map regions or groups”.
Sheet “Settings”: This sheet lists over 200 customization options to fully customize the user
interface and functionality.
Sheet “Text-Translations”: This sheet contains a number of interface translations, and can also
be used to add new translations.
Sheet “Tools”: This sheet lists a number of tools, such as for upgrading to a new version of
StatPlanet – automating the process of transferring your old data to the new StatPlanet Data
Editor.

26

5.3. Defining variables (StatTrends only)
Prior to importing data in StatTrends, you first need to define your variables. They are defined
in the sheet ‘Import’, as follows:


Replace the example variables from column L onwards (row 2) with your own.



Click on button '3. Save data' to save your variables.



Click on button '2. Import data' to import your data. (If your variables did not import, try
closing and re-opening the StatPlanet Data Editor. The variables in the document you
are importing need to be equivalent to the variables in the sheets ‘Import’.).



Click on button '3. Save data' again to save, and then the results can be viewed in
StatTrends.

5.4. Importing data automatically
Using the included StatPlanet Data Editor, data can be automatically imported through the
button ‘Import data’ (found in the top-left corner of the sheet ‘Import’). Data can be imported
from any file format recognized by Excel, including CSV, TXT, XLS, XLSX, DBF and HTML.
Importing one or multiple categories of data
As of StatPlanet Plus v 3.21, data is imported from all Excel sheets in the selected file. Each
sheet is imported as a separate category, and the sheet name becomes the category name (if
there is more than one sheet of data). For multiple categories of data, the best way to organize
your data file would be to organize the sheets according to the categories you would like to
create within StatPlanet/StatTrends. Each sheet – which becomes a category – can have
multiple indicators and time periods.
In order to disable importing all sheets, go to the sheet 'Import names' and set 'Import all
sheets' to FALSE. When set to FALSE, it only imports the currently selected sheet when the file
is opened. In the sheet 'Import names', it is also possible to insert any sheet names to exclude
from import, in cell H12 (for multiple sheets, separate them by commas, e.g. sheet1, sheet2,
sheet3).
Structuring the data file for import
The Data Editor automatically recognizes the structure of the data in the file being imported. It
will then automatically restructure the data in the format that is accepted by StatPlanet.
27



Please download the example spreadsheet for an example of how to structure the data
if the import fails (with country-level data).

A criterion for the import to be successful is that any map area name (e.g. country name) only
appears once in the data file being imported. For example, if there are several rows of data for
a map area, these rows would need to be combined into a single row. See also the section
“Troubleshooting” below.
The Data Editor can also recognize multiple spelling variations of map area (e.g. country) or
variable names. The World Map version of StatPlanet recognizes the vast majority of the many
possible variations of country names. The import should therefore succeed in most cases
without having to make any changes to the data file. The spelling variations are listed in the
sheet ‘Import names’. For more information, and for troubleshooting issues where map area or
variable names are not recognized in the file you are importing, please see “Names not
recognized” below.
Also note that StatPlanet sees a "dot" as the decimal separator.
Importing HTML or PDF files


HTML: To import data from a web-page, simply save the web-page and import it like any
other file. If the import fails, it could be that the import/map/country names and
statistics are too far down the page. In this case, open the file in Excel, and remove the
rows up to the point that the data starts. Then import the file again. Alternatively, copy
and paste the tables in the web-page into a new Excel document.



PDF: Tables in PDF files can usually be copied and pasted into an Excel file. Select
(highlight) the table with the mouse, right-click and select “Copy as Table” or “Save as
Table” from the menu. See also this helpful guide from McGill University, as well as this
free tool to convert a PDF to an Excel file: http://www.pdftoexcelonline.com

Names not recognized
Names of map regions in the data file which are not recognized are displayed once the import is
complete. For example, if in your data file the country ‘Afghanistan’ is indicated with the
abbreviation ‘Afg', this abbreviation will not be recognized by the data editor. To fix the
problem, go to the Excel sheet 'Import names' and add ‘Afg’ in an empty cell below the
corresponding country - ‘Afghanistan'. You can use the same approach for other headers in
your data set so that the import macro can correctly identify them. Once this has been
completed, you need to close and re-open the StatPlanet Data Editor. Then, run the import
macro again to import the data correctly.
28

Note that the import macro removes spaces in the sheet “Import names” and converts special
characters (e.g. "é") into regular characters (e.g. "e") during the import. This allows for a wider
range of country name spellings to be detected. Whether the names in your file use upper or
lowercase does not matter. The world map version recognizes English and French country name
spellings and a number of variations of these spellings. Automatic data importing has been
successfully tested with many different sources of data with different data structures and
country name variations, including the CIA Factbook, Ethnologue, IMF, ITU, Nation Master,
OECD, UBS, UIS, UNAIDS, UNDP, UNESCO, UNICEF, UNSTATS, WHO and the World Bank.
The Data Editor is registered as an open source project on SourceForge and any contributions
or improvements you make to the software are very welcome.
(https://sourceforge.net/projects/statplaneteditr/).

5.5. Importing data manually
This section describes how to import your data manually, without using the StatPlanet Data
Editor macro for importing data. If you go for this approach, you can bypass the StatPlanet Data
Editor altogether, and directly edit the ‘data.csv’ and ‘settings.csv’ files. To understand how to
structure the data in these two files, please see the following two sections.
The following instructions are relevant for the ‘World’ and ‘USA’ map editions. For the
‘Shapefile map’ edition, please see the section ‘Instructions for manually setting up shapefiles’
instead.
Importing data for StatPlanet: To facilitate importing your data into StatPlanet, it can be useful
to arrange the map area names/codes in the StatPlanet data files so that they are in the exact
same order as in your own data files. This particularly saves time if you have multiple data files
with the map area names/codes in the same order. The following is a step-by-step approach for
rearranging the map area names:
1. Open the ‘data.csv’ file. Select and copy the entire list of map area codes in row 1, from
column L onwards.
2. Open the ‘settings.csv’ file. Scroll down to the list of map area names at the bottom
(below the header ‘NAMES’). Select the cell next to the first map area code in column B.
For example, if the first map area name is in cell A466, then select the adjacent cell
B466. Paste the map area codes here, so that they will be next to the map area names,
through: ‘paste’ -> ‘paste special’ -> ‘transpose’ (to change the orientation to vertical).
You should now have two vertical lists – first the map area names and next to it the
corresponding map area codes.
29

3. Just below the header ‘NAMES’, insert new rows for each of the map area names in your
data file. For example, if you are importing data for 20 map areas, insert 20 rows. Then
copy and paste the map area names from your own data file in the empty space
created, in column A.
4. Scroll down to find the map area code corresponding to each of the names just added,
and copy/paste this code next to the name in column B. Then delete the entire row with
the code you just copied/pasted. (This is to ensure you are only removing rows
corresponding to your map areas, and none of the other map area codes/names).
5. You should now have a new arrangement with the map areas which are in your data file
at the top of the list. Cut the entire list of map area codes from column B, and paste
them back in to the ‘data.csv’ file (starting in column L, using ‘paste special’ –
‘transpose’).
You should now be able to copy and paste data directly into the data file without having to
rearrange it. It then needs to be structured as described in the next section.
Importing data for StatTrends: Importing data for StatTrends is the same as with StatPlanet,
but more straightforward. There is no need to change the order of variables in the data.csv file.
Just copy and paste them in the same order as in the data file you wish to import (from column
L onwards, with the variable headers in row 1). It then needs to be structured as described in
the next section.
Note for Mac users: when saving the settings.csv or data.csv files, they need
to be saved in the ‘Windows Comma Separated Values’ format (selectable
from the drop-down in the ‘Save As’ dialogue window).

5.6. Data file structure
Data in the StatPlanet Data Editor consists of 11 columns containing category names, indicator
names and meta-information. This is followed by x number of columns for the map areas
(StatPlanet) or variables (StatTrends), where x corresponds to the number of map areas or
variables. Data is edited in the sheet “Import”. When clicking on “Save data”, a copy is saved to
the sheet “Data” prior to saving the file as ‘data.csv’ (removing duplicate indicator names to
reduce file size). The ‘data.csv’ file is the actual data file read by StatPlanet.

30

The data file structure for the first three columns is shown below. Columns 1, 2 and 3 contain
the Category names, Time units (e.g. years) and Indicator names respectively. Columns 4 to 11
are for optional customizations and can be left blank (for more details on how to use these
columns, please see the User Guide). In contrast to StatPlanet Plus, StatPlanet only uses
columns 2 (Time) and 3 (Indicator). The Time column can also be used for organizing other
variables, such as different age-groups (or age-ranges) in population data.
CATEGORY

TIME6

Category 1

2010

INDICATOR
Indicator 1a
Indicator 1b

2009
Indicator 1a
Indicator 1b
Category 2

2010
Indicator 2a
Indicator 2b
Indicator 2c
2009
Indicator 2a
Indicator 2b
Indicator 2c

6

This column is called ‘YEAR’ in older versions of StatPlanet and StatTrends.

31

The most important columns are therefore columns 1 to 3, which need to be structured
according to the following rules:





Data is structured first by category, then by date, and then by indicator.
Dates must be in order from highest to lowest.
Within one category, the list of indicators must be exactly the same for each date / year.
Spacing (empty cells in white) between the different categories, dates and indicators
need to be maintained as shown in the example below. See also the included example
data which comes with StatPlanet for a more elaborate data structure. Please note that
there are empty spaces between each category and between each year, and a single
empty space (cell) between each list of indicators.

An example of the simplest possible data file is given below, which consists of just 3 rows. The
first row contains the headers. The second row contains the category name (column 1, row 2)
and the time value (column 2, row 2). The third row contains the indicator name (column 3, row
3), and in the same row, contains the data for each map area or variable (columns 12 onwards,
row 3). For Shapefile Maps, the headers for column 12 onwards need to correspond to the
unique map area codes in the DBF file. The column header for these unique map area codes
then needs to be specified in the ‘settings.csv’ file, which is explained in more detail below.

CATEGORY

TIME7

Category 1

2010

INDICATOR



AREA1

AREA2

Etc…

Indicator
name



42.2

34.8

21.9

For sub-categories and sub-sub-categories the structure is identical. Please note though that
the name of a category containing sub-categories needs to be in the row directly above the first
sub-category. Aside from the first cell containing the category name, all other cells in this row
should be empty. An example of a category with two sub-categories is shown below:

7

This column is called ‘YEAR’ in older versions of StatPlanet and StatTrends.

32

CATEGORY

TIME

INDICATOR

Category
>Sub-Category 1

2010
Indicator 1a
Indicator 1b
2009
Indicator 1a
Indicator 1b

>Sub-Category 2

2010
Indicator 2a
Indicator 2b
Indicator 2c
2009
Indicator 2a
Indicator 2b
Indicator 2c

The same structure applies for sub-sub-categories, sub-sub-sub-categories, etc. For each
additional level, add another symbol > prior to the category name. For example:
Category
> Sub-category
>> Sub-sub-category
>>> Sub-sub-sub category (supported as of StatPlanet v 3.3)
etc.

5.7. Settings file structure
This section describes the structure of the settings file (settings.csv or settings.txt), in case it
needs to be edited manually, or if it is generated not through the StatPlanet Data Editor but via
other means.
The setting file consists of three parts, which are extracted from different sheets in the
StatPlanet Data Editor:

33

1. Map coordinates


Found in sheet “Map regions”

The structure of the “map coordinates” consists of the heading “MAP”, followed by at
least one line providing the startup coordinates of the map (in the order - X coordinate,
Y coordinate, zoom level), e.g.:
All regions

0

0

100

2. Settings


Found in the sheets “Settings” and “Text-Translations”

The structure of the “settings” consists of the heading “SETTINGS”, followed by a
vertical list of settings. The first column contains the variable name and the second
column the corresponding value. The order of the variables does not matter. This
section also includes the interface and help text.
For Shapefile maps, the key variable to be set is the variable ‘DBF-ID’. The value of this
variable would need to be the name of the column header from the shapefile DBF file
which contains the unique codes for each map area.
3. Names (optional)


Found in the sheet “Text-Translations”, a copy of which is found in the sheet
“Import”

The map area names (or variable names if using StatTrends) are optional. If left out the
names used will be equivalent to the names/codes in the sheet “Data”. The structure of
the “names” section consists of the heading “NAMES”, followed by a list of country /
map area / variable names. The order of the names should be the same as the order of
the corresponding country / map area / variable codes in the sheet “Data”, but
transposed vertically rather than horizontally.

5.8. Loading data from a database
In StatPlanet v 3.1 the option of passing data to StatPlanet as a ‘parameter’ in the web-page
was introduced (StatPlanet Plus only). The data is therefore embedded within the web-page, in
34

contrast to reading data from an external data file. Because web-pages can be generated
dynamically (e.g. through PHP), this also enables the data passed on to StatPlanet to be
generated dynamically.
A static example of this is included in the “World map” version of StatPlanet Plus, in the
directory ‘web’, file StatPlanet_database.html. This web-page passes on an array of data to
StatPlanet using ‘FlashVars’, containing three indicators and values for several years.
Data is passed on to StatPlanet in the form:
flashvars.data = "insert data array"

The first three characters need to consist of (i) the hash (#) symbol which tells StatPlanet to
expect an array of values rather than the name of an external data file; (ii) the separator for the
values; and (iii) the separator between each ‘row’ of data. In the following example, the
‘comma’ (,) is indicated as the value separator and the ‘semicolon’ (;) is indicated as the row
separator:
flashvars.data = "#,;"

This needs to be followed by the headers – that is, the same headers which are found in the
first row of the external data file and includes the map area codes. For example:
flashvars.data = "#,;CATEGORY,YEAR,INDICATOR,SOURCE,DESCRIPTION,UNIT,
MAP,GRAPH,FILE,OPTIONS,TYPE,AFG,ALB,DZA,AND,AGO,AIA,ATG,ARG" etc.

It is not necessary to indicate the names for the first few columns, so the following shorter
format can also be used (the three characters “#,;” followed by 11 commas, followed by the
map area codes):
flashvars.data = "#,;,,,,,,,,,,,AFG,ALB,DZA,AND,AGO,AIA,ATG,ARG" etc.

The array of data needs to follow the exact same structure as the external data file, as
described in the ‘Quick_Start.pdf’ documentation included with StatPlanet8. For example, as
described in this document, the indicator name needs to be in the third column, and the
preceding two cells need to be blank. If values are separated by commas, then the indicator
name should therefore be preceded by two commas (where each comma represents a ‘cell’ in a
traditional spreadsheet). The first map area column is 9 columns after the indicator column
(these 9 columns contain optional parameters). A row of data for an indicator therefore
consists of two commas, followed by the indicator name, followed by 9 more commas, and
8

See also: http://www.statsilk.com/support/resources

35

then the value for the very first map area. Each row is separated using the ‘semicolon’ (;).
Following this structure, the following is a simple example which loads a single indicator, for a
single year, and with data values for just two map areas – Afghanistan (AFG) and Albania (ALB):
paramObj["data"] = "#,;,,,,,,,,,,,AFG,ALB;My category,My time;,,My indicator,,,,,,,,,2,3;";

If this array were to be represented as a table, it would look like this:

My
category

AFG

ALB

2

3

My
time
My
indicator

With the optional header names included, the array would be as follows:
paramObj["data"] = "#,;CATEGORY,TIME,INDICATOR,SOURCE,DESCRIPTION,UNIT,
MAP,GRAPH,FILE,OPTIONS,TYPE,AFG,ALB;My category,My time;,,My
indicator,,,,,,,,,2,3;";

And the corresponding table would be:
CATEGORY

TIME

My
category

My
time

INDICATOR

SOURCE

My
indicator

DESCRI
PTION

UNIT

M
A
P

GRAPH

FILE

OPTIONS

T AFG
Y
P
E

2

ALB

3

For a more complete and more complicated example, see the file StatPlanet_database.html.

5.9. Troubleshooting
If you have saved your data but it cannot be read by StatPlanet, most likely there is a problem
with the data structure. The import macro automatically structures the data correctly. If you
imported data manually, please see the section ‘Importing data manually’ above. If StatPlanet
36

failed to start after manually re-arranging your data, please see also the section ‘Data file
structure’ above.
If the automatic import fails, please consult the list of potential causes and solutions below.
For general troubleshooting issues, see also the FAQ on the StatSilk website:


http://www.statsilk.com/support/faq#troubleshooting

Potential causes of data import problems
1. Spelling of names: If the spelling of a map area (or variable name) in the file you are
importing is not recognized, the corresponding data will not be imported. The names in the
data file need to match those in the StatPlanet Data Editor sheet "Import names". See “Names
not recognized” above for more information on how to resolve this problem.
2. Numbers in names: If the names in your data file contain numbers in the same cell (e.g. "1
Alabama", "2 Alaska", "3 Arizona"), they need to be automatically removed as follows: (i) In the
StatPlanet Data Editor, go to the sheet 'Import names', (ii) Select the checkbox 'Remove
numbers / footnotes from names', and then retry the import.
3. Names appear more than once: If the same country/map/region names appear more than
once in your data file, the import macro will only import the data associated with the first one.
This structure will not be imported correctly:
Country

Dimension

Afghanistan

A
B

Albania

A
B

Algeria

A
B

Andorra

A
B

High
6
7
9
12
11
21
15
14

Medium
3
5
6
5
5
11
14
11

Low
2
2
3
2
1
9
12
10

The above data structure would need to be re-arranged with one country/map/region name
per row, as shown below (alternatively, it may be easier in some cases to split the data into
several files and import them separately). The Excel-based data restructuring tool may help you
automatically structure the data for import, if you can organize the data as in the example set.
This structure will import correctly:
37

Country
Afghanistan
Albania
Algeria
Andorra

A - High

A - Medium A - Low

6
9
11
15

3
6
5
14

2
3
1
12

B - High
7
12
21
14

BMedium
5
5
11
11

B - Low
2
2
9
10

4. No year found in the data file / importing other kinds of date/time-based formats

All indicators are arranged according to year or other time unit (e.g. months). See the example
file included with StatPlanet “data_example_for_import_worldmap“ to see how to structure
data with multiple years and/or indicators, so that it can be imported successfully9. For
importing data with another kind of date/time-based format, please see this FAQ item.
You can also import the data and add the year or time unit afterwards. The data needs to be
structured as follows (see for example the structure of the sample data in
StatPlanet_data_editor.xls):


Group (sort) your indicators according to year. Insert a new row above each group of
indicators. In this new row add the year in the TIME column. Leave the neighboring cell
in the INDICATOR column blank;



Note that the TIME column should be blank in the cells next to the indicators:
TIME
2001

INDICATOR
indicator1
indicator2

2000
indicator1
indicator2
See also the section “Data file structure” for more details.
5. Decimal point: StatPlanet reads a "dot" as decimal separator (for example 0.75). Avoid using
commas, spaces or other symbols in numbers to ensure that they are read properly by
StatPlanet.
6. Errors related to the shapefile map

9

http://www.statsilk.com/support/resources

38

- Map ID error: The DBF file (map.dbf) uses an ID containing special characters which are not
supported. It needs to have an ID which is alphabetical (a-z or A-Z), numerical or alphanumeric.
The solution is to create one yourself by editing the DBF file. As of Excel 2007, DBF support is no
longer included, but Open Office Calc can be used as a free DBF file editor.
- Time-out error: The shapefile is too large leading to a time-out error. This might be an issue if
your shapefile is over 10 mb and/or contains a large number of regions. See how to reduce the
size of a map for significantly reducing the map size. As of StatPlanet Plus v 3.0, larger shapefile
maps are supported.
- Unknown shapetype error: Use the free Quantum GIS software to open the shapefile (Layer > Add Vector Layer -> Browse). Simplify the map if required (to reduce the file size). Then save
the shapefile through (Layer -> Save As). If it still does not work, you may need to save it as
WGS 84 (Coordinate reference system).
- The shapefile map appears blocky (the borders are not smooth): This issue can be resolved
by replacing the file 'SHPreader.swf' with 'SHPreader2.swf' included with the shapefile version
of StatPlanet. You may first wish to make a copy of the file 'SHPreader.swf', then remove the
original 'SHPreader.swf' and rename the file 'SHPreader2.swf' to 'SHPreader.swf'. For the webversion, you would need to copy the 'SHPreader.swf' file also into the 'web' directory.
- Other: If none of the above apply, there may be a problem with the shapefile itself. Most
commonly, the number of map areas in the DBF file do not match the map areas in the
shapefile (SHP) itself. StatPlanet is sensitive to such issues, so even though it may open
successfully in a GIS application, it cannot be read by StatPlanet. Specialized GIS software may
be needed to resolve such errors.

39

6. CUSTOMIZATION
For help in customizing and improving your interactive maps, see also the StatSilk website
section - general tips for creating interactive maps

6.1. Global customizations and startup settings
General settings for customizing StatPlanet can be found in the Excel sheet Settings. After
making any changes to the settings, press the button Save Settings. You can try out many of the
settings ‘live’ in StatPlanet through the general options panel and the map legend options
panel.
In the Excel sheet Settings, the various settings to be edited are the yellow highlighted cells in
column C. In some cases, the checkboxes and dropdown menus in column D can be used to
more easily change the setting in the corresponding cell in column C (for example, click on a
checkbox to change a setting from ‘TRUE’ to ‘FALSE’).
See also the next section for customizing StatPlanet at an indicator or category level (for
example, specify different map colors for different indicators).
Each option in the sheet ‘Settings’ has a short explanation in column D. A few of these options
are described in more detail below:


Startup settings
The first rows in the sheet ‘Settings’ are startup settings:
o REGION: Change the default region: through the region drop-down menu in row
5, which will select and zoom into this region on startup (e.g. “South Asia”).
o GRAPH: Change the default graph type.
o HELP: Show a help screen on startup. The help text can be modified in the sheet
‘Text-Translations’. To prevent any of the default help “text balloons” from
appearing, replace the text with a dash symbol (-).
o SEL-IND: Change the default startup indicator to something other than the very
first indicator in the data file, either by inserting the indicator row number or the
indicator name (assuming it is a unique indicator name in the data file). If you do
not want any indicator to be selected on startup, insert the text: none
Optional startup text or instructions can be provided inside the Graph panel,
40

through the StatPlanet Data Editor, sheet ‘Text-Translations’, variable ‘T_GRSTART’.
o B-IND: Select a bookmarked indicator on startup.
o THEME: Choose the regular or dark theme (colors / skinning).
o REGION-L: Please see below (“Add text labels”).
o TXT-COORD: Please see below (“Add text labels”).
o GRAPH-M: Startup with the graph panel maximized.
o TOPMENU: Display the main (level 1) categories in the top of the screen through
a horizontal menu.
o PLAY: Play the time animation on startup.
o FORMAT: Change the format of the data and settings file to CSV or TXT. After
changing the format, make sure to remove the existing data/settings files for the
other format (e.g. if changing to the TXT format, remove the data.csv and
settings.csv files or StatPlanet will continue to read them). The TXT format is
needed to display fonts using non-Latin characters.


Modify map, graph or interface colors
Most of the colors used in StatPlanet can be customized and there are over 40 color
settings. Additional color settings can be specified at the indicator level (see the next
section for more details). Colors are specified using hex (hexadecimal) color code,
consisting of the characters ‘0x’ followed by six digits or characters (e.g. 0xFFFFF for
white). Hex codes can be found in commonly used design software such as Adobe
Dreamweaver, or online, e.g. http://html-color-codes.info/.



Show / hide interface components
Use the options in this section to show or hide the various panels, icons and other
components in order to customize the StatPlanet interface. One of the options is to
enable the share link feature via a link icon in the bottom-left corner of the application,
variable ‘V-I-LINK’. This requires that variable ‘SITE-L’ indicates the web-link where the
application is located e.g. www.mysite.com/statplanet, or
www.mysite.com/statplanet.html.



View menu options
The view options in this section are identical to those in the ‘view menu’ inside
41

StatPlanet, which appears when selecting the ‘view’ icon in the bottom-left of the
interface.

6.2. Map customization
Add custom ‘zoom-to’ map regions or groups
Map regions or groups can be added or modified in the worksheet ‘Map regions’ (if using
StatPlanet) or ‘Groups’ (if using StatTrends). For example, the World Map version of StatPlanet
has several regions defined, one of which is Sub-Saharan Africa. When clicking on ‘Sub-Saharan
Africa’ from the selection panel in the top-right corner, StatPlanet will zoom into the African
continent and display map and graph data only for countries in Sub-Saharan Africa. In
StatTrends, the principle is the same, but instead of map areas, you can organize any of your
variables into groups.
Defining custom regions or groups
Custom regions or groups can be defined from row 3 onwards (please see below for making
changes to row 2 – the ‘All regions’ option).
Map regions or groups have the following elements:


Name (col. 1): The names of the map regions or groups you wish to define.
It is possible to categorize your regions or groups if you wish to organize them into submenus. This is done by inserting the name of your category (just like inserting any region
or group name). Then for subsequent region or group names below, add ‘>’ if you wish
to include them under this category (the principle is the same as with the categorization
of indicators). In the example below, “My sub-menu” is the name of your sub-menu, and
the symbol “>” is used to define the two regions to be included in this sub-menu:
Region 1
Region 2
My sub-menu
> Region 3 (inside sub-menu)
> Region 4 (inside sub-menu)
Region 5 (not inside sub-menu)
etc.
The symbol “#” can be used prior to the region name to hide it from the map region
drop-down menu (e.g. #My hidden region). This may be useful if you wish to select and
42

go to a map region on selecting a particular category, but without making this particular
map region selectable through the drop-down menu. For example, it you have defined
two maps next to each other, you can move from map 1 to map 2 by selecting a
category related to map 2, but have the option to go to map 2 hidden from the
dropdown menu. To change the region when selecting a particular category, please see
the section “Change map region or group” under “General options and mouse-over
popup text/links”.
The two symbols “#*” can be used prior to the region name to both hide it from the
map region drop-down menu, and to use it only for setting the map zoom and position
(as specified for this region). The original region selection (in terms of the map areas in
this region) is thereby maintained.


Map coordinates (col. 2-4) (StatPlanet only): The X and Y coordinates and ZOOM level
for the defined regions. To get these coordinates, open your map in StatPlanet and
zoom into the map area you wish to add (e.g. zoom into Africa and click and drag the
map so Africa fills the screen). Once you are satisfied with the map position, right-click
anywhere in StatPlanet and select 'copy map coordinates'. Go back to the Excel sheet
‘Map regions’, and ‘paste’ the coordinates in the corresponding row for the region.



Color (col. 5 - optional): The color for each region which will be used to color the
bubbles in the scatter plot graph. It is also possible to color the bar chart using the
region colors. A region colors needs to be specified as a “hex color”, for example
“0x0000FF” for blue.



Link (col. 6 – optional, StatPlanet Plus / StatTrends Plus only): Insert a link or URL, for
example to link a map name with another copy of StatPlanet with this map embedded
(e.g. http://www.mywebsite.com/anothermap). It is also possible to use this feature to
link to documents for download. If using this feature offline and linking to other offline
files, the specified path needs to be either relative to the current StatPlanet location
(e.g. mydirectory/StatPlanet.html), or specified in the following format:
file:///C:/mydirectory/myfile
Please note that this feature only works online or in the desktop version; it does not
work in the offline web version due to a Flash security restriction.



Codes (col. 7 onwards): Columns 7 onwards contain the codes for the countries or map
areas in each region (these are ISO3 country codes for the world map version of
StatPlanet). In both StatPlanet and StatTrends, these codes need to correspond to the
codes or variable names you are using in the top row of the sheet ‘Data’. When adding

43

these codes, it is important that they are added from column 7 onwards without leaving
any empty cells between them.
Modifying the ‘All regions’ option
Row 2 always defines the map coordinates when all map regions are shown. The default name
is ‘All regions’, but the name can be changed by going to the sheet ‘Text-Translations’, finding
‘All regions’ (in the ‘English’ language column if you are using the English version), and changing
the name here. After changing the name, go to the sheet ‘Settings’ and click on ‘Save settings’
for the change to register. As of StatPlanet Plus v 3.3 it is possible to hide the ‘All regions’
option by going to the sheet ‘Settings’ and changing the variable ‘MAP-ALLR’ to FALSE (under
‘Map options’).
Grouping map areas
Map areas with the same name in the StatPlanet Data Editor sheet ‘Import’ will be
automatically grouped together when moving the mouse over any of the map areas, so it will
appear as if it is one map area. However, they can still be selected as well as colored separately.
To group map areas in this way, they should therefore be given the same name in the
StatPlanet Data Editor sheet ‘Import’ (but keeping their unique IDs in the sheet ‘Data’).

Add or import map points (cities, places, aggregations, etc.)
(StatPlanet Plus only feature). Cities, places and other map areas can be defined separately
from the map itself through the ‘map points’ feature. These map points are displayed in the
graphs and selection panel just like other map areas. They also appear in the map itself, and can
be positioned into place via drag and drop. If you do not wish to display the map points in the
map, the setting ‘M-DOT’ in the StatPlanet Data Editor, sheet ‘settings’, needs to be set to
‘FALSE’.
Please see also below: Automatically importing map points
Map points can be added as follows:
1. Open the StatPlanet Data Editor and in the worksheet "Import" go all the way to the last
country or map region at the end of row 2.
2. Insert the name(s) of your map point(s) in this row and press the button Save data. Data
can be added in this column in the same way as with any other map area. You will need
to add some data for this map point in order for it to appear in the map. (Note: once
you have pressed Save data, the map point name should also have been added in the
44

worksheet “Data”. If you cannot see the map point in StatPlanet, please check the
worksheet “Data” to confirm it has also been added here).
StatPlanet Plus only:
3. When you next open StatPlanet, one or more map points (in the form of a circle) will
appear in the top left corner of the map, representing each of the new map areas
added. Right click anywhere inside StatPlanet and in the popup select ‘Move text labels
or map points’. Click on the map point and then click anywhere on the screen to move it
to this new location. Similarly, the text label for a map point can be dragged and
dropped to a new location. (For map points, please note that the mouse button should
not be held down while moving, just click once to start moving the map point, move the
mouse cursor to the desired position, and click once again to drop the map point).
4. To copy the map point coordinates, right click again and select ‘copy map point
coordinates’.
5. Open the StatPlanet Data Editor and go the sheet ‘Settings’. Scroll down to ‘Special
options’ and next to M-DOT-COORD paste the coordinates you just copied. You can also
change the size of the map points through the variable M-DOT-SIZE. Click on Save
Settings to save.
6. Map point text labels are only shown once you have moved the map point to a new
location. Once StatPlanet has registered that a map point location has been set, the map
point text labels are shown as well (if you have chosen to view map text labels). Map
point text labels can be moved around just like any other text labels on the map. For
more details, please see the section “Add text labels and position the text labels on the
map”.
For adding map points, please note that information for each map point is stored in several
sheets. The sheet ‘Import’ contains the ‘map point names’ as displayed in StatPlanet. The sheet
‘Data’ contains the ‘map point ID’, which may be the same as the ‘map point name’ but cannot
contain symbols or commas – only alphanumeric characters. These IDs are used to link the map
points to their respective coordinates in the map, as well as the map point text label
coordinates. As indicated above, the coordinates are saved in the sheet ‘settings’.
The table below highlights the differences between the sheet ‘Import’ and the sheet ‘Data’ in
storing information about map points or variables:

45

1
2
3
4
5
6

Contains map point labels as displayed in StatPlanet.
Map point labels can be changed at any time.
Column position of map points is fixed (used to link map point
names in the sheet ‘Import’ with map point IDs in the sheet ‘Data’).
Map point IDs are linked to map point coordinates and text label
coordinates.
Map point names can contain commas and symbols.
Map point ID need to be alphanumeric.

Sheet
‘Import’
√
√

Sheet
‘Data’

√

√
√

√
√

Automatically importing map points
As of StatPlanet Plus v 4.0, map points can be imported automatically from a set of longitude /
latitude coordinates. This feature is only supported in the Shapefile Edition of StatPlanet Plus.
To use this feature, a spreadsheet is required which lists the name of each map point in column
A, the latitude coordinate in column B, and the longitude coordinate in column C. For an
example, see the spreadsheet “lat-longitude_example_for_import.xlsx” included in the
Shapefile_map folder.
To import the coordinates, go to the sheet ‘Tools’ in the StatPlanet Data Editor. Then select the
button ‘Import lat/long coordinates’. The new map points should appear in the sheet ‘Import’,
in the last columns in this sheet. You can now add data to these map points, and verify that
they are correctly positioned in your map by running StatPlanet.

Add or position map text labels
To adjust the coordinates or position of the text labels, right click anywhere in StatPlanet and
select ‘Move text labels or map points’ in the menu. Click on any of the text labels to drag them
to a new position. Once you have finished moving the text labels, right click and select ‘Copy
map text label coordinates’ in the menu. In the StatPlanet Data Editor, go to the sheet
‘Settings’. Select the cell next to ‘Text label coordinates’ (variable ‘TXT-COORD’), and paste the
coordinates here. (You may also wish to modify other settings in this sheet, such as the text
font size.).
Map (lead) lines to text labels
In addition to positioning the text labels, it is also possible to include map lines (lead lines)
linking the text label to a map region (mainly used when the map area is too small to fit the
label, such as islands). Map areas for which you wish to have map lines can be set in the sheet
‘Settings’, variable ‘REGION-L’. You would need to insert the country/region codes (the codes
used in the sheet ‘Data’) separated by a space.
46

Map legend customization
The MAP column can be used to customize the map legend for each indicator. It is possible to
customize the map legend values, labels, colors, as well as the number of color categories.
See also ‘Map overlays’ below for displaying external images, for example raster maps, which
can also be set through the MAP Column.
Most types of map legends can be customized in StatPlanet itself (i.e. via StatPlanet.exe or
StatPlanet.html). The map legend customization can then be made permanent through the
following steps:
1. In StatPlanet, select the indicator for which you wish to customize the map legend.
2. Click on any of the colors and/or values inside the map legend panel in the bottom-left
corner to customize the corresponding map colors / values, as shown below.

3. Once you are satisfied with the map legend you have just customized, right-click
anywhere inside StatPlanet and select ‘Copy map legend’ from the menu.
4. Open the StatPlanet_Data_Editor file. Select the cell below the column header ‘MAP’, in
the corresponding indicator row (for which you customized the map legend). Select
‘paste’ to insert the custom map legend. If there is data for multiple time units or years,
it only needs to be pasted once - in the row for the first time unit or year in the series.
5. Click on ‘Save data’ to see the results the next time you open StatPlanet.

47

More details on customizing the map legend are provided below. If you wish to create a map
legends with custom labels (e.g. ‘high’, ‘medium’, ‘low’), please see the options described in (iv)
or (v) below.
(i) Map legend with custom values


Use the following format to specify the values for the map legend, as well
as the number of color classes:
0=[value0] 1=[value1] 2=[value2] 3=[value3] 4=[value4]
etc.



Example 1a: A legend with 4 color classes:
0=[55] 1=[40] 2=[20]



Example 1b: A legend with 5 color classes:
0=[70] 1=[65] 2=[60] 3=[55]
Map legend for Example 1b:
With max / min values
hidden

With max / min values
shown

> 70

70 - max value

65-70

65-70

60-65

60-65

55-60

55-60

< 55

min value – 55

(ii) Map legend with custom colors


Use the following format to specify the colors for the map legend, as well
as the number of color classes:
0=[color0] 1=[color1] 2=[color2] 3=[color3] 4=[color4]
etc.



Example 2: A legend with 4 color classes:
0=[0x238B45] 1=[0x66C2A4] 2=[0xB2E2E2] 3=[0xEDF8FB]

48

(iii) Map legend with custom colors and values


Use the following format to specify the colors for the map legend, as well
as the number of color classes:
0=[color0][value0] 1=[color1][value1] 2=[color2][value2]
3=[color3][value3] 4=[color4]
Note that this format is slightly different from the previous ones, because
5 colors are specified (colors 0 to 4) but only 4 values (values 0 to 3). As
illustrated in example 1b above, a legend with 5 color classes requires
only 4 values to be specified (a legend with 4 color class requires only 3
values, and so on).



Example 3: A legend with 4 color classes and custom values:
0=[0x2171B5][70] 1=[0x6BAED6][60] 2=[0xBDD7E7][50] 3=[0xEFF3FF]

(iv) Map legend with custom colors and labels


To specify text labels (instead of number values) in the map legends, use
the same approach as described in (iii) above, but add a third parameter
containing the text. For example:



Example 4: A legend with 4 color classes, custom values and custom
labels:
0=[0x2171B5][70][Very high] 1=[0x6BAED6][60][High]
2=[0xBDD7E7][50][Medium] 3=[0xEFF3FF][Low]

(v) Qualitative (descriptive) map legend


If you data set is categorical, e.g. languages spoken around the world
(English, Spanish, etc.), you need to insert a categorical or ‘qualitative’
map legend. This map type cannot be produced within StatPlanet and
therefore needs to be coded manually in the StatPlanet Data Editor, as
explained below.



To create such a map, each category label needs to be given a category
number starting from 0. Then each map area or country is assigned a
category number corresponding to the category label. In the example
below, 5 categories are defined (0,1,2,3,4) – first the category number,
49

then in brackets the corresponding color and category label:
0=[color0][label0] 1=[color1][label1] 2=[color2][label2] 3=[color3][label3]
4=[color4][label4]
etc.
Countries then need to be assigned their corresponding category
number. For example, if ‘Afghanistan’ belongs to category 0 (label 0 and
color 0), it should be given the value ‘0’.


Example 5: A legend with 8 color classes:
0=[0x377EB8][Arabic] 1=[0xE41A1C][Bengali] 2=[0x4DAF4A][English]
3=[0x984EA3][Hindi] 4=[0xFF7F00][Mandarin] 5=[0xFFFF33][Portuguese]
6=[0xA65628][Russian] 7=[0xF781BF][Spanish]



Map legend for Example 5:
Color

Label

0x377EB8

Arabic

0xE41A1C

Bengali

0x4DAF4A

English

0x984EA3

Hindi

0xFF7F00

Mandarin

0xFFFF33

Portuguese

0xA65628

Russian

0xF781BF

Spanish

Map symbols / icons and overlays
Map symbols or icons (from StatPlanet Plus v 3.2, StatPlanet Plus only)
The default StatPlanet "proportional symbol map" circles can be replaced with an external icon.
It can be referenced in the 'MAP' column for the respective indicator, in the format:
i=[insert icon filename]

For example:
i=[icon_electricity.swf]

50

The required format is ‘.swf’, which is a vector graphic format and thus maintains its quality and
appearance when stretched. Symbols in other vector formats would need to be converted to
the ‘.swf’ format using software such as Adobe Illustrator, Adobe Flash or the free Inkscape
software using the ‘SWF Output’ extension.
Map overlays (StatPlanet Plus only)
For each indicator an image can be displayed from an external image file, for example to display
raster maps. This image then replaces the ‘default’ map. The map overlay feature is currently
only available in the ‘shapefile version’ of StatPlanet Plus, but can be included in other versions
of StatPlanet Plus when a licensed version is purchased.
A map can be specified separately for each indicator in the format:
f=[insert_file_name]

For example:
f=[mymaps/map01.swf]

This will tell StatPlanet to fetch the file ‘map01.swf’ from the folder ‘mymaps’ and overlay it on
top of the existing map (if any). Please note that the path needs to be “relative” to the
StatPlanet location - it cannot point to an absolute path such as c:/mymaps/map01.swf.
The format in the above example is ".swf", which is a vector format, enabling you to zoom into
the map without loss of quality (by default the map zoom controls can be found by moving the
mouse to the bottom-right corner of the interface). It is also possible to use JPG or PNG
formats, but this will result in a loss of image quality when zooming in. If the image is available
in vector format, software such as Adobe Illustrator can be used to convert the vector format
into the ‘.swf’ format.
Setting specific map coordinates for each map overlay, customizing the position and scale, can
be done as follows:


Move the map to the desired position (using drag-and-drop and the zoom controls in
the bottom-right corner of the screen)



Copy the map coordinates (right-click -> copy map coordinates)



Paste the map coordinates somewhere in Excel. The first figure is the 'x position', the
second figure is the 'y position' and the third figure is the 'zoom'. These need to be
inserted in the ‘MAP’ column following format:

51

x=[x position] y=[y position] z=[zoom]

For example, the following sets an overlay map along with the map coordinates:
f=[mymap.jpg] x=[100] y=[100] z=[80]

Map area popup text and links
Information specific to a particular map area can be shown in a popup when the mouse moves
over this map area in the map. This information needs to be added in the sheet ‘Import’ in the
very first row in the empty cell below the corresponding country / region name10. (These cells
are empty, because data starts in the next row). Different popup text can also be displayed for
each indicator – for indicator-level popup text, please see the map popups by indicator section
below.
Popup text can be inserted either as plain text, or HTML text with formatting, for example:
My text

Links to documents or web-pages can also be specified in the row below the corresponding
country name. The document or web-page will open when the user clicks on a country for
which a link has been specified. Please note: in the latest version of StatPlanet, this requires a
‘double click’ rather than a single click. As of version StatPlanet v 3.3 this can be changed to a
single click through the variable 'DBL-CL' in the StatPlanet Data Editor, sheet 'settings', which
needs to be set to FALSE.
An example of a link would be:
http://www.mywebsite.com/document.pdf

It is also possible to have both text and a download link, by inserting the link as HTML code. For
example:
Please double click to open the
document 

10

Note: it should be below the country / region name in the sheet ‘Import’ of the StatPlanet Data Editor.
Alternatively if you are not using the StatPlanet Data Editor, they can also be inserted directly in the file
settings.csv in the column next to the country / region name.

52

Please note that the links cannot be tested in the web browser offline due to a Flash Player
security restriction. To test the links, you would need to use the desktop version
(StatPlanet.exe), or publish the files online.
To link to a local file, please use HTML code for including a link and use the format
‘file:///C:/mydirectory/myfile’ to refer to a file in the location “c:\mydirectory”. For example, Please double click to open the document 

For supported HTML tags, please see: list of supported tags.

Other map settings and options


Add a map title
Under ‘Map options’, ‘MAP-TITLE’, insert the text for the map title. The procedure for
relocating the map title is the same as for relocating any other text labels on the map: (i)
right click anywhere in StatPlanet and select ‘Move text labels or map points’ in the
menu; (ii) drag the map title to a new position; (iii) right click and select ‘Copy map text
label coordinates’ in the menu; (iv) in the StatPlanet Data Editor, go to the sheet
‘Settings’. Select the cell next to ‘Text label coordinates’, and paste the coordinates
here.



Change the default position of the proportional symbol map icons
The proportional symbol map icons can be re-positioned within StatPlanet by holding
down the SHIFT key while pressing the arrow (movement) key UP, DOWN, LEFT or
RIGHT. To change direction, release and press the SHIFT key again, when press the
corresponding arrow key. This will move all the proportional symbols in the
corresponding direction. The current position will be automatically copied to the
clipboard. To get the new coordinates, open Excel and in a new spreadsheet, click on
‘Paste’. The new X and Y coordinates should be pasted into the spreadsheet. To
permanently set these new coordinates, go to the StatPlanet Data Editor, sheet
‘settings’, and insert the X and Y coordinates for the variables ‘MAP-SYMBX’ and ‘MAPSYMBY’.



Multiple map layers
Multiple map layers are supported in the Flash map and Shapefile map versions of
StatPlanet Plus. This enables you to switch from one map to another within StatPlanet.
For example, switching from a map at the regional level to a map at the district level, or
to show changes in map boundaries over time. Please see the online tutorial for creating
multiple shapefile map layers for details. For an example of a Flash map implementation
53

with multiple layers, please see: http://www.statsilk.com/maps/create-flashmaps#multiple-map-layers.
There is also an add-on module for displaying up to three map layers at the same time
(one overlaying the other). This is currently only available in the shapefile map version
of StatPlanet Plus. For more details, please see the ‘Multiple Map Layers’ add-on
module.


Display RSS Feeds
With the StatPlanet Plus RSS Feed module installed, it is possible to display RSS feeds in
a popup window when clicking on a country or map area. Each country or map area can
have a different RSS feed. The first part of the RSS feed link or URL needs to be specified
in the StatPlanet Data Editor, sheet “settings”, variable “FEED-URL” (in the Special
Options section). This is the part of the RSS feed link which is same for each feed, for
example:
http://feeds.feedburner.com/myfeeds-



The second part of the FEED-URL can be different for each country or map area, and is
inserted in the StatPlanet Data Editor, sheet “Import”, in the row directly below the
country or map area name. It needs to be inserted in the format “f=[RSS-link]”, for
example:
f=[east-asia]

If for example you wish to display the feed http://feeds.feedburner.com/myfeeds-eastasia for Japan, and the feed http://feeds.feedburner.com/myfeeds-central-asia for
Uzbekistan, you would insert the base (first part of the URL) in the sheet “settings” as
described above. In the sheet “Import” you would need to add the extension “f=[eastasia]” in the row below Japan, and the extension “f=[central-asia]” in the row below
Uzbekistan.
Please note that the feeds cannot be tested in the web browser offline due to a Flash
Player security restriction. To test the feeds, you would need to publish it online.

6.3. Customizations at category & indicator level
In StatPlanet_Data_Editor.xls, there are several columns which can be used to define optional
parameters. The different columns and their usage is explained below.
54

Important: for multiple time period data, you generally only need to add the
unit, description or other option for the most recent period. (There is no need
to add the option for every single time period). However, described below are
also a few options which can be specified seperately for each time period.

Data source
The source of your data can be specified for each indicator, or for all indicators in a category (in
StatPlanet Plus, you can have multiple categories and sub-categories of data). The source is
indicated in the “SOURCE” column. To specify the source for the entire category, insert the
source in the first row of the category (the same row as the first year or time unit in the series).
To specify the source for an indicator, insert the source in the same row as that indicator.
You can choose to use HTML code if you want to add a link to the source website, in the
following format:
My Source.

*Important – please note:


In the HTML code above, you need to use single quotes ( ' ' ) rather than double quotes (
“ ” ).



The links do not work if you run the web version offline (the Flash platform does not
allow this for security reasons). The links will work only once the files are online. If you
wish to use or test the links offline, please use the desktop version.

Indicator/category descriptions and story panel
The DESCRIPTION column can be used to provide either popup descriptions or more lengthy
‘stories’ which are displayed in a separate panel.
Popup descriptions
Popup descriptions can be set both for categories and for indicators and appear when moving
the mouse over the category or indicator name. Indicator descriptions only need to be added
once for each indicator – for the first year or time unit in the series. Descriptions can be either
plain text or HTML formatted text.
Story panel (As of StatPlanet Plus v 3.2)
55

For descriptions or stories to be displayed in a separate panel, they need to be inserted in the
following format in the DESCRIPTION column for the respective indicator:
s=[insert plain text or HTML text here]

The text can be formatted using HTML, with support for image embedding and links to webpages or documents.
Alternatively, to load the (html) text from a file, the following format is required:
sf=[myfile.html]

Or relative to a directory:
sf=[mydirectory/myfile.html]

Optionally, the height and/or width of the panel (in pixels) can be specified. The following
example specifies a panel with a width of 300, height of 200, and an embedded image:
pw=[300] ph=[200] s=[Image description ]

56

Please note that for images to be displayed correctly, both the width and height need to be
specified. It is recommended that images are displayed at half the size of the original image, to
allow for stretching without significant loss of image quality.
Stories by time unit:
To set the same ‘story’ for ALL time units / years, you need to insert them only for the first time
unit in the series. Otherwise, different stories can be set for different time units, by inserting
them in the corresponding rows. If no story is found for a particular time unit, it will
automatically display the story from the first time unit in the series if available. To avoid this,
and display no story for a particular time unit, insert a blank story as follows:
s=[]

HTML Formatting:
For supported HTML tags, please see: list of supported tags.
Obedit is a useful free HTML editor which includes most supported HTML tags:
http://www.oblius.com/projects/obedit/preview/obedit3/ - To access the HTML code, you
would need to click on ‘Edit HTML’ from the toolbar above. This can be copied into the
StatPlanet Data Editor, but please note that double quotes would first need to be replaced with
single quotes – see below for details.
Important - please note:
 The following three symbols are not supported: ‘ " ’ and would need to be
replaced with the following symbol: '
 The bracket symbols are also not supported within the HTML text: [ ]
Indicator popup text on rollover:
To include popup rollover text in addition to the story panel text (i.e. when moving the mouse
over the indicator name), please use the following format:
pt=[insert popup rollover text]

Indicator unit
Add the unit for the indicator, for example ‘%’. Indicator units only need to be added for the list
of indicators below the first year or time unit in the series.

57

Graph options
(i) Graph axis range
The maximum and minimum values for the graph can be inserted through the “GRAPH” column
(in the corresponding indicator row). This will override the automatic values set by the
application. The minimum / maximum values need to be specified in parentheses in the format:
mn=[min-value] mx=[max-value]
For example, for a minimum value of 0 and a maximum value of 80, enter the following:
mn=[0] mx=[80]

(ii) Graph color
You can also specify the color of the graph in the format cg=[color-code], for example:
cg=[0x78C679]

(iii) Divisions / Gridlines (as of StatPlanet Plus v 3.2)
The number of gridlines can be set in the following format (the default is 4):
dv=[6]

The default number of gridlines (for all indicators) can be set through the variable ‘GR-DV’ in
the StatPlanet Data Editor, sheet ‘settings’.
(iv) Target lines (StatPlanet Plus / StatTrends Plus only)
One or two target lines (or benchmarks) can be specified for each indicator, which will be
displayed in the bar/column charts and time series graph. This needs to be inserted in the
‘GRAPH’ column (in the corresponding indicator row). An example of two target lines (t and t2)
with values 80 and 50 are shown below:
t=[80] t2=[50]

Labels (l and l2) and custom colors (c and c2) can optionally be added, for example:
t=[80] t2=[50] l=[Target 1] l2=[Target 2] c=[0x1a9850] c2=[0xd73027]

If the target values are different (variable) for each year or date, use ‘tv’ instead of ‘t’, for
example:
58

tv=[80] tv2=[50]

Below is an example of a bar chart showing mobile cellular subscriptions per 100 inhabitants in
Sub-Saharan African countries, where the target line displays the world average, using the
code: tv=[84.3] l=[Average]
through the Excel formula: ="tv=["&ROUND(AVERAGE(L5:HX5), 1)&"] l=[Average]"
(which takes the average values from L5 to HX5, and rounds it to 1 decimal place).

Below is the same example displayed using the time series graph, which shows the change in
the average over time. To get this result, the Excel formula above was copied and pasted in the
‘GRAPH’ column in the corresponding indicator row for each year.

As of StatPlanet Plus v 3.3, labels can be shown for some indicators ( e.g. l=[average] ) and
hidden for others by leaving the label blanks as follows: l=[]

Using multiple data files
(StatPlanet Plus / StatTrends Plus only).
Data can be divided into multiple files, which is particularly useful to reduce the initial
download time and only download data for a category once the user selects it. It is also useful
for very large numbers of indicators which would otherwise take long to load. The ‘main’ data
file (data.csv or data.zip) contains these links to the other data files. This file does not need to
59

contain any data, but it should have the structure of all the data files combined. Specifically, it
should contain the entire list of categories as well as indicators as contained in all the data files
combined. This is because the list of categories and indicators needs to be available on startup,
without having to load any of the other data files. For each category only one year (or time unit)
of the data series needs to be contained in the structure (so it is not necessary to repeat the list
of indicators for each year). The structure for each of the files can be created automatically
using the macro “Extract data structure” in the StatPlanet Data Editor, sheet ‘Tools’.
To link to a data file containing the data for a category, it needs to be specified in the first (top)
row of this category in the column “FILE”. For example, it can contain the file reference
“data_category2.zip”. Every other row in the main data file that does not contain data (i.e. the
data needs to be retrieved from another file) needs to have the # symbol inserted in the
column FILE. If all the data is contained in other files, the “FILE” column would contain
references to these files in the first row of each category. All the remaining rows in the “FILE”
column would contain the symbol #.
The files containing the data should follow the exact same structure as the original data file,
except that it would contain data for only one category.
Please note that data can be split into multiple files only at the category level. It is therefore not
possible to put sub-categories or indicators within one category into separate files.
An example setup with multiple files can be downloaded through the following link:
http://www.statsilk.com/files/resources/multiple_data_files.zip

General options
The “OPTIONS” column in the StatPlanet Data Editor is used to specify general options for each
indicator. Multiple options can be set for each indicator by separating the options with a space
in between, e.g.
y=[2007] r=[Sub-Saharan Africa]


Default time unit or year by category: The default time unit or year to be selected for a
particular category can be specified in the column “OPTIONS”. In StatPlanet Plus, this
would need to be inserted in the same row as the category name. In other versions of
StatPlanet, this would be the first row of data in the StatPlanet Data Editor. It needs to
be formatted as ‘y=[insert-year]’, for example:
y=[2007]

60



No division: By default, if an indicator has numbers over a million they will be divided by
1000 000, and ‘million’ will be added as the unit. To prevent this behavior for a
particular indicator, insert the following in the column “OPTIONS” in the indicator row
for the first year in the series:
nr=[nodiv]



Hide “no data” category in the map legend: To hide the “no data” category insert the
following in the column “OPTIONS” in the indicator row for the first year in the series.
nd=[h]



Change map region or group: It can be useful to change the region (StatPlanet) or group
(StatTrends) when selecting a particular category which only has data for that region or
group. To do so, specify the region name in the column “OPTIONS”, in the first row of
the category. It needs to be formatted as: r=[My region]. “My region” should
correspond to one of the map regions specified in the Excel sheet “Map regions” (in the
StatPlanet Data Editor). For example:
r=[Sub-Saharan Africa]



Custom statistics: (StatPlanet Plus only). By default the mean, standard deviation and
range statistics are displayed in a popup when moving the mouse over an indicator (if
the variable ‘V-STAT’ is set to TRUE in the StatPlanet Data Editor). It is possible to
customize what to show and the order in which it is to be shown for each indicator. In
addition, the ‘total’ can be added, which is not shown by default as it does not make
sense for all indicators (e.g. for percentages). The statistics to be displayed can be set in
the OPTIONS column, for each indicator, in the format below. The letters in brackets
are: [t] = total, [m] = mean, [s] = standard deviation, [r] = range and [-] = min/max
values:
st=[tmsr-]

The following is an example with only the mean and the total, in that order:
st=[mt]


Custom mean: The default calculated mean can be replaced with a custom value (e.g. a
weighted mean). This can be indicated in the OPTIONS column for the row of the
corresponding indicator/year, in the format m=[insert mean], for example:
m=[100]

61



Scale for indicator panel bars: The bars in the indicator panel are scaled according to
the highest value for a country or region in that indicator. This means that each
indicator bar has its own scale. However, in some cases you may wish the bars of all the
indicators to be along the same scale. In this case, insert the following in the column
"OPTIONS" in the indicator rows you wish to be along the same scale:
sc=[same]

Please note that this needs to be inserted in the rows for the first year in the series, and
that the indicators need to be in the same category.


Decimal places at indicator level: The number of decimal places to be displayed is set in
the sheet ‘settings’ in the StatPlanet Data Editor, but it can also be customized for each
indicator. To do so, insert the following in the column "OPTIONS" in the indicator rows
where you wish to set the number of decimal places (replacing ‘3’ with the number of
decimal places required):
dc=[3]

Map area popup text or clickable links
The “OPTIONS” column in the StatPlanet Data Editor can also be used to specify mouse-over
popup text for each map area, as described below.


Map area mouse-over popup text: (StatPlanet Plus only). Popup text, comments or
notes can be added to each country or map area for each indicator. These comments
need to be inserted in a separate row, below the list of indicators. The asterisk character
(*) needs to be inserted in the INDICATOR column for a comment row. To link an
indicator with a comment row, the comment row number needs to be specified In the
OPTIONS column for the indicator. The format is:
p=[1]

where [1] references the first row of comment popups. An example of two indicators
with corresponding comment rows is shown below:
INDICATOR

...

OPTIONS

Indicator 1

p=[1]

Indicator 2

p=[2]

…

Afghanistan

etc.

62

*

Comment for indicator 1

*

Comment for indicator 2

The comments themselves are added in the rows marked by the asterisk (*) in the same
way as regular data, i.e. in the map area or country columns. To set the same popup
comments for ALL time units / years, you need to insert them only for the first time unit
/ year in the series. Otherwise, different popup comments can be set for different time
units / years, by inserting them in the corresponding rows.
As of StatPlanet Plus v 3.3 it is also possible to insert links, either through a ‘plain’ link or
using HTML code, as in the examples below. By default a double-click is required to
open the link. To change this to a single click, the variable 'DBL-CL' in the StatPlanet Data
Editor, sheet 'settings', needs to be set to FALSE.

Indicator 1

OPTION
Sp=[1]

Indicator 2

p=[2]

INDICATOR

...

…

Afghanistan

*

http://www.mywebsite.com/document.pdf

*


Please double click to open the document 

etc
.

To link to a local file, please use HTML code for including a link and use the format
‘file:///C:/mydirectory/myfile’ to refer to a file in the location “c:\mydirectory”. For
example, Please double click to open the
document 

Please note that this feature only works online or in the desktop version; it does not
work in the offline web version due to a Flash security restriction.
For supported HTML tags, please see the list of supported tags.

Indicator ID (Composite Indicator module)
This column is only used when the ‘composite indicator’ module is installed. To enable the
sharing of composite indicators via a web-link, each indicator needs to have an ID specified
(which is used in the actual web-link, instead of the indicator name). Any characters or numbers
can be used for the ID, as long as they are unique. IDs only need to be specified once for each
indicator, i.e. for the first date/year in the series (so do not need to be repeated for subsequent
dates/years).

63

6.4. Data editing without Excel
The data files data.csv and settings.csv can be edited directly without using the Excel-based
Data Editor. These two files can be edited using any spreadsheet software.
The data needs to be saved as a CSV ('comma separated values') file. Please note that when
editing the files using Excel on a Mac, it needs to be saved in the ‘Windows Comma Separated
Values’ format (selectable from the drop-down in the ‘Save As’ dialogue window).

6.5. Language and translation
To change the language, see the Excel sheet 'settings' in the StatPlanet Data Editor. To modify a
translation or add a new language translation, see the Excel sheet ‘Text-Translations’.
StatPlanet is available in the following languages. See also below on how to use international
character sets such as Russian (see below).


Bahasa Indonesia (courtesy of the Government of Indonesia)



Danish (courtesy of Peter Erbs-Maibing, Research Centre for Prevention and Health,
Denmark)



Dutch



English



French



German



Greek



Portuguese Brazilian (courtesy of the Instituto Centro de Vida)



Russian (courtesy of Andrey Loschilov)



Spanish



Turkish (courtesy of Emre Koyuncu)

StatPlanet Plus also has support for non-Latin international character sets. Please note that
right-to-left fonts such as Arabic and Hebrew are not yet supported. Some fonts are not

64

supported by default (see also below for details) and are only available when purchasing a
license for the software.
To use them, please follow these steps:
1. Remove the files "data.csv" and "settings.csv" in the main directory and also in the directory
'web'.
2. In the StatPlanet Data Editor, go to the sheet "Settings". Under Startup options - Data format,
select: TXT (tab-separated values). Then click on “Save settings”.
3. For the web version, you would need to set the data and setting files to “data.txt” and
“settings.txt” as explained in Chapter 7 - Web publishing options.
The international character sets can now be used in the desktop version of StatPlanet Plus. The
web version does not include the international character set by default. This is only available in
the purchased/licensed version on request.
The following character sets are available. Please note that not all of these are embedded in the
desktop version. The Arial font Latin I character set is embedded by default in StatPlanet and
StatTrends.

















Armenian: requires a license purchase to embed the Armenian font;
Chinese (All character sets): requires a license purchase to embed the Chinese font (the
desktop version only has limited support for Traditional Chinese characters);
Croatian: requires a license purchase to embed the Latin Extended B characters.
Cyrillic: (for Russian, Serbo-Croatian and Tajik, amongst others);
Czech: requires a license purchase to embed the Latin Extended A characters.
Devanagari (for Hindi, Marathi and Nepali, amongst others): support for this font is
under development – please contact us for details;
Greek;
Japanese: requires a license purchase to embed the Japanese font (the desktop version
only has limited support for Japanese characters);
Korean (All character sets) - for the desktop version, Shapefile map edition, please
download and use the Korean StatPlanet.exe file to display Korean characters;
Polish: requires a license purchase to embed the Latin Extended A characters.
Romanian: requires a license purchase to embed the Latin Extended B characters.
Slovenian: requires a license purchase to embed the Latin Extended B characters.
Thai: requires a license purchase to embed the Thai font.
Turkish: requires a license purchase to embed the Latin Extended A characters.
Vietnamese: requires a license purchase to embed the Latin Extended Additional
characters.
Other languages: any other language which uses one of the following character sets:
Cyrillic, Latin Extended A, Latin Extended B or Latin Extended Additional.
65

6.6. Right-click menu options
When right-clicking anywhere within the StatPlanet interface, a popup menu appears with a
number of options, as described below. The text for each of these items can be customized in
the StatPlanet Data Editor, sheet “Text-Translations”. These options can be removed from the
right-click menu by replacing the text with an empty space (please note the text would need to
be replaced with an actual space ( ); not removed altogether).
Right-click menu options:

8.



Copy data: This copies the data for the selected indicator as an html-formatted table,
which can be pasted directly into a Microsoft Excel spreadsheet. Alternatively, it can be
pasted into Notepad (PC) or TextEdit (Mac) and saved as a file with the extension
“.html” (for example “mydata.html”), and then opened in any web browser. The copied
data is equivalent to what is displayed in the “data table” panel. If in the data table
panel you have chosen to display all years (dates) and/or all indicators, then it will copy
the corresponding data that is in this table (StatPlanet Plus only).



Copy map legend: This copies the current map legend (for the selected indicator), and
can be pasted into the StatPlanet Data Editor to permanently have this map legend for
this indicator. For more details, please see the section “Map options”.



Copy map coordinates: This copies the current map coordinates, and can be pasted into
the StatPlanet Data Editor to permanently make this the map coordinates (map position
and zoom level) - either for a custom region or as the default map view when StatPlanet
is launched. For more details, please see the section “Custom ‘zoom-to’ map regions or
groups”.



Copy map text label coordinates: This copies the coordinates of the text labels
displayed on the map, which can be modified by dragging the text labels to new
positions. For more details, please see the section “Add text labels and position the text
labels on the map”.



Copy map point coordinates: This copies the coordinates of the map points, if any. For
more details, please see the section “Add map points”.
Move text labels or map points: This enables the text labels or map points to be moved
by dragging and dropping them to a new position. Once this option is selected, you can
click on any of the text labels and hold the mouse down to drag them to a new position.
Not only the map text labels can be moved, but also the text labels in the scatter plot
66

graph. However, the map text label coordinates can be saved, but the scatter plot text
label coordinates cannot (so this positioning is temporary, to optimize the appearance
prior to exporting the graph).
Please note that the operation for map points is slightly different. Instead of clicking on
a map point and holding down the mouse button, just click on the map point (and
release the mouse button). The map point will now go along with your mouse cursor.
Move the map point to the desired location, and then click once again to ‘drop’ the map
point here. Please note that this option when activated disables moving the map (see
also below to enable moving the map again).


Stop moving text labels or map points: This option appears after you have selected
“Move text labels or map points”, and can be used to disable this option. The map can
then be moved again.



Create and copy index of links (HTML): This option automatically generates an HTML
formatted list of links to indicators in StatPlanet / StatTrends, ready to be embedded
inside a web page. For more details please see the section “Creating an index of
indicators in StatPlanet / StatTrends”.

67

7. PUBLISHING
To publish StatPlanet or StatTrends online, just copy and paste the entire contents of the 'web'
directory to any location on the web server. The application can then be run through the file
'StatPlanet.html' or ‘StatTrends.html, respectively, wherever this file is located on the web
server.
For publishing in a Content Management System (CMS) or using DropBox, see also:
 Publishing using DropBox
 Publishing in a CMS (e.g. Drupal or WordPress)

7.1. Web publishing options
By default, StatPlanet Plus and StatTrends Plus use the files data.csv and settings.csv. However,
you can change the names of the data and settings files. For an example, please see the file in
the ‘web’ folder called ‘StatPlanet_options.html’ (for StatPlanet Plus) or
‘StatTrends_options.html’ (for StatTrends Plus). It contains the following code:
flashvars.data = "data.csv";
flashvars.settings = "settings.csv";
It can be useful or necessary to set the names of the data and settings files in the following
scenarios:


When using a non-Latin character set, which requires the TXT (tab-separated values)
data and settings format. For more details, please see the section “Language and
translation”. In this case, the data and settings files would be indicated as follows:
o flashvars.data = "data.txt";
o flashvars.settings = "settings.txt";



When you have multiple instances of the application on the website, with different data
and/or settings. By specifying the data/settings files, there is no need for having
multiple instances of the application itself, and visitors will also only need to download
the application once (as long as it is still cached by the web-browser).

68



When you have multiple language versions of the application, you can set the data and
settings file according to the language selected (e.g. “data_es.csv” and “settings_es.csv”
if the Spanish version is selected).



Other custom settings for different instances of StatPlanet aside from language – for
example, having StatPlanet open up in a different region (which can be defined in the
settings file), or with different interface options – for advanced and novice users.



When ZIPPING the data file to reduce the size. In this case, the data file would be
indicated as follows (see also the section below – reducing the download size of the
your web application):
o flashvars.data = "data.zip";

7.2. Reducing the download size of your web application
The application is optimized to keep the file size as small as possible. The following is a list of
measures which can be implemented to reduce the file size of your interactive maps even
further:
1. ZIP the data file(s): this can reduce the file size by as much as 70 percent. If you wish to
ZIP the data file, it needs to be specified in the embedding code. An example is included
in the folder ‘web’, file ‘StatPlanet_options.html’. The embed code would need to
indicate the following line:
'flashvars.data = "data.zip"
(or any other filename as long as it has the “zip” extension, e.g. “mydata.zip”).
2. Split the data file into multiple data files: splitting a large data file into multiple smaller
files is the optimal way of reducing the download size. Only data corresponding to the
user’s interest would be downloaded – on selecting an indicator. For more details, see
the section “Using multiple data files”. If you use multiple data files, these can also be
zipped.
2. Decimal places: file sizes can sometimes be reduced by 50 percent or more if you round
numbers to one or two decimal places. A macro is included in the StatPlanet Data Editor
for rounding all the numbers in the Excel sheet ‘Import’ to two decimal places. The
macro is called “RoundToDecimalPlaces” and can be adjusted as required.
3. CSV file format: the CSV file format was chosen because it keeps the size of the data file
to an absolute minimum, because data values are separated only by commas. In
69

comparison, XML files are often several times bigger when containing the equivalent
amount of data.
4. No duplication: indicator names and descriptions do not need to be duplicated in the
data file. If you are using the StatPlanet Data Editor, any duplicate indicator names will
automatically be replaced with the ‘-‘ symbol. Indicator names only need to be indicated
for the very first year (or time unit) of a data series. For indicator descriptions,
duplication can also be avoided – see the section “Indicator Description” for more
information.
5. Reduce map size (shapefile version only): the maps themselves are often much bigger
than StatPlanet and the data files combined. GIS software can be used to reduce the
level of map detail. There is also a free utility called MapShaper – www.mapshaper.org.
To simplify the map, upload the shapefile (e.g. map.shp), select the percentage
simplification in the bottom of the screen, and click on ‘export’ in the top-right corner of
the screen. Select the first export format – ‘Shapefile – polygons’, and click on ‘create.
Within a few moments, the download link will appear below. After downloading the file,
use it to replace the existing shapefile map (map.shp). The map.dbf file does not need to
be modified.

7.3. Creating an index of indicators in StatPlanet / StatTrends
It is possible to automatically generate an HTML formatted list of links to indicators in
StatPlanet / StatTrends, ready to be embedded inside a web page. For an example, see the
StatWorld list of interactive maps. This can be done by following these steps:
1. In the StatPlanet Data Editor, sheet ‘settings’, set the variable MOD-INDEX to TRUE.
2. For the variable 'SITE-L' (just below), insert the complete URL of where StatPlanet is located
in your website, e.g. http://www.mywebsite.com/statplanet/statplanet.html
3. Open StatPlanet, right-click, and in the right-click menu select 'Create and copy index of
links (HTML)'. This is HTML code which can be pasted into any web-page to display the links.
4. The final step is to ensure that links in the URL (web address) can be passed on to
StatPlanet/StatTrends. The file 'StatPlanet_options.html' in the folder ‘web’ already has the
code in place to do so. The following line of code passes on the link in the URL to
StatPlanet11: flashvars.location = getURLParam("l");
11

See also the javascript function ‘getURLParam(strParamName)’ in the same file.

70

This code can be customized to suit your own purposes (see also the footnote below for a
PHP example).12
An example link to a particular indicator in StatPlanet is as follows:
http://www.statsilk.com/maps/world-stats-opendata?l=internet%20subscribers%20per%20100%20inhabitants
which goes directly to the map for Internet subscribers.

7.4. Creating custom links to indicators
Through the following steps, you can enable users to create and share links to the currently
selected indicator, graph and time period:
1. In the StatPlanet Data Editor, sheet ‘settings’, set the variable ‘V-I-LINK’ to TRUE. This will
display the link icon within StatPlanet or StatTrends. Clicking the icon will generate and copy to
the clipboard a link which can be shared, as described below.
2. In the same sheet, for the variable ‘SITE-L’, insert the complete URL of where StatPlanet or
StatTrends is located in your website, e.g.
http://www.mywebsite.com/statplanet/statplanet.html
3. The final step is to ensure that links in the URL (web address) can be passed on to
StatPlanet/StatTrends. The file 'StatPlanet_options.html' in the folder ‘web’ already has the
code in place to do so. The following line of code passes on the link in the URL to StatPlanet :
flashvars.location = getURLParam("l");
This code can be customized to suit your own purposes (see also the footnote below for a PHP
example).
To automatically generate links for all indicators, please see 7.3 above.

12

A PHP example of getting the URL indicator is as follows, where the information is captured in the variable '$l ':

if (isset($_GET['l'])) {$l = $_GET['l'];} else {$l = "";}
And the information is passed on as followed, along with the other embedding parameters:
 ….end code'); ?>

71

Three options can be set as parameters: (i) the indicator name (from the ‘INDICATOR’ column),
(ii) the graph or visualization type, and (iii) the time period (from the ‘TIME’ column), in the
following format:
http://www.mywebsite.com/mystatplanet location?l=Insert indicator
name;vInsert visualization number;tInsert time

For example:
http://www.mywebsite.com/mystatplanet location?l=myindicator;v2;t2009

The visualization types are as follows (in the same order that they appear in the graph panel):
v1=column chart; v2=bar chart; v3=line chart; v4=vertical bubble chart; v5=scatter plot
As of StatPlanet Plus v 4.0, the map area codes can also be included for pre-selection, for
example (separated by commas):
http://www.mywebsite.com/mystatplanet location?l=myindicator;v2;t2009;
s;;AND,AGO,AIA,ATG

72



Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.5
Linearized                      : No
Page Count                      : 72
Language                        : en-AU
Tagged PDF                      : Yes
Author                          : f.cappelle
Creator                         : Microsoft® Word 2013
Create Date                     : 2015:03:21 14:35:24+11:00
Modify Date                     : 2015:03:21 14:35:24+11:00
Producer                        : Microsoft® Word 2013
EXIF Metadata provided by EXIF.tools

Navigation menu