Creating the Data Files

This section describes the process for generating data files for a multiple geography report. We recommend that you manage the indicator data for each base geography in a separate Excel workbook. You will then export the data from each workbook separately and perform a merge. You can have the same or different datasets for each geography. If you have the same datasets then the data selection will be preserved when you change geography, whereas if you do not have the same datasets then there will be a mismatch between which data is selected when you change geography.

image7 Note that the geography names given in cell B2 of the Geography and Filters worksheet must be unique, e.g. each base geography needs a unique name.

image27 If the areas in your geographies nest, you may wish to include filters that reflect this nesting. In this way, geographies lower in the hierarchy can be filtered according to which area in a higher geography they nest within. For example in a report with Edinburgh post code districts and post code sectors it makes sense to include a Districts filter in the post code sectors workbook. A filter that is available at multiple geographies will stay applied as you switch between these geographies.

image27 If you want the map palettes to vary based on the visible base geography and its associated data, please see section ‘Setting Custom Legends’ in the Excel Data Manager area or section 3.8.2 of the Access Data Manager User Guide.

As a first step, you need to export a data file from each workbook separately.

If you are using the atlas-launch.html file to view your report locally, there are a few things to be aware of:

  • At the point of exporting each workbook separately, you do not need to create the data files for local use as these files are not used directly by the report but are merely an intermediate step.
  • It is important that you untick the box ‘Use Theme Files’ on the ‘Advanced’ tab as otherwise the report will not load locally when using the atlas-launch.html file.

 

It is imperative that the data files for the geographies are named in a way that matches their order on the ‘Choose Your Base Geography’ screen of the Publisher. We recommend you name them ‘data1.js’, ‘data2.js’, ‘data3.js’,… where ‘data1.js’ is the JSON file for the uppermost geography, ‘data2.js’ is for the next one down and so on.

The next step is to merge these files into a single data.js file. The Excel Data Manager add-in provides an ‘IA Merge Files’ button for this.

Click this button. The ‘Select files to be appended’ dialog allows you to browse to the folder containing your data files. Select the files by clicking and holding down the ‘Shift’ or ‘Ctrl’ keys on your keyboard. Then click ‘Open’.

The files will be appended in the order they are named (alphanumeric) and, as mentioned above, this must match the order of the geographies on the ‘Choose Your Base Geography’ screen of the Publisher.

The Excel Data Manager will ask you to save the merged data.js file. Browse to the folder containing your report and overwrite the existing data.js file. You will then be asked if you wish to create the local data file.

If you are still in the process of creating and designing your dynamic report and you are using the atlas-lauch.html file to open the report locally, you should select ‘Yes’. As mentioned above this local file will only work if you had the ‘Use Theme Files’ option on the ‘Advanced’ tab of the ‘Output Options’ dialog unticked.

You can now start the report locally (double click the atlas-launch.html file) to view the result.

Once you are happy with your report and you wish to prepare it for upload to a webserver, you should consider running through the above process again. This time you may wish to activate the ‘Use Theme Files’ option on the ‘Advanced’ tab of the ‘Output Options’ dialog. At the step of merging the individual data files together,  select the ‘No’ option when asked if you wish to ‘Create Local Data File’. This will ensure that the report uses theme files when opened from a webserver using the atlas.html file. Using theme data files improves the initial loading time of you report as the report only needs to load the data of the first theme when it is first opened. Please see Exporting Data Files for further information on theme data files.