Generate Raster Images from QuadKey-Identified Datasets

A set of functions of increasing complexity allows users to (1) convert QuadKey-identified datasets, based on 'Microsoft's Bing Maps Tile System', into Simple Features data frames, (2) transform Simple Features data frames into rasters, and (3) process multiple 'Meta' ('Facebook') QuadKey-identified human mobility files directly into raster files. For more details, see D’Andrea et al. (2024) .


quadkeyr

Lifecycle:experimental R-CMD-check pkgcheck Codecov Status at rOpenSci Software PeerReview status ForeSITEGroup

What can this package do for you?

The quadkeyr R package presents a comprehensive toolkit tailored for generating raster images from Quadkey-Identified data within Microsoft’s Bing Maps Tile System. Designed to integrate Quadkey-Identified data into R workflows, this package facilitates the creation of QuadKey grids and raster images and introduces specialized functions for the processing of Meta Mobility data, previously referred to as Facebook mobility data.

What are QuadKeys in Tile Maps?

Tile maps divide the Earth’s surface into a grid of tiles, with each tile corresponding to a specific geographic area at various zoom levels.

QuadKeys represent a location on a map by encoding its hierarchical spatial position as a sequence of characters. They provide an efficient method to address and retrieve specific map tiles, facilitating rapid display within mapping applications.

The QuadKey of any tile starts with the QuadKey of its parent tile (the containing tile at the previous level). Image extracted from Microsoft’s Bing Maps Tile System webpage.


The goal of quadkeyr is to:

  1. Convert a QuadKey to a Simple Features data.frame (and more) quadkeyr provides functions to convert a QuadKey to a sf POINT data.frame or sf POLYGON data.frame. Additionally, it offers all the R functions described in the official documentation for converting QuadKeys to and from tiles, pixels, and geographic coordinates.
  1. Generate Raster Images from Quadkey-Identified Data Complete a grid of QuadKeys within a specified area and zoom level, and create a stars raster. You can also directly convert QuadKeys in a data.frame column into an sf POLYGON data.frame.
  1. Convert Meta (Facebook) Mobility QuadKey-identified Datasets into Raster Files Convert Meta (Facebook) mobility data .csv files into .tif files by day and hour reported.
  1. Offer an App for visualizing QuadKeys on a map Introduce a QuadKey visualization application enabling users to validate function outcomes.

Install quadkeyr

R-Universe

For the latest development version of quadkeyr:

install.packages("quadkeyr",
                 repos = "https://ropensci.r-universe.dev")

GitHub

You can install the development version of quadkeyr from GitHub with:

# install.packages("remotes")
remotes::install_github("ropensci/quadkeyr")

CRAN

You can install the latest version of quadkeyr from CRAN with:

install.packages("quadkeyr")

Code of Conduct

Please note that this package is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

Contribute

If you’d like to contribute to this project, please follow the contributing guidelines

Links of interest

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("quadkeyr")

0.1.0 by Florencia D'Andrea, 2 years ago


https://docs.ropensci.org/quadkeyr/, https://github.com/ropensci/quadkeyr


Report a bug at https://github.com/ropensci/quadkeyr/issues


Browse source code at https://github.com/cran/quadkeyr


Authors: Florencia D'Andrea [aut, cre] , Pilar Fernandez [aut] , Maria Paula Caldas [rev] , Maria Paula Caldas reviewed the package (v. 0.0.0.9000) for rOpenSci , see https://github.com/ropensci/software-review/issues/619) , Vincent van Hees [rev] , Vincent van Hees reviewed the package (v. 0.0.0.9000) for rOpenSci , see https://github.com/ropensci/software-review/issues/619) , Andrew Pulsipher [ctb] , CDC's Center for Forecasting and Outbreak Analytics [fnd] (This project was made possible by cooperative agreement CDC-RFA-FT-23-0069 (grant # NU38FT000009-01-00) from the CDC's Center for Forecasting and Outbreak Analytics. Its contents are solely the responsibility of the authors and do not necessarily represent the official views of the Centers for Disease Control and Prevention.) , MIDAS-NIH COVID-19 urgent grant program [fnd] , Paul G. Allen School for Global Health , Washington State University [cph]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports dplyr, lubridate, purrr, readr, rlang, sf, shiny, stars

Suggests bslib, DT, ggplot2, knitr, leaflet, magick, rmarkdown, rnaturalearth, shinytest2, testthat, tidyr, viridis, withr


Suggested by duckspatial.


See at CRAN