R client for opensensemap.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

103 lines
3.5KB

  1. % Generated by roxygen2: do not edit by hand
  2. % Please edit documentation in R/opensensmapr.R
  3. \docType{package}
  4. \name{opensensmapr}
  5. \alias{opensensmapr}
  6. \alias{opensensmapr-package}
  7. \alias{opensensmapr-package}
  8. \title{opensensmapr: Get sensor data from opensensemap.org}
  9. \description{
  10. The opensensmapr package provides functions for
  11. \itemize{
  12. \item retrieval of senseBox metadata,
  13. \item retrieval of senseBox measurements,
  14. \item general statistics about the openSenseMap database.
  15. }
  16. Additionally, helper functions are provided to ease the integration with the
  17. \code{\link[sf]{sf}} package for spatial analysis as well as
  18. \code{\link[dplyr]{dplyr}} for general data handling.
  19. }
  20. \section{Retrieving senseBox metadata}{
  21. On the openSenseMap, measurements are provided by sensors which are assigned
  22. to a sensor station ("senseBox").
  23. A senseBox consists of a collection of sensors, a location (-history), an ID,
  24. as well as metadata about its owner & placement.
  25. senseBoxes can be retrieved either by ID, or as a collection with optional
  26. filters on their metadata
  27. \itemize{
  28. \item \code{\link{osem_box}}: Get metadata about a single box by its ID.
  29. \item \code{\link{osem_boxes}}: Get metadata about all boxes, optionally
  30. filtered by their attributes.
  31. }
  32. The data is returned as a \code{\link{data.frame}} with the class
  33. \code{sensebox} attached.
  34. To help in getting an overview of the dataset additional functions are
  35. implemented:
  36. \itemize{
  37. \item \code{summary.sensebox()}: Aggregate the metadata about the given
  38. list of senseBoxes.
  39. \item \code{plot.sensebox()}: Shows the spatial distribution of the given
  40. list of senseBoxes on a map. Requires additional packages!
  41. \item \code{\link{osem_phenomena}}: Get a named list with
  42. counts of the measured phenomena of the given list of senseBoxes.
  43. }
  44. }
  45. \section{Retrieving measurements}{
  46. Measurements can be retrieved through \code{\link{osem_measurements}} for a
  47. given phenomenon only. A subset of measurements may be selected by
  48. \itemize{
  49. \item a list of senseBoxes, previously retrieved through
  50. \code{\link{osem_box}} or \code{\link{osem_boxes}}.
  51. \item a geographic bounding box, which can be generated with the
  52. \code{\link[sf]{sf}} package.
  53. \item a time frame
  54. \item a exposure type of the given box
  55. }
  56. Data is returned as \code{tibble} with the class \code{osem_measurements}.
  57. }
  58. \section{Retrieving statistics}{
  59. Count statistics about the database are provided with \code{\link{osem_counts}}.
  60. }
  61. \section{Integration with other packages}{
  62. The package aims to be compatible with the tidyverse.
  63. Helpers are implemented to ease the further usage of the retrieved data:
  64. \itemize{
  65. \item \code{\link{osem_as_sensebox}} & \code{\link{osem_as_measurements}}:
  66. Transform a foreign object to a sensebox data.frame or osem_measurements
  67. by attaching the required classes and attributes.
  68. \item \code{\link{st_as_sf.sensebox}} & \code{\link{st_as_sf.osem_measurements}}:
  69. Transform the senseBoxes or measurements into an \code{\link[sf]{sf}}
  70. compatible format for spatial analysis.
  71. \item \code{filter.sensebox()} & \code{mutate.sensebox()}: for use with
  72. \code{\link{dplyr}}.
  73. }
  74. }
  75. \seealso{
  76. Report bugs at \url{https://github.com/noerw/opensensmapR/issues}
  77. openSenseMap API: \url{https://api.opensensemap.org/}
  78. official openSenseMap API documentation: \url{https://docs.opensensemap.org/}
  79. }
  80. \author{
  81. \strong{Maintainer}: Norwin Roosen \email{hello@nroo.de}
  82. Other contributors:
  83. \itemize{
  84. \item Daniel Nuest \email{daniel.nuest@uni-muenster.de} (0000-0003-2392-6140) [contributor]
  85. }
  86. }