Package 'owidR'

Title: Import Data from Our World in Data
Description: Import data from 'Our World in Data', an organisation which publishes research and data on global economic and social issues.
Authors: Piers York [aut, cre]
Maintainer: Piers York <[email protected]>
License: MIT + file LICENSE
Version: 1.4.2.9000
Built: 2025-01-28 02:53:03 UTC
Source: https://github.com/piersyork/owidr

Help Index


Get data from Our World in Data

Description

Get a dataset used in an OWID chart.

Usage

owid(chart_id = NULL, rename = NULL, tidy.date = TRUE, ...)

Arguments

chart_id

The chart_id as returned by owid_search

rename

Rename the value column. Currently only works if their is just one value column.

tidy.date

If TRUE then a year column that should be a date column will automatically detected and transformed. If FALSE then the Year column will be kept as is. Defaults to TRUE.

...

Not to be used.

Value

A data.table of an owid dataset with the added class 'owid'.

Examples

owid_search("emissions")
emissions <- owid("per-capita-ghg-emissions")

Get the Our World in Data covid-19 dataset

Description

Get the Our World in Data covid-19 dataset

Usage

owid_covid()

Value

A dataframe with multiple variables on the covid-19 pandemic.


Get source information on an OWID dataset

Description

A function to get source information from an OWID dataset and display it in the R console.

Usage

owid_source(data)

Arguments

data

A dataset returned from owid().

Value

Displays the information in an easy to read format in the R console, also returns a list of data information.

Examples

rights <- owid("human-rights-scores")
owid_source(rights)

View an OWID chart in your browser

Description

A function that opens the original OWID chart in your browser.

Usage

view_chart(x)

Arguments

x

Either a dataset returned by owid(), or a chart_id.

Value

Opens the chart in your browser.

Examples

firearm_suicide <- owid("suicide-rate-by-firearm")
view_chart(firearm_suicide)