Skip to contents

Generate a fake dataset

Usage

ch_generate(..., n = 10, locale = NULL)

Arguments

...

columns to include. must be in the allowed set. See Allowed column names below. Three default columns are included (name, job, phone_number) if nothing is specified - but are overridden by any input.

n

(integer) number of things to get, any non-negative integer

locale

(character) the locale to use. options: only supported for data types that have locale support, See each data provider for details.

Allowed column names

  • name (default included)

  • job (default included)

  • phone_number (default included)

  • currency

  • color_name

  • rgb_color

  • rgb_css_color

Examples

ch_generate()
#> # A tibble: 10 × 3
#>    name                 job                            phone_number       
#>    <chr>                <chr>                          <chr>              
#>  1 Dr. Hilton Larkin    Civil engineer, consulting     09483823503        
#>  2 Judy Harvey          Call centre manager            1-521-696-4259x739 
#>  3 Jeffery Barrows DDS  Barrister                      (459)025-9060x52374
#>  4 Eustace Senger DVM   Scientist, research (maths)    939-276-2885x9808  
#>  5 Loney Kunde          Product designer               413-031-9971x5582  
#>  6 Waldo Kreiger        Acupuncturist                  (404)834-5726      
#>  7 Baby Schaden         Research scientist (maths)     (133)224-4243x46020
#>  8 Early Berge V        Dispensing optician            027-505-6095x1553  
#>  9 Brandon O'Hara       Editor, film/video             1-356-260-2915     
#> 10 Roseann Wilderman MD Investment banker, operational 822-123-7999       
ch_generate(n = 1)
#> # A tibble: 1 × 3
#>   name                 job                phone_number    
#>   <chr>                <chr>              <chr>           
#> 1 Dr. Reynaldo Fritsch Engineer, drilling +71(2)9995760864
ch_generate(n = 100)
#> # A tibble: 100 × 3
#>    name                      job                              phone_number      
#>    <chr>                     <chr>                            <chr>             
#>  1 Chelsea Little            Clinical embryologist            885-491-7487x051  
#>  2 Vincenza VonRueden        Mechanical engineer              08866245183       
#>  3 Dr. Idabelle Bergnaum DDS Aeronautical engineer            1-606-569-1649x974
#>  4 Mrs. Keshia Mills         Psychologist, educational        (175)442-4470     
#>  5 Hartwell Collier-Hayes    Psychologist, sport and exercise 543-969-3216x8777 
#>  6 Bella O'Hara-Rohan        Psychologist, occupational       510-143-8465      
#>  7 Leon Deckow               Hospital pharmacist              1-885-944-4450x856
#>  8 Jamie Jast                Administrator, local government  694.021.2084x04387
#>  9 Thornton Cartwright       Radiographer, therapeutic        1-629-094-0316x85…
#> 10 Miss Chantel Kessler DVM  Animator                         904.921.6786      
#> # ℹ 90 more rows

ch_generate("job")
#> # A tibble: 10 × 1
#>    job                                              
#>    <chr>                                            
#>  1 Land/geomatics surveyor                          
#>  2 Designer, television/film set                    
#>  3 Transport planner                                
#>  4 Dentist                                          
#>  5 Restaurant manager, fast food                    
#>  6 Commercial art gallery manager                   
#>  7 Editor, film/video                               
#>  8 Historic buildings inspector/conservation officer
#>  9 Futures trader                                   
#> 10 Editor, film/video                               
ch_generate("job", "name")
#> # A tibble: 10 × 2
#>    job                        name                 
#>    <chr>                      <chr>                
#>  1 Surveyor, building control Paulo Bailey         
#>  2 Surveyor, hydrographic     Melodie Ernser       
#>  3 Chief of Staff             Dr. Mechelle Stracke 
#>  4 Engineer, aeronautical     Wilford Zboncak      
#>  5 Facilities manager         Mr. Rogers Sanford V 
#>  6 Call centre manager        Ms. Mahala Kohler DDS
#>  7 Aid worker                 Merilyn Wilderman    
#>  8 Education administrator    Aggie Mante          
#>  9 Architectural technologist Ms. Kaylee Daniel DDS
#> 10 Private music teacher      Angelica Koch        
ch_generate("job", "color_name")
#> # A tibble: 10 × 2
#>    job                          color_name   
#>    <chr>                        <chr>        
#>  1 Engineer, building services  CadetBlue    
#>  2 Research scientist (medical) Sienna       
#>  3 Data processing manager      Plum         
#>  4 Investment analyst           Navy         
#>  5 Medical physicist            Brown        
#>  6 Legal secretary              IndianRed    
#>  7 Occupational hygienist       LightSeaGreen
#>  8 Media buyer                  LightPink    
#>  9 Food technologist            Moccasin     
#> 10 Adult guidance worker        LightGray    

