MyNixOS website logo
Description

Databases Used Routinely by the Brazilian Jurimetrics Association.

The Brazilian Jurimetrics Association (ABJ in Portuguese, see <https://abj.org.br/> for more information) is a non-profit organization which aims to investigate and promote the use of statistics and probability in the study of Law and its institutions. This package has a set of datasets commonly used in our book.

abjData

R buildstatus CRANstatus

Overview

This package contains a set of databases frequently used by ABJ.

The data included comes from the Human Development Index of the municipalities, collected from the Human Development Atlas and cartographic databases.

The purpose of the package is to make databases available for quick use in other projects and as a resource for the Jurimetrics book.

Installation

install.packages("abjData")
## dev version
# remotes::install_github("abjur/abjData")

Available datasets

DatasetDescription
assuntosData that contains information about case types.
cadmun(LEGACY) A dataset that contains the municipality codes.
muniUseful data from municipalities to join with other databases.
pnud_muniA dataset containing UNDP information from municipalities by years.
pnud_minMinimal base of UNDP municipalities to make quick studies.
pnud_siglasA dataset that serves as a glossary of available acronyms.
pnud_ufA dataset that contains information about UNDP of Federative Units.
leiloesAuctions dataset used in our book.
consumoConsumer cases dataset used in our book.

How to use

Once installed, just load the package and call the dataset you want to use.

The {abjData} package can be loaded like any other R package:

library(abjData)
library(tidyverse)
glimpse(pnud_siglas)
#> Rows: 8
#> Columns: 4
#> $ sigla      <chr> "espvida", "gini", "rdpc", "pop", "idhm", "idhm_e", "idhm_l…
#> $ nome_curto <chr> "Esperança de vida ao nascer", "Índice de Gini", "Renda per…
#> $ nome_longo <chr> "Esperança de vida ao nascer", "Índice de Gini", "Renda per…
#> $ definicao  <chr> "Número médio de anos que as pessoas deverão viver a partir…

Chart examples

Municipal Human Development Index:

pnud_min |>
  pivot_longer(starts_with("idhm")) |> 
  mutate(tipo = case_when(
    name == "idhm" ~ "Geral",
    name == "idhm_e" ~ "Education",
    name == "idhm_l" ~ "Longevity",
    name == "idhm_r" ~ "Income"
  )) |> 
  mutate(
    regiao_nm = fct_reorder(regiao_nm, value, median, .desc = TRUE),
    tipo = lvls_reorder(tipo, c(2, 1, 3, 4))
  ) |> 
  ggplot() +
  geom_boxplot(
    aes(value, regiao_nm), 
    colour = "#102C68", 
    fill = "#7AD151"
  ) +
  facet_wrap(~tipo) +
  theme(legend.position = "none") +
  theme_bw(12) +
  labs(
    x = "IDHM", 
    y = "Region"
  )

Position of municipalities:

muni |> 
  ggplot(aes(lon, lat)) +
  geom_point(size = .1, colour = viridis::viridis(2, begin = .2, end = .8)[1]) +
  coord_equal() +
  theme_void()

Requirements

{abjData} requires R version greater than or equal to 3.4.

License

{abjData} is licensed under the MIT License.

Metadata

Version

1.1.2

License

Unknown

Platforms (77)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows