Skip to contents

Geotagging Metadata Tags

Usage

meta_geo(
  .meta = meta(),
  icbm = NULL,
  geo_position = NULL,
  geo_region = NULL,
  geo_placename = NULL,
  ...
)

Arguments

.meta

A meta object created by meta() or as_meta(), or returned by a meta_*() object.

icbm

Latitude and longitude of geographic positions specified as "lat, long". Can optionally be a length-two vector, i.e. c(lat, long).

geo_position

Latitude and longitude of geographic positions specified as "lat;long". Can optionally be a length-two vector, i.e. c(lat, long).

geo_region

Name of the geographic region related to the page content, specified using ISO-3166 2-character country code and 2-character national subdivision. Example: "US-NY".

geo_placename

Name of the geographic place related to the page content. Example: "Atlanta, Georgia".

...

Additional geotagging metadata keyword and value pairs, such as geo.country, geo.a1, ..., geo.a3, etc. Underscores in the keyword will be converted to periods, so you can also specify geo_country in place of geo.country.

Value

A meta object, or a set of <meta> HTML tags inside an HTML <head> tag. For use in rmarkdown::html_document(), shiny::runApp(), or other HTML locations.

Examples

meta() %>%
  meta_geo(
    icbm = c(50.167958, -97.133185),
    geo_position = c(50.167958, -97.133185),
    geo_placename = "Manitoba, Canada",
    geo_region = "ca-mb"
  )
#> <meta name="ICBM" content="50.167958, -97.133185"/>
#> <meta name="geo.position" content="50.167958;-97.133185"/>
#> <meta name="geo.region" content="ca-mb"/>
#> <meta name="geo.placename" content="Manitoba, Canada"/>