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 |
Get a dataset used in an OWID chart.
owid(chart_id = NULL, rename = NULL, tidy.date = TRUE, ...)
owid(chart_id = NULL, rename = NULL, tidy.date = TRUE, ...)
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. |
A data.table of an owid dataset with the added class 'owid'.
owid_search("emissions") emissions <- owid("per-capita-ghg-emissions")
owid_search("emissions") emissions <- owid("per-capita-ghg-emissions")
Get the Our World in Data covid-19 dataset
owid_covid()
owid_covid()
A dataframe with multiple variables on the covid-19 pandemic.
Search the data sources used in OWID charts
owid_search(term)
owid_search(term)
term |
A search term |
A matrix of chart titles and chard ids
# returns the titles and chart_ids of all charts containing the word 'emissions' owid_search("emissions")
# returns the titles and chart_ids of all charts containing the word 'emissions' owid_search("emissions")
A function to get source information from an OWID dataset and display it in the R console.
owid_source(data)
owid_source(data)
data |
A dataset returned from owid(). |
Displays the information in an easy to read format in the R console, also returns a list of data information.
rights <- owid("human-rights-scores") owid_source(rights)
rights <- owid("human-rights-scores") owid_source(rights)
A function that opens the original OWID chart in your browser.
view_chart(x)
view_chart(x)
x |
Either a dataset returned by owid(), or a chart_id. |
Opens the chart in your browser.
firearm_suicide <- owid("suicide-rate-by-firearm") view_chart(firearm_suicide)
firearm_suicide <- owid("suicide-rate-by-firearm") view_chart(firearm_suicide)