Skip to content

UBC-MDS/nameformeR

Repository files navigation

nameformeR

R-CMD-check test-coverage codecov License:MIT

This package is available for vignette pages reviewing.

nameformeR is an R translation of our python package nameforme

A helper package that can be used to generate names based on the dateset. This could be used to come up with baby names, character names, pseudonyms, etc.

Source Data: Contains baby names born in the United States for each year from 1880 to 2017, and the number of children of each sex given each name. Names must appear at least 5 times in the each year to be included. (Source: http://www.ssa.gov/oact/babynames/limits.html)

This package is similar to an existing R package called randomNames in CRAN. This package focuses on generating random first and last names by ethnicity, whereas ours only generates first names, but provides more helper methods for users to customize what type of names to generate, including the ability to generate similar sounding names.

Installation

To get a bug fix or to use a feature from the development version, you can install the development version of dplyr from GitHub.

# install.packages("devtools")
devtools::install_github("UBC-MDS/nameformeR")

Usage

# Please make sure installation is successful before proceeding. 

# Generate a random set of 10 suggested baby names based on the given limitations.

# if the given limitation can match to at least 10 names, a list of 10 names will be provided
nameformeR::find_name("F", "A", length=3)

#if the given limitation can only match less than 10 names, all matched names will be provided
nameformeR::find_name("m", "b", length=9)

# Generate a random set of suggested neutral(by default) baby names based on the given time period and sex.
nameformeR::find_old_name('1980s', limit=3)

# Generate a random list of names that sound similar to a given user input name.
nameformeR::find_similar_name('Daniel', limit=20)

# Generate the a random set of suggested neutral baby names based on the given limitation and baby names in the past years.
nameformeR::find_unisex_name(bar=0.02,limit=10)

Functions Included

Note that the name of functions are not finalized. They are subject to change.

The package is an assimilation of four independent functions:

  • find_name: Generate a random set of 10 suggested baby names based on the given limitations.

  • find_unisex_name: Generate the a random set of suggested neutral baby names based on the given limitation and baby names in the past years.

  • find_old_name: Generate a random set of suggested neutral(by default) baby names based on the given time period and sex.

  • find_similar_name: Generate a random list of names that sound similar to a given user input name.

Dependencies

  • comparator (>= 0.1.2),
  • stringr (>= 1.5.0),
  • dplyr (>= 1.1.0),
  • readr (>= 2.1.3)

License

nameforme was created by Daniel Cairns, Eyre Hong, Bruce Wu, Zilong Yi (UBC MDS). It is licensed under the terms of the MIT license.

About

No description, website, or topics provided.

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •