Learn R Programming

prisonbrief (version 0.1.2)

wpb_table: Download and parse World Prison Brief data

Description

Download and parse World Prison Brief data

Usage

wpb_table(
  region = c("Africa", "Asia", "Caribbean", "Central America", "Europe", "Middle East",
    "North America", "Oceania", "South America", "All"),
  country = NULL
)

Arguments

region

character. Return details for all the countries in the particular region. For a list of the countries in each region, use wbp_region_list().

country

character. If details of a specific country are required, the country can be specified by name. A non-NULL value for this parameter will void the region argument. For a list of country names, use wpb_list().

Value

Data Frame with 10 variables:

  • country character.

  • prison_population_rate integer, per 100,000 of the national population.

  • prison_population_total integer.

  • female_prisoners numeric, (percentage of total prison pop.).

  • pre_trial_detainees numeric, (percentage of total prison pop.).

  • foreign_prisoners numeric, (percentage of total prison pop.).

  • occupancy_level numeric, (percentage based on official capacity).

  • iso_a2 character. See notes.

  • geometry sfc_MULTIPOLYGON.

Examples

Run this code
# NOT RUN {
# Get details for Spain:
espana <- wpb_table(country = "Spain")

# Get details for Central America:
CA <- wpb_table(region = "Central America")
# }

Run the code above in your browser using DataLab