Title: | Generation of Code Names for Organizations, People, Projects, and Whatever Else |
---|---|
Description: | This creates code names that a user can consider for their organizations, their projects, themselves, people in their organizations or projects, or whatever else. The user can also supply a numeric seed (and even a character seed) for maximum reproducibility. Use is simple and the code names produced come in various types too, contingent on what the user may be desiring as a code name or nickname. |
Authors: | Steve Miller [aut, cre] |
Maintainer: | Steve Miller <[email protected]> |
License: | GPL-2 |
Version: | 0.5.0 |
Built: | 2025-02-14 02:39:23 UTC |
Source: | https://github.com/svmiller/codename |
This is a data frame of adjectives in the English language to use as an attribute in generating a code name.
adjectives
adjectives
a data frame with 1,347 observations and 1 column.
value
a character vector
Adjectives found on Github as a gist from username "@hugsy".
This is a data frame of animals in the English language to use as an object in generating a code name.
animals
animals
a data frame with 400 observations and 1 column.
value
a character vector
Animals found on Github as a gist from username "@atduskgreg".
char2seed()
is a parlor trick for converting a character vector into an integer for the sake of setting a reproducible seed.
char2seed(x) char2seed_v1(x)
char2seed(x) char2seed_v1(x)
x |
a character vector |
Interested users can see how this works. Namely, letters (and numbers) in the character vector are assigned corresponding numbers. In
char2seed()
, these numbers are concatenated together an divided over 1 minus the absolute maximum number that R can handle by
default (2^32). The remainder of this division is what ultimately becomes the reproducible seed.
In char2seed_v1()
, these numbers are added together and then exponentiated to create a really big number. The number is divided over
1 minus the absolute maximum number that R can handle by default (2^32). The remainder of this division is what ultimately becomes the
reproducible seed.
The nature of this parlor trick means there's a possibility, however small, that two different character vectors
can return the same reproducible seed. This happened before https://github.com/svmiller/codename/issues/1, which is why
I changed the function for generating the seed and moved the old function to char2seed_v1()
.
The function may warn of "loss of accuracy", but this just means you supplied it a really long character vector.
char2seed()
takes a character vector and returns a reproducible seed for you to use for whatever purpose. It's used internally in
codename()
. char2seed_v1()
does the same, but using the older method from v. 0.1.0 and v. 0.2.0 of this release.
Steven V. Miller
char2seed("ABCDEF") char2seed("Go Bucks!") char2seed("My Project Title")
char2seed("ABCDEF") char2seed("Go Bucks!") char2seed("My Project Title")
codename()
is a tool for generating codenames for various things.
codename(type = "any", seed)
codename(type = "any", seed)
type |
a type of code the user wants. Defaults to "any", but "gods", "nicka", "ubuntu", and "wu-tang" are available. |
seed |
an optional reproducible seed, which can be specified as a character or number. |
When type is 'any' (the default), the function combines all adjective data frames together (i.e. those from the Wu-Tang set, the colors, and the generic adjectives) and combines all noun data frames together (i.e. the animals, the generic nouns, the gods, and the Wu-Tang nouns). It then samples from each and combines them together.
When type is 'gods', the function randomly samples a god from the gods
data frame and pastes it to a random color or generic adjective.
When type is 'ubuntu', a codename is derived that is broadly consistent with
how Ubuntu versions their releases. This particular way of doing it starts with
sampling an animal from the animals
data frame. After an animal is
selected, the function finds the first letter of the animal and matches it
with something from the adjectives
or xkcd_colors
data sets.
However, anything on the adjective side of the equation must be of length one.
In other words, you can get "yellow yak" but you cannot have "yellow orange
yak" because the "yellow orange" color is a two-word modifier.
When type is 'wu-tang', a name is derived by randomly sampling from the
wu_adjs
and wu_nouns
data frames.
When type is 'nicka', the function randomly samples a U.S. agency from the
nicka_blocks
data frame. This agency has a series of two-character blocks
from which they can draw a noun and an adjective. Thereafter, the function
randomly selects something from a compilation of the adjectives and the nouns
that start with something from the two-character block that was selected,
though the sampling procedure omits any adjective or noun that is more than
one word. You can cross-reference your code name to the nicka_blocks
data frame to see what agency you're representing for something that I'm sure
is nefarious and may require a congressional hearing.
codename()
takes a preferred type of code and an optional reproducible seed and returns
a codename for the user to consider for whatever it is they want.
Steven V. Miller
codename() codename(type = "ubuntu") codename(type = "gods") codename(type = "wu-tang") codename(type = "nicka") codename(type = "ubuntu", seed = "A Character Seed") codename(type = "gods", seed = "A Character Seed") codename(type = "wu-tang", seed = "A Character Seed") codename(type = "nicka", seed = "A Character Seed")
codename() codename(type = "ubuntu") codename(type = "gods") codename(type = "wu-tang") codename(type = "nicka") codename(type = "ubuntu", seed = "A Character Seed") codename(type = "gods", seed = "A Character Seed") codename(type = "wu-tang", seed = "A Character Seed") codename(type = "nicka", seed = "A Character Seed")
codename_message()
produces a message about the package version
and the version of R making use of this package.
codename_message()
codename_message()
codename_message()
produces a message about the installed version of codename. Successive updates
may (understandably) break an expected output from a reproducible seed in the codename()
function. This just
adds an extra layer of transparency.
Steven V. Miller
codename_message()
codename_message()
This is a data frame of gods in the English language to use as an object in generating a code name.
gods
gods
a data frame with 221 observations and 1 column.
value
a character vector
Gods data cobbled from the website "Godchecker" after searching for the top 10 most popular deities by various regions/religions on their website.
This is a data frame of the NICKA blocks used by the U.S. government for devising code names for operations.
nicka_blocks
nicka_blocks
a data frame with 626 observations and 4 column.
block
a numeric block identifier
first_last
a character vector for the range of first and last characters assigned to the particular U.S. agency
letlet
a character vector, derived from the first_last
column
assigned_to
a character vector for the U.S. agency that had the block in question
Data are taken from here: http://www.designation-systems.net/usmilav/codenames.html
This is a data frame of nouns in the English language to use as an object in generating a code name.
nouns
nouns
a data frame with 6801 observations and 1 column.
value
a character vector
Nouns data come by way of "The Great Nouns List"
variety_pack()
is produces all types of code names available in codename.
variety_pack(seed)
variety_pack(seed)
seed |
an optional reproducible seed, which can be specified as a character or number. |
variety_pack()
takes an optional reproducible seed and produces all kinds of code names available in
codename. In order, the return is "any", "gods", "nicka", "ubuntu", and "wu-tang".
Steven V. Miller
variety_pack() variety_pack(seed = 8675309)
variety_pack() variety_pack(seed = 8675309)
This is a data frame of adjectives from the "Wu-Tang Name Generator" to use as an attribute in generating a code name.
wu_adjs
wu_adjs
a data frame with 45 observations and 1 column.
value
a character vector
These data are classic and apparently come from around 2002.
This is a data frame of nouns from the "Wu-Tang Name Generator" to use as an object in generating a code name.
wu_nouns
wu_nouns
a data frame with 40 observations and 1 column.
value
a character vector
These data are classic and apparently come from around 2002.
This is a data frame of colors in the English language to use as an attribute in generating a code name.
xkcd_colors
xkcd_colors
a data frame with 949 observations and 1 column.
value
a character vector
Colors found by way of the web comic XKCD.