While you may have all your data already in an ArcGIS Online feature service in some instances you may not. Being able to load CSV data can be very useful as it saves having to republish a feature service or allows you to add data for a feature service that your are unable to republish i.e. someone else’s.
What is a CSV file?
A CSV file is a simple text file that contains the attribute data in a comma-delimited format. The file extension must be .csv. The easiest way to create a CSV file is to to use a spreadsheet software such as Microsoft Excel to organise your data and then save it as a CSV file. Please note that only single worksheets can be saved into CSV format.
The structure of the CSV file
The first row of your CSV file contains the column headers. They don’t have to be your exact indicator names but you should be able to recognise what they are so that you can use them to build your report. You should avoid using commas in the column headers as this will lead to issues within Report Builder.
Please ensure that the first column contains the feature codes. These must match the codes of your ArcGIS Online feature service. You don’t need the feature names in your CSV file but it may be good to have them in there as a reference for you. The following columns to the right contain the indicators.
Here a simple example:
It is possible to include data for any comparison areas you may wish to display in your dashboard. Also you can pre-define time series data in your CSV file; please read the relevant sections for further information.
How to add the CSV file to Report Builder
First you should upload the CSV file into your ArcGIS Online account, so you can use it within Report Builder.
Open your report in the Report Builder Editor and click on the ‘Report Settings’ tab on the left hand side. Before adding the CSV data, you should ensure that you have set the correct Feature ID field in the Report Properties. Remember that the first column in your CSV data must match the values in your Feature ID field.
Remember that your CSV data must have a column named the same as the Feature ID field from your feature service. This column needs to contains matching feature codes.
Once this is done, select ‘Organise Data’ which will open up your current master dataset. Then click on the ‘Add Data’ button and select ‘CSV’.
The next dialog will ask you to browse to your CSV file within your ArcGIS Online account.
In a second step it will list all indicators it can find in the CSV file and ask you to confirm that you would like to add them.
Once added the additional CSV fields will appear in your master data set ready to be included in your report.
If you update the data in a CSV file through ArcGIS Online, the updated values of existing indicators will automatically appear in your report. However you have to ensure that the column headers are named exactly the same as in the original CSV file.
Using the button , you can add multiple CSV files to your data manager. A CSV data source can be removed by clicking on the delete icon underneath the file name and path in the ‘Organise Report Data’ dialog.