{"id":25914478,"url":"https://github.com/simularia/simulariatools","last_synced_at":"2026-01-08T12:12:08.413Z","repository":{"id":14655091,"uuid":"17373334","full_name":"Simularia/simulariatools","owner":"Simularia","description":"Tools 🧰 to preprocess and post process data for air quality assessment.","archived":false,"fork":false,"pushed_at":"2024-08-27T13:22:17.000Z","size":3671,"stargazers_count":5,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-02T05:43:33.567Z","etag":null,"topics":["air-quality","atmospheric-modelling","pollution-prediction","r","r-package","rstats","visualization"],"latest_commit_sha":null,"homepage":"https://www.simularia.it/simulariatools","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Simularia.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-03-03T17:12:30.000Z","updated_at":"2025-01-27T09:47:25.000Z","dependencies_parsed_at":"2023-02-17T22:30:45.709Z","dependency_job_id":"536a4d39-a1df-402f-b77a-748641775760","html_url":"https://github.com/Simularia/simulariatools","commit_stats":{"total_commits":182,"total_committers":2,"mean_commits":91.0,"dds":0.01098901098901095,"last_synced_commit":"0c02d96e89840f3f8e251a4e5b4a6321ad9509ab"},"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Simularia%2Fsimulariatools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Simularia%2Fsimulariatools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Simularia%2Fsimulariatools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Simularia%2Fsimulariatools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Simularia","download_url":"https://codeload.github.com/Simularia/simulariatools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241652964,"owners_count":19997578,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["air-quality","atmospheric-modelling","pollution-prediction","r","r-package","rstats","visualization"],"created_at":"2025-03-03T11:20:54.401Z","updated_at":"2026-01-08T12:12:08.407Z","avatar_url":"https://github.com/Simularia.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n    collapse = TRUE,\n    comment = \"#\u003e\",\n    fig.path = \"man/figures/README-\",\n    fig.retina = 2,\n    dpi = 300,\n    out.width = \"80%\",\n    out.height = \"80%\"\n)\n```\n\n# simulariatools \u003ca href=\"https://www.simularia.it/simulariatools/\"\u003e\u003cimg src=\"man/figures/logo.png\" align=\"right\" height=\"138\" /\u003e\u003c/a\u003e\n\n\u003c!-- badges: start --\u003e\n[![R-CMD-check](https://github.com/Simularia/simulariatools/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/Simularia/simulariatools/actions/workflows/R-CMD-check.yaml)\n[![CRAN status](https://www.r-pkg.org/badges/version/simulariatools)](https://CRAN.R-project.org/package=simulariatools)\n[![CRAN downloads](https://cranlogs.r-pkg.org/badges/grand-total/simulariatools?color=brightgreen)](https://CRAN.R-project.org/package=simulariatools)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.165117.svg)](https://doi.org/10.5281/zenodo.596741)\n\u003c!-- badges: end --\u003e\n\n\n## Overview\n\n**simulariatools** is an open source package with a collection of functions and\ntools useful to pre and post process data for air quality modelling and\nassessment:\n\n- `contourPlot2()` plots a production-ready contour map of a pollutant concentration field.\n- `plotAvgRad()` plots the hourly average of solar radiation.\n- `plotAvgTemp()` plots the average atmospheric temperature.\n- `plotStabilityClass()` plots histograms of atmospheric stability class.\n- `vectorField()` plots a simple vector field given two components.\n- `importRaster()` imports a generic raster file.\n- `importADSOBIN()` imports an ADSO/BIN raster file.\n- `importSurferGrd()` imports a grid file.\n- `stabilityClass()` computes atmospheric stability class.\n- `turnerStabilityClass()` computes atmospheric PGT stability class with Turner method.\n- `downloadBasemap()` downloads GeoTIFF basemaps from the Italian [PCN](https://gn.mase.gov.it/portale/home).\n- `removeOutliers()` removes time series outliers based on interquartile range.\n- `rollingMax()` computes rolling max of a time series.\n\nThe package is developed and maintained at [Simularia](https://www.simularia.it)\nand it is widely used in their daily work.\n\nIf you use this package in your work, please consider citing it.\nRefer to its [Zenodo DOI](https://doi.org/10.5281/zenodo.596741) to cite it.\n\n\n## Installation\n\nTo install the latest release of **simulariatools** from CRAN:\n```{r eval=FALSE, include=TRUE}\ninstall.packages(\"simulariatools\")\n```\n\n\u003e NOTE:\n\u003e To import *ADSO/BIN* data files via `importADSOBIN()`, a working installation\n\u003e of *Python3* is required. For more information about *R* and *Python*\n\u003e interoperability, refer to the documentation of\n\u003e [`reticulate`](https://rstudio.github.io/reticulate/).\n\n\n### Development version\n\nTo get bug fixes or to use a feature from the development version, install the\ndevelopment version from GitHub:\n```{r eval=FALSE, include=TRUE}\n# install.packages(\"pak\")\npak::pkg_install(\"Simularia/simulariatools\")\n```\n\n## Examples\n\n### Contour Plot\n\nFirst, import air quality data from *NetCDF* or *ADSO/BIN* files with the\nappropriate convenience function:\n```{r echo=TRUE}\nlibrary(simulariatools)\nnox_concentration \u003c- importRaster(\n    file = \"./development/conc_avg.nc\",\n    k = 1000,\n    destaggering = TRUE,\n    variable = \"nox\",\n    verbose = TRUE\n)\n```\nConcentration data are imported as a `data.frame` with `x`, `y` columns corresponding to\nthe coordinates of the cell centre and a `z` column for grid values.\n```{r echo=TRUE}\nstr(nox_concentration)\n```\n\nA quick contour plot, with default configuration, can be easily obtained by\nrunning `contourPlot2()` without any argument:\n```{r}\ncontourPlot2(nox_concentration)\n```\n\nThe plot is customisable by using `contourPlot2()` arguments and by piping\n**ggplot2** instructions together with the `+` operator.\n\nIn the following example, the original domain is cropped, colour levels are\nexplicitly assigned and a legend name is provided through function arguments.\nFurthermore, `labs()` and `theme_minimal()` functions from **ggplot2** are used\nto remove axis labels and to change the overall theme:\n```{r echo=TRUE}\nlibrary(ggplot2)\ncontourPlot2(\n    nox_concentration,\n    xlim = c(502000, 519000),\n    ylim = c(4943125, 4955125),\n    nticks = 5,\n    levels = c(-Inf, 0.5, 1, 1.5, 2, Inf),\n    legend = \"NOx [ug/m3]\"\n) +\n    labs(x = NULL, y = NULL) +\n    theme_minimal()\n```\n\nIn order to save the last plot to file, you can directly use the **ggplot2**\nfunction `ggsave()`:\n```{r eval=FALSE}\nggsave(filename = \"~/path/to/myplot.png\", width = 7, height = 6, dpi = 300)\n```\n\nOptional arguments can be used to create special versions of the plot.\nFor example, use `tile = TRUE` to produce a non-spatially interpolated plot:\n```{r echo=TRUE}\ncontourPlot2(\n    nox_concentration,\n    tile = TRUE,\n    legend = \"NOx [ug/m3]\"\n)\n```\n\n\n## Contact\n\nContact person:\n\n\u003e [Giuseppe Carlino](https://github.com/gcarlino) (Simularia srl)\n\n\n## Contributors\n\n[Matteo Paolo Costa](https://github.com/teocos)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimularia%2Fsimulariatools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimularia%2Fsimulariatools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimularia%2Fsimulariatools/lists"}