Map Maker |
![]() |
|
![]() |
1. | ![]() |
Download | Download StatPlanet Map Maker and extract the files to your computer. |
2. | ![]() |
Open | In the folder 'World_Map', open 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. |
4. | ![]() |
Save | Press the 'Save data' button. This saves the data to the file data.csv. |
5. | ![]() |
View | Click on StatPlanet.exe ![]() |
6. | ![]() |
Publish | Copy the contents of the folder 'Web' to your website to publish it online. |
|
For a shorter video, see Create an interactive map in 60 seconds
Contents of StatPlanet_Map_Maker.zip:
- Docs
- User Guide (User_Guide_StatPlanet.pdf)
- StatPlanet Map Maker Software License (License_Terms.pdf)
- World_Map
- Create interactive maps using the included World Map.
- USA_Map
- Create interactive maps using the included USA Map.
- Custom_Map
- Design or import a map using the map template (map.fla).
(requires Adobe Flash CS3 or higher)
- Includes an example map (map_example.fla), a province map of Kenya.
Publish your data visualizations online:
To publish StatPlanet Map Maker online, all you need to do is to upload the contents of the folder Web to the website (web-server). This folder contains the following files:
- StatPlanet.html (the webpage which displays your interactive map)
- StatPlanet_small.html (alternative with smaller map embedded in a webpage)
- StatPlanet.swf (file which shows loading progress)
- content.swf (the actual software)
- data.csv (data in comma-separated values format)
- settings.csv (settings in comma-separated values format)
- swfobject.js (required to run Flash content)
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.
See also these Excel help pages for Excel 2007 or Excel 2003.
User Guide - Table of Contents
* Download the full StatPlanet User Guide (PDF)
- A: Importing data
- B: Troubleshooting
- C: Decimal point
- D: General settings and customizations
- E: Customizations and metadata at category & indicator level
- F: Country specific information and/or links
- G: Adding data for other map areas or regions
- H: Custom ‘zoom-to’ map regions
- I: Adding data directly (with or without Excel)
- J: Language and translation
Using the included StatPlanet Data Editor, it is possible to import data automatically (see also adding data manually). The Data Editor is Excel-based, so data can be imported from many different file formats (including CSV, TXT, XLS, XLSX, DBF and HTML).
The Data Editor automatically recognizes the structure of the data in the file being imported. It also recognizes the vast majority of the many possible variations of country names. The import should therefore go smoothly in most cases without having to make any changes to the data file.
The Data Editor uses the names in the Excel sheet ‘Import names’ and looks for corresponding names and statistics in the data file (in the world map version, this sheet contains country names, but it can also contain for example region names or district names, depending on the map used). The Data Editor automatically restructures the data in the format that is accepted by StatPlanet.
A criterion for the import to be successful is that any country name only appears once in the data file being imported. 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 country names and statistics are too far down in 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.
Headers not recognized
Headers (or variables) 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. Then, run the import macro again to import the data correctly.
Note that the import macro removes spaces in country 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 country names use upper or lowercase does not matter. The data import macro 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.
- See also: Error on pressing 'Save' Button
The following issues can cause the import to fail:
- Spelling of country names: If the spelling of any of the country names cannot be identified, the data for these countries will not be imported. See the text above to solve this problem.
- Merged cells: Most commonly the merged cells are 'headers' For example, two columns or rows of data may have the same header (e.g. "Life Expectancy"). To fix this problem, split the merged cells (Right click -> Format Cells -> uncheck the box 'Merge cells'). One of the two cells will now be empty, leaving one of the columns (or rows) without a header. To fix this, copy and paste the header into the empty cell as shown below.
Life Expectancy2000200576765962Life ExpectancyLife Expectancy2000200576765962
- Country names appear more than once: If country names appear more than once in your data file, the import macro will only import the data associated with the first one. The easiest way to fix this problem is to create separate files for each list of country names, and import them one by one.
- No year indicated in the data file, or cannot be detected:
All indicators are arranged according to year. You need to add the year to your data set as the header of a row or column (depending on how your data is structured). Alternatively, you can import the data and add the year 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 YEAR column. Leave the neighbouring cell in the INDICATOR column blank;
- Note that the YEAR column should be blank in the cells next to the indicators:
YEARINDICATOR2000indicator1indicator22001indicator1indicator2
StatPlanet reads a "dot" as decimal separator (for example 0.75), and a "comma" as a thousands separator (for example 1,000). This Wikipedia article on decimal points explains the notational system used in different countries.
D: General settings and customizations
General settings for customizing StatPlanet can be found in the Excel sheet ‘Settings’. After making any changes to the settings, press the button Save Setting. You can try out most of the different options ‘live’ in StatPlanet through the general options panel and the map legend options panel. See below for customizing StatPlanet at an indicator or category level (for example, specify different map colors for different indicators).
E: Customizations and metadata at category & indicator level
- Data Source
The source of your data can be added in the same row as the year in the column “SOURCE”. It only needs to be added for the first (highest) year in the series. In StatPlanet Plus, it can be specified for each category or sub-category of data.
You can choose to use HTML code if you want to add a link to the source website, for example:
<a href=’http://www.mysource.com’>My Source</a>.
Make sure you to use only single quotes ‘-’ rather than double quotes (“-”), as double quotes are used to indicate the presence of commas (the data.csv file is a comma separated values file).
- Indicator Description
Add a description for each indicator in this column, which will appear as a popup in StatPlanet when moving the mouse over the indicator.
The description only needs to be added for the list of indicators below the first year in the series. If you have two or more indicators with the same description, you only need to enter the description once. For the other indicators, instead of a description enter the Excel row number (in the sheet ‘Import’) where the description you want to re-use is located.
- Indicator Unit
The unit for the indicator, for example ‘%’.
- Customize Map
In this column you can customize the map legend for each indicator. It is possible to customize the map legend values (either text or numbers), colors, as well as the number of color categories.
The map legend can be customized in StatPlanet itself, and then copied and pasted into the data file. In StatPlanet, select the indicator for which you wish to customize the map legend. Then click on any of the colors or values inside the map legend panel in the bottom-left corner to customize the map. 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. 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 years, this only needs to be pasted in the row for the first year in the series. Click on ‘Save data’ to see the results the next time you open StatPlanet.
More details on customizing the map legend, including how to create a qualitative map, are provided below. If you wish to create a qualitative map legend (based on categories such as ‘high’, ‘medium’, ‘low’), rather than a quantitative legend (based on numeric value ranges), you need to follow the approach described in (iv) below.
- 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:
|
|
|
|
|
|
|
|
|
|
|
|
- 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]
- 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][3] 1=[0x6BAED6][2] 2=[0xBDD7E7][1] 3=[0xEFF3FF]
- Qualitative (descriptive) map legend
- Use the following format to specify the map legend colors, the corresponding labels, as well as the number of color classes. Countries are assigned a value which corresponds to one of the numbers below. For example, if the country ‘Afghanistan’ is given a value of ‘0’, it will be associated with ‘color0’ and ‘label0’.
0=[color0][label0] 1=[color1][label1] 2=[color2][label2] 3=[color3][label3] 4=[color4][label4]
etc. - Example 4: 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 4:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Customize Graph
If you wish to use your own maximum and minimum values for the graph, you can set them in the “GRAPH” column. Specify the minimum / maximum values in parentheses in the format: [min-value][max-value]
For example, for a minimum value of 0 and a maximum value of 80, enter the following:
[0][80]
You can also specify the color of the graph in the format [color-code], for example:
[0x78C679]
To specify minimum / maximum values as well as color, use the format
[min-value][max-value][color-code], for example:
[0][90][0x78C679]
- Link To Other Data Files
(StatPlanet Plus only). The column “FILE” is used to link to other data files, when data is spread out over multiple files This is useful to reduce the initial download time, and only download data for a particular category when a user selects this category. To load data for a particular category from another file, specify the file name in the top row for this category, for example “data_category2.csv”.The file can also be inside a ZIP, for example “data_category2.zip”. Each data file has the same structure as the original data file.
- Default year: It is possible to specify the default year to be selected for a particular category. To do so, specify the year 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.
y=[2007]
- 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 behaviour for a particular indicator, insert the following in the column “OPTIONS” in the indicator row for the first year in the series:
nodiv
- 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:
samescale
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.
- Data type
The column “TYPE” will be used to specify the data type in future versions of StatPlanet. This will enable additional interface and visualization options.
F: Country specific information and/or links
- Country-specific information can be shown in a popup when the mouse moves over the country on the world map or in the graph panel. This information needs to be added in the very first row in the empty cell below the corresponding country name. (These cells are empty, because country data starts in the next row).
You can insert plain text, or HTML text with formatting, for example:
<font size="15" color="#347C17">My text</font>
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. 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:
<a href=’http://www.mywebsite.com/document.pdf’>Insert additional information here</a>
G: Adding data for other map areas or regions
StatPlanet Map Maker comes with a map template for importing your own map. This requires Adobe Flash CS3 or later. For more information, see importing your own map into StatPlanet.
See below if you wish to add a few territories using the included world map.
Adding territories (or other categories of data) to the world map version:
You can include new territories (or other data categories, such as averages) in the world map version of StatPlanet Map Maker, which will appear in the 'graph window'. This can be done as follows:
- Open StatPlanet_data_editor.xls and in the worksheet "Import" go all the way to the last country at the end of row 2.
- In the empty cells in row 2, add the names of your new data types (for example “Sub-Saharan Africa”).
- Press the button Save data. The names of your new data types have now been added.
You may also wish to download StatPlanet Graph Maker to visualize other kinds of data.
H: Custom ‘zoom-to’ map regions
You can add, remove or change the region names in the worksheet ‘Map regions’. For example, in a world map a custom region could be Africa. Clicking on Africa from StatPlanet’s region selection drop-down menu would zoom into the African continent and display map and graph data only for African countries.
Map regions have the following elements:
- Name (col. 1): The names of the map regions you wish to define.
- Map coordinates (col. 2-4): 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 only): Insert a link or URL, for example to link a map name with another copy of StatPlanet with this map embedded.
- 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). The codes for each country or map area can be found in the top row of the sheet ‘Data’. To add countries or map areas to a custom region, add the codes in columns 7 onwards without leaving any empty cells between them.
I: Adding data directly (with or without Excel)
You can edit the data files data.csv and settings.csv directly without using the Excel-based Data Editor. These two files can be edited using any spreadsheet software.
J: 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:
- 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