Make Marvellous Maps

Screen Shot 2017-08-08 at 19.05.55

We’ve recently upgraded our map visualisations, in a few ways:

  • data points can now have different sizes as well as colours, depending on fields of your choice
  • address recognition has been improved
  • the map background has been made grayscale so data points can be more easily seen

How to set up a map

  1. Open or create a view with address data in it. If mapping more than a couple of dozen data points, the view needs to contain a column for postcode, currently only UK postcodes are supported (though other data can be mapped – see below).
  2. Open the view and click the visualisations button (chart icon) on the left
  3. Under ‘map by postcode field’ on the right, choose the field in the view that contains the postcode (it will usually be called ‘postcode’)
  4. Optionally, select a text field to ‘colour by’. Each separate value in this field will get a different colour, so status fields are a good option for example
  5. Optionally, select a numeric field to ‘size by’. Larger numbers will get larger diameter circles. The system will automatically normalise the sizes so that none come out too massive or tiny

Address recognition

Some addresses in your system may not contain postcodes, either because they’re overseas or the address is incomplete. That’s no problem for a few cases, the system will query an address service ‘nominatim’, which powers www.openstreetmap.org

If your view contains other address fields, e.g. address 1, address 2, town, city or country, the system will build up the address to query by joining these fields together, from left to right in the view. The service has strict limits on the number of queries, so we can only do 15 or 20 at a time (exact limits may be subject to change), with a short delay inbetween each. However, we do cache the results in our database, so future calls to the same information won’t need this querying, each address will only ever need to be looked up once.

Note: we used to use Google Maps for this querying, but Open Street Maps has proved more accurate for the UK.

If you want to exactly specify which fields your ‘fallback address’ is built from, you can create a calculation and use that as the ‘postcode’ field. It could look something like

coalesce({postcode}, {city} || ', ' || {country})

if for example you wanted to fall back to city and country if postcode was blank.

 

 

 


Source: Agilebase