Learn R Programming

hkdatasets (version 1.0.0)

download_data: Download and Extract data from online sources

Description

Download and extract data from preset online sources, specifying the name of the dataset.

Usage

download_data(dataset = NULL)

Arguments

dataset

String containing the name of the dataset. Valid values include: - "hk_accidents" - "hk_casualties" - "hk_vehicles"

Value

A data frame is returned.

Details

This supersedes the method for pulling hk_accidents, hk_casualties, and hk_vehicles due to the size of the data file. Refer to https://hong-kong-districts-info.github.io/hkdatasets/ to access the data documentation for three datsets.

Examples

Run this code
# NOT RUN {
# You can download and return a dataset with the following code:
download_data(dataset = "hk_vehicles")
# }
# NOT RUN {

# }

Run the code above in your browser using DataLab