README.md

limpyr -- A Set of IHR Data Processing Functions

The limpyr package comprises a set of functions for manipulating and analyzing IHR's data with R.

It includes:

Installation

Latest version

library(devtools)
install_github("GuillermoNasarre/limpyr")

Usage

library(limpyr)
# Load package's sample data
edcn <- edcn
?edcn

library(tidyverse)
# Calculate the age of the people in "edcn"
edcn_age <- edcn %>% 
  mutate(age = assign_age(date_of_deportation, date_of_birth)) %>% 
  select(1, age, everything())

# Assign the gender of the people in "edcn"
edcn_genders <- edcn_age %>%
  separate(subject_name,
           into = c("family_names", "personal_name"),
           sep = ",") %>%
  mutate(family_names = clean_name(family_names), 
         personal_name = clean_name(personal_name),
         gender = assign_gender(personal_name)) %>%
  select(1:2, gender, everything())

# Locate the town of birth in "edcn"
library(leaflet)
edcn_genders %>%
  provinciate(town_of_birth, "municipio") %>%
  select(1:6, town_of_birth, last_col(2:0), everything()) %>% 
  assign("edcn_towns", ., envir = .GlobalEnv) %>%  
  leaflet() %>% 
  addTiles() %>% 
  addMarkers(clusterOptions = markerClusterOptions(), 
             label = ~town_of_birth, 
             popup = ~paste("<b>Name: </b>", personal_name, family_names))

example_1

Support

Please report bugs here on GitHub.



GuillermoNasarre/limpyr documentation built on Dec. 17, 2021, 10:25 p.m.