Description Usage Arguments Value Note Examples
Download and parse World Prison Brief data
1 2 3 4 5 |
region |
|
country |
|
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
.
We recommend calling this function using the region argument, as the data
come back in a format more useful for analysis. Querying a specific country will
return a dataframe in which certain columns contain items such as parentheses
and auxiliary text, rendering follow-on analysis more cumbersome.
As regards the spatial information, the geometry
column will be an
empty list where it has not matched every entry in country
. This is due
to the way territories are coded according to ISO A2 codes. For example,
country
will contain "Jersey (United Kingdom)", whereas geometry
contains information for only the United Kingdom as a whole. We hope to improve
this in future releases of prisonBrief.
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.