Plotting data on maps is a specialised area that is quite different from normal graphing. The article here tells you about the sorts of data that we can present using maps and ways in which we can use maps in constructing data visualisations.
The Maps module is not part of the initial installation of iNZight. It downloads and installs automatically the first time you try to launch it by going to the Advanced > Maps
The iNZight Maps module can handle two types of data, Coordinate data and Regional data. The first step is to tell the program whether you have Coordinate data or Regional data.
The program behaves differently depending on this choice. The documentation deals first with Coordinate data and then with Regional data.
The nzquakes data obtained available from File > Example data and selecting the Maps module is an example of coordinate data. The NSSATS data also available there, is an example of regional data (data about US states).
iNZight will try to guess the Latitude and Longitude variables automatically, but you will have to select them manually if they have nonstandard names.
Once you've selected those, click OK and iNZight will now plot your data on a map (it may take a little while for the underlying map to download)
[This only works if you are connected to the internet because iNZight Maps downloads appropriate Stamen map tiles (via ggmap) to form the background of the plot]
Plot appearance can be changed and information about other variables added to the plot using the following controls.
iNZight Maps downloads appropriate Stamen map tiles (via ggmap) to make the background of the plot
Map-type: options are terrain (default - coloured terrain map with some features named), terrain-background (no added names), toner-lite (white map on grey background) and toner (white map on black background).
Overall point size (Slider): scale everything drawn on top of the plot/map to a chosen multiple of their current sizes (default =1)
Either choose a ...
Point colour: select a single colour to apply to all of the points
Or select the names of a ...
Colour by variable to differentially colour points according the values of the chosen variable.
Additional options which appear once a Colour-by variable has been selected:
Overall (slider): Multiply the current size of each point by value chosen (default value 1)
Size by: Select a variable to differentially size the points by (i.e., size according to the values of the chosen variable)
Additional option which appears once a Size-by variable has been selected:
Overall (slider): Adjust the transparency levels of all of the points uniformly (default value 0 = no change; maximum makes all points completely transparent)
Opacify by: (Opacity is the opposite of transparency) Select a variable to differentially set the opacity the points by (high values map to most visible, low to most transparent)
Additional option which appears once a Opacify-by variable has been selected:
Symbol: Select from circle, square, diamond, triangle and inverted triangle
Filled in symbols (check-box): Click to fill in all symbols
Symbol by: Can be done according to a categorical variable which has 5 or fewer categories
Connect points with lines (check-box): Check the box to draw lines between points. Connected in the order they appear in the data file.
Additional options which then appear:
● Line colour (selection box);
● Line width: (slider)
Works the same way as in the main part of iNZight, you can generate subsets by selecting a variable from either one or both of the subset menus.
Subset selection sliders and play buttons appear once a subset-by variable has been selected.
When you click on the Interactive plot icon (immediately above), iNZight makes a temporary interactive html file and opens it using your default browser.
To save a permanent file, click on the Save Plot icon, or go Plot > Save Plot.
Choose the interactive HTML as your file type.
These files work independently of iNZight
In many cases, you might have data with regional information (where "region" can be countries, states, provinces, electorates, etc.).
iNZight allows you to display this information on a map of outlines, with each region coloured according to the value of a chosen variable. (Some alternative representations are also catered for.)
Choose either Use Inbuilt Map (default) to use one of the maps already in iNZight
(choose from a selection of maps of Continents, several Countries, and World maps)
or Import Shapefile to start up a dialog for reading a shape file stored on your computer
Double clicking on a map name in the Use Inbuilt Map section will plot a preview of the map in the plotting area and display a brief description of the map.
Then click … Import Map
When a map has been imported, iNZight will also try to find a variable in your data file which best matches one of the region-naming variables on the map. It will display the names it has found beside Data variable and Map variable. Selection boxes allow you to select replacement variables for these two roles.
It will also draw the map. Regions for which data is present in the data set are shaded green.
Any Regions which have no data are shaded orange.
Unmatched Data:
The names of any Regions in the data that are not represented in the map will be listed here once the map has been imported. You can decide to use the map anyway or exit maps and go back to your data to do something about the non-matching names.
Multiple observations for each region were found: (only appears when this is true)
This often happens when, for example, we have observations for a region for several different years with different years corresponding to different rows in the data set.
The module will then try to find a variable that "explains" the multiple observations. We call this a "sequence variable".
Use Map (Button): Click to tell the program "I want to use this map"
If you are using this module for the first time it is best to ignore the Map Options and Extra Plot Options paragraphs initially and see how the plotting of variables works. So that is what we are going to discuss next.
Click on the name of the desired variable and it will display on the map
If you select several variables you will get a map plot for each of those variables …
Regions radio button gives shaded maps …
Centroids radio button gives …
Additional options that become available when Centroids is turned on:
Size by: (typically use a relevant population-size variable)
Overall size (slider): makes the disks bigger or smaller uniformly
Transparency of map (slider): transparency of map outlines
Current Map: Opportunity to change your mind and select a different map
Regional selection boxes: use to remove regions from the plotted map
Projection (dropdown list): Opportunity to change the map projection (default is the projection suggested by the shapefile)
Plot Title: change plot title
Palette: change colour palette
Check boxes: Dark (makes sea go dark), Grid Lines (use to add), Axis labels (use to add)
Map Scales: Choices for independent scales/same scale to be used across a set of plots
Font Size (slider):
Region Labels (check box): add labels
Additional options that become available when Region Labels are turned on :
Selection box for selecting variable to use for labelling
Region label font size: (slider)
(only appears when this is true)
When you click on the Interactive plot icon (immediately above), iNZight makes a temporary interactive html file and opens it using your default browser.
To save a permanent file, click on the Save Plot icon, or go Plot > Save Plot.
Choose the interactive HTML as your file type.
These files work independently of iNZight
Shapefiles are a method of storing geographical data for use in GIS (geographical information systems) or similar software. Despite the singular name, shapefiles are actually a collection of files that each correspond to a particular aspect of the data. Three files are mandatory:
Most shapefiles will have additional files containing other information such as map projections or indexes of the spatial distance between geometries. Shapefiles are typically stored in separate directories for each map, with all the files that make up the shapefile contained within a single directory. Shapefiles are generally distributed on the internet as archive files, e.g. ZIP files. Currently these have to be decompressed to use in iNZight.
Other shapefile-information file formats that can be used in iNZight are GeoJSON and TopoJSON files. These are a single file that stores much the same information as a shapefile by storing a geometry and set of properties for each feature in the dataset. GeoJSON can be used in most GIS software and is a standard format for web-based mapping technologies such as Leaflet. TopoJSON is a closely related format that includes topology and typically has file size that is smaller than GeoJSON as TopoJSON only stores one copy of any borders that are shared by two countries.
***Coming (Daniels's notes):