GenderGuesser

An R package for using the genderize.io API to guess the gender of names.
git clone https://git.eamoncaddigan.net/GenderGuesser.git
Log | Files | Refs | README | LICENSE

README.md (1666B)


      1 # GenderGuesser
      2 
      3 Here's an R package for using the [genderize.io](https://genderize.io/) API to guess the gender of a name. There's already a really good [genderizeR](https://github.com/kalimu/genderizeR) package out there (and on CRAN), but it was missing enough of the features I wanted that it made more sense to write my own code than fork that project. 
      4 
      5 To use it, call `guessGender` with a character vector of (first) names. You can optionally pass (one of) a language code or country code to fine-tine results. If you've paid for an API key through [genderize.io](https://genderize.io/), you can pass that too.
      6 
      7 ## Example
      8 
      9 Use the `devtools` package to install GenderGuesser
     10 
     11 ```r
     12 library("devtools")
     13 install_github("eamoncaddigan/GenderGuesser")
     14 ```
     15 
     16 Calling `guessGender` with one or more names returns a `data.frame`. 
     17 
     18 ```r
     19 library("GenderGuesser")
     20 guessGender(c("Liam", "Natalie", "Eamon"))
     21 #>     name gender country_id language_id probability count
     22 #>1    Liam   male         NA          NA        0.99   623
     23 #>2 Natalie female         NA          NA        1.00  2033
     24 #>3   Eamon   male         NA          NA        1.00    63
     25 ```
     26 
     27 "Eamon" is an uncommon name, but only boys seem to have it so far. 
     28 
     29 ## Limits
     30 
     31 [genderize.io](https://genderize.io/) limits each IP address to 100 (free) queries per day, and each query can contain up to ten names. `guessGender` does the work of splitting a vector of arbitrary length into ten-name queries and combines the results. However, only one country or language code can be passed to the function, so querying, e.g., a single name in multiple countries must be done using multiple calls to `guessGender`.