Skip to content

openairmaps 0.8.1

Compare
Choose a tag to compare
@jack-davison jack-davison released this 15 Dec 13:40

These are items associated with the development version of {openairmaps}.

Breaking changes

  • BREAKING: The arguments of addPolarMarkers() have been rejigged to move "data" after "pollutant", owing to the new use of leaflet::getMapData(). (#45)

  • BREAKING: The default arguments of some polarMap()-family functions have changed from, e.g., NULL to "free" or "fixed". (#34)

  • BREAKING: Due to changes in {ggmap}, all static polar plotting functions now require users to provide their own ggmap object. The zoom argument has also been removed. This is specifically related to the partnership of Stamen and Stadia which has put the stamen tiles behind an API. See https://maps.stamen.com/stadia-partnership/ and dkahle/ggmap#353 for more information. (#52)

New features

  • Several "limit" arguments can now take one of three options: "fixed" (which forces all markers to share scales), "free" (which allows them to use different scales), or a numeric vector to define the scales. (#34) These arguments and their defaults include:

    • polarMap(): upper (fixed); limits (free)
    • annulusMap(): limits (free)
    • freqMap(): breaks (free)
    • percentileMap(): intervals (fixed)
  • Added searchNetwork(), which allows users to find local air quality monitoring sites by specifying a target latitude and longitude. Function arguments allow the site metadata to be subset (for example, by site type, pollutants measured, or distance from the target).

  • Added convertPostcode(), which converts a valid UK postcode to a latitude/longitude pair. This is intended to be used with searchNetwork().

  • The "data" argument of addPolarMarkers() and addTrajPaths() and both the "before" and "after" arguments of addPolarDiffMarkers() now default to leaflet::getMapData(map). This makes their use less verbose when creating multiple polar plots with the same underlying data, which will likely be a common use-case. (#45)

  • networkMap() popups now contain links to the associated network websites. For example, the popup for London Marylebone Road in networkMap("aurn") now contains a link to https://uk-air.defra.gov.uk/networks/site-info?site_id=MY1. All networks are supported with the exception of "europe". (#39)

  • addPolarMarkers() and addPolarDiffMarkers() now have all of the "options" arguments of leaflet::addMarkers(). This means that, for example, polar markers can be clustered (https://leafletjs.com/reference.html#marker). (#38)

  • The polarMap() family and networkMap() provider argument can now take a named vector. The names will be used in the layer control menu, if length(provider) > 1. (#42)