Giter Club home page Giter Club logo

openairmaps's Introduction

openairmaps: tools to create maps of air pollution data the openairmaps logo. It shows a stylised pollution rose overlaid with a typical teardrop shaped map marker.

R-CMD-check CRAN status

The main goal of {openairmaps} is to combine the robust analytical methods found in openair with the highly capable {leaflet} package. {openairmaps} is thoroughly documented in the openair book.

Installation

You can install the release version of {openairmaps} from CRAN with:

install.packages("openairmaps")

You can install the development version of {openairmaps} from GitHub with:

# install.packages("pak")
pak::pak("davidcarslaw/openairmaps")

Overview

library(openairmaps)

The openairmaps package is thoroughly documented in the openair book, which goes into great detail about its various functions. Functionality includes visualising UK AQ networks (networkMap()), putting “polar directional markers” on maps (e.g., polarMap()) and overlaying HYSPLIT trajectories on maps (e.g., trajMap()), all using the {leaflet} package.

polar_data %>%
  openair::cutData("daylight") %>%
  buildPopup(
    c("site", "site_type"),
    names = c("Site" = "site", "Site Type" = "site_type"),
    control = "daylight"
  ) %>%
  polarMap(
    pollutant = "no2",
    limits = c(0, 180),
    control = "daylight",
    popup = "popup"
  )
A screenshot of a leaflet map. It shows an OpenStreetMap map layer, overlaid with bivariate polar plots. Polar plots are visualisations on polar coordinates with wind direction on the spoke axes, wind speed on the radial axes, and a smooth surface showing pollutant concentrations. A menu is found at the top-right of the map, which allows users to swap between daylight and nighttime observations.

An example `polarMap()` showing NO2 concentrations in central London.

While an interactive map is preferred for exploratory directional analysis, it is limited to the HTML format. Some applications (for example, academic journals) demand “static” formats like .docx and .pdf. For this reason, “static” versions of {openairmaps} polar marker functions have been provided which are written in {ggplot2}. A benefit of being written in {ggplot2} is that additional layers can be added (e.g., geom_label() could be used to label sites) and limited further customisation is available using theme() and guides().

Static maps require users to provide a ggmap tileset, which at the time of writing requires an API key for either Google or Stadia Maps.

openairmaps's People

Contributors

jack-davison avatar jack-davison-ricardo avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.