Retrieves the metadata for a data set from Our World in Data (OWID) by specifying a chart identifier or direct URL.
Examples
# \donttest{
# Download metadata using a data set
owid_get_metadata("life-expectancy")
#> $chart
#> $chart$title
#> [1] "Life expectancy"
#>
#> $chart$subtitle
#> [1] "The [period life expectancy](#dod:period-life-expectancy) at birth, in a given year."
#>
#> $chart$citation
#> [1] "UN WPP (2024); HMD (2024); Zijdeman et al. (2015); Riley (2005)"
#>
#> $chart$originalChartUrl
#> [1] "https://ourworldindata.org/grapher/life-expectancy"
#>
#> $chart$selection
#> $chart$selection[[1]]
#> [1] "World"
#>
#> $chart$selection[[2]]
#> [1] "Americas"
#>
#> $chart$selection[[3]]
#> [1] "Europe"
#>
#> $chart$selection[[4]]
#> [1] "Africa"
#>
#> $chart$selection[[5]]
#> [1] "Asia"
#>
#> $chart$selection[[6]]
#> [1] "Oceania"
#>
#>
#>
#> $columns
#> $columns$`Period life expectancy at birth - Sex: total - Age: 0`
#> $columns$`Period life expectancy at birth - Sex: total - Age: 0`$titleShort
#> [1] "Life expectancy at birth"
#>
#> $columns$`Period life expectancy at birth - Sex: total - Age: 0`$titleLong
#> [1] "Life expectancy at birth - Various sources – period tables"
#>
#> $columns$`Period life expectancy at birth - Sex: total - Age: 0`$descriptionShort
#> [1] "The period life expectancy at birth, in a given year."
#>
#> $columns$`Period life expectancy at birth - Sex: total - Age: 0`$descriptionKey
#> $columns$`Period life expectancy at birth - Sex: total - Age: 0`$descriptionKey[[1]]
#> [1] "Period life expectancy is a metric that summarizes death rates across all age groups in one particular year."
#>
#> $columns$`Period life expectancy at birth - Sex: total - Age: 0`$descriptionKey[[2]]
#> [1] "For a given year, it represents the remaining average lifespan for a hypothetical group of people, if they experienced the same age-specific death rates throughout the rest of their lives as the age-specific death rates seen in that particular year."
#>
#> $columns$`Period life expectancy at birth - Sex: total - Age: 0`$descriptionKey[[3]]
#> [1] "Prior to 1950, we use HMD (2024) data combined with Zijdeman (2015). From 1950 onwards, we use UN WPP (2024) data. For old regional data, we use Riley (2005) estimates."
#>
#>
#> $columns$`Period life expectancy at birth - Sex: total - Age: 0`$shortUnit
#> [1] "years"
#>
#> $columns$`Period life expectancy at birth - Sex: total - Age: 0`$unit
#> [1] "years"
#>
#> $columns$`Period life expectancy at birth - Sex: total - Age: 0`$timespan
#> [1] "1543-2023"
#>
#> $columns$`Period life expectancy at birth - Sex: total - Age: 0`$type
#> [1] "Numeric"
#>
#> $columns$`Period life expectancy at birth - Sex: total - Age: 0`$owidVariableId
#> [1] 1002268
#>
#> $columns$`Period life expectancy at birth - Sex: total - Age: 0`$shortName
#> [1] "life_expectancy_0__sex_total__age_0"
#>
#> $columns$`Period life expectancy at birth - Sex: total - Age: 0`$lastUpdated
#> [1] "2024-12-03"
#>
#> $columns$`Period life expectancy at birth - Sex: total - Age: 0`$nextUpdate
#> [1] "2025-12-03"
#>
#> $columns$`Period life expectancy at birth - Sex: total - Age: 0`$citationShort
#> [1] "UN WPP (2024); HMD (2024); Zijdeman et al. (2015); Riley (2005) – with minor processing by Our World in Data"
#>
#> $columns$`Period life expectancy at birth - Sex: total - Age: 0`$citationLong
#> [1] "UN WPP (2024); HMD (2024); Zijdeman et al. (2015); Riley (2005) – with minor processing by Our World in Data. “Life expectancy at birth – Various sources – period tables” [dataset]. Human Mortality Database, “Human Mortality Database”; United Nations, “World Population Prospects”; Zijdeman et al., “Life Expectancy at birth 2”; James C. Riley, “Estimates of Regional and Global Life Expectancy, 1800-2001” [original data]."
#>
#> $columns$`Period life expectancy at birth - Sex: total - Age: 0`$fullMetadata
#> [1] "https://api.ourworldindata.org/v1/indicators/1002268.metadata.json"
#>
#>
#>
#> $dateDownloaded
#> [1] "2025-02-28"
#>
# Download metadata using an url
owid_get_metadata(
url = "https://ourworldindata.org/grapher/civil-liberties-score-fh"
)
#> $chart
#> $chart$title
#> [1] "Civil liberties score"
#>
#> $chart$subtitle
#> [1] "Based on the estimates and scoring by [Freedom House (2024)](#dod:freedom-house). It captures the extent of freedom of expression and association, the rule of law, and personal autonomy. Higher scores indicate more liberties."
#>
#> $chart$citation
#> [1] "Freedom House (2024)"
#>
#> $chart$originalChartUrl
#> [1] "https://ourworldindata.org/grapher/civil-liberties-score-fh"
#>
#> $chart$selection
#> $chart$selection[[1]]
#> [1] "Argentina"
#>
#> $chart$selection[[2]]
#> [1] "Australia"
#>
#> $chart$selection[[3]]
#> [1] "Botswana"
#>
#> $chart$selection[[4]]
#> [1] "China"
#>
#>
#>
#> $columns
#> $columns$`Civil liberties score`
#> $columns$`Civil liberties score`$titleShort
#> [1] "Civil liberties score"
#>
#> $columns$`Civil liberties score`$titleLong
#> [1] "Civil liberties score"
#>
#> $columns$`Civil liberties score`$descriptionShort
#> [1] "The variable identifies the fine-grained extent of freedom of expression and association, the rule of law, and personal autonomy. Higher scores indicate more liberties."
#>
#> $columns$`Civil liberties score`$descriptionKey
#> list()
#>
#> $columns$`Civil liberties score`$unit
#> [1] ""
#>
#> $columns$`Civil liberties score`$timespan
#> [1] "2005-2023"
#>
#> $columns$`Civil liberties score`$type
#> [1] "Integer"
#>
#> $columns$`Civil liberties score`$owidVariableId
#> [1] 901305
#>
#> $columns$`Civil liberties score`$shortName
#> [1] "civlibs_score_fh"
#>
#> $columns$`Civil liberties score`$lastUpdated
#> [1] "2024-05-16"
#>
#> $columns$`Civil liberties score`$nextUpdate
#> [1] "2025-05-16"
#>
#> $columns$`Civil liberties score`$citationShort
#> [1] "Freedom House (2024) – processed by Our World in Data"
#>
#> $columns$`Civil liberties score`$citationLong
#> [1] "Freedom House (2024) – processed by Our World in Data. “Civil liberties score” [dataset]. Freedom House, “Freedom in the World” [original data]."
#>
#> $columns$`Civil liberties score`$fullMetadata
#> [1] "https://api.ourworldindata.org/v1/indicators/901305.metadata.json"
#>
#>
#>
#> $dateDownloaded
#> [1] "2025-02-28"
#>
# }