# locale
ch_generate(locale = "en_US")
#> # A tibble: 10 × 3
#>    name                    job                                 phone_number     
#>    <chr>                   <chr>                               <chr>            
#>  1 Else Hermiston MD       Paediatric nurse                    1-612-043-2036x0…
#>  2 Wyman Turcotte          Theatre director                    786-404-6909     
#>  3 Wayland Mills           Air traffic controller              707-951-6971x5922
#>  4 Dr. Valerie Klocko      Engineer, structural                (139)253-7232x56…
#>  5 Mrs. Corina Blick       Dance movement psychotherapist      218.805.5841x022…
#>  6 Mrs. Fannye Kshlerin MD Community development worker        129.523.1404x396 
#>  7 Ms. Aretha Bayer        Designer, blown glass/stained glass 294-290-8900     
#>  8 Powell Funk-Breitenberg Jewellery designer                  092.130.2328x165 
#>  9 Jess Green              Engineer, communications            1-026-056-1970x6…
#> 10 Okey Rice               Surveyor, minerals                  1-875-078-0049   
ch_generate(locale = "fr_FR")
#> # A tibble: 10 × 3
#>    name                    job                                      phone_number
#>    <chr>                   <chr>                                    <chr>       
#>  1 Noémi Descamps          Rudologue                                0328774531  
#>  2 Valérie Dupre           Géochimiste                              01 54 65 77…
#>  3 Louise Vincent-Cohen    Accompagnateur de tourisme équestre      +33 (0)5 22…
#>  4 Françoise Rogér         Visiteur                                 01 45 35 04…
#>  5 Maryse Evrard           Professeur d'éducation physique et spor… +33 2 78 45…
#>  6 Océane Valentin L'Alves Enseignant humanitaire                   0658143519  
#>  7 Alex Gomez              Juge d'instance                          0234388875  
#>  8 Alexandria Barbiér      Déménageur                               0664150819  
#>  9 Corinne Paul d'Rénault  Chargé d'études en valorisation agricol… 0658000422  
#> 10 Pierre-Emmanuel Gomez   Technicien d'analyses biomédicales       0661034406  
ch_generate(locale = "fr_CH")
#> # A tibble: 10 × 3
#>    name                      job                                    phone_number
#>    <chr>                     <chr>                                  <chr>       
#>  1 Laura Mottet              Professeur de danse de couple avec br… 0906 016 321
#>  2 Matteo Grosjean           Artisan du cuir et du textile CFC      0848 618 450
#>  3 Kevin Conrad              Serrurier sur véhicules CFC            +41 22 238 …
#>  4 Eliane Rappaz-Saudan      Techno-polygraphe avec brevet fédéral… 043 571 63 …
#>  5 Loïc Rappaz               Assistant de bureau AFP                090 329 01 …
#>  6 Thomas Bonvin             Electricien de réseau CFC              +41 88 712 …
#>  7 José Comman               Coordinateur en médecine ambulatoire … 030 326 41 …
#>  8 Thomas de Dardel          Contrôleur de combustion avec brevet … 065 825 37 …
#>  9 Maxime Barbey             Maître dans l'industrie                066 299 02 …
#> 10 Danielle Jacot-Guillarmod contrôleur de la circulation aérienne… 0901 215 444