Preparing CSV file¶
File types¶
Important
CSV files must be comma delimited and comply to the UTF-8 standard.
Data types¶
SMS CSV Charts is able to distinguish data types per column. Value and text types supported are:
String (text)
Integer (-2, -1, 0, 1, 2, 3)
Float (0.314, -50.8045, 5.5)
Boolean (True, False)
Important
Do not mix data types per column (field). Mixing data types will result in values being interpreted as a string (text). Values will not read correctly, or the importer will result in an error. See figures below for correct use of data types.
Required fields¶
At a minimum your CSV file should contain a name field and a value field.
Name field¶
The sample data above uses “Food Item” as the name field.
The name field is needed to map data and also to name instances on the chart.
The values in each record must be unique.
Optionally include a short name field as this is easier to manage in the chart area.
Value field¶
The value field is needed to set various parameters on the chart.
The values in each record does not have to be unique.
Value types supported are float or integer.
The sample data above could use any of the fields as the value, except the “Food Item” field.
Optional fields¶
Index¶
An index field can be useful to keep track of records during chart setup.
Coordinates¶
Longitute(X), lattitude(Y), and elevation(Z) can optionally be used to map chart objects.
Preparing multiple CSV files for animation¶
If you want to create keyframes on comparative values, you will require two or more CSV files.
For example, The sample csv data in the figure below contains the population values for the year 2019. A second csv file contains the population values for the year 2024. The values must be placed in the same column as the first csv.
Important
Do not rename fields in the second csv file. In this example I use the term Population. It might seem to make sense to rename the “Population” field in CSV 1 “Population 2019” and in CSV 2 “Population 2024”. This will result in the data update property failing.