get_auspol {AustralianPoliticians}R Documentation

Retrieve a csv dataset from the australian_politicians repository.

Description

'get_auspol()' downloads a requested Australian politicians .csv dataset using an associated argument.

Usage

get_auspol(df)

Arguments

df

A character string used to request an Australian politicians dataset. *See Request Codes* below.

Details

There are four request codes: 'all', 'allbyparty', 'mps' and 'senators'.

The specifics of these are:

- 'all' requests the australian_politicians-all.csv dataset. - 'allbyparty' requests the australian_politicians-all-by_party.csv dataset. - 'mps' requests the australian_politicians-mps-by_division.csv dataset. - 'senators' requests the australian_politicians-senators-by_state.csv dataset.

An incorrect request (an argument not associated with a dataset or non-character string argument) will stop function processes and return an error message.

Value

The requested dataset using df to a user assigned name.

See Also

'show_datacodes()' function help.

Examples

## Not run: 
# Request the Senators by State dataset.
senators_df <- get_auspol("senators")

# Preview first 10 observations of the dataset.
head(senators_df, 10)

## End(Not run)

[Package AustralianPoliticians version 0.1.0 Index]