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 Janelle Legros-Glover    Higher education careers adviser 160-450-0622       
#>  2 Christi Franecki-Wehner  Dietitian                        (492)812-8205x55138
#>  3 Kasie Conn               Development worker, community    +49(2)9999803276   
#>  4 Irena Blanda             Therapist, nutritional           (230)461-1230x777  
#>  5 Justus Auer              Counselling psychologist         168-870-2089       
#>  6 Jaydan Mann              Editor, commissioning            (809)182-8075      
#>  7 Mrs. Claribel Schowalter Multimedia specialist            (952)491-5497x2311 
#>  8 Zana Schumm              Doctor, hospital                 1-140-684-3292     
#>  9 Dr. Lynette Howe DDS     Engineer, water                  1-394-437-7233     
#> 10 Dr. Horace Littel        Engineer, civil (consulting)     01966008393        
ch_generate(n = 1)
#> # A tibble: 1 × 3
#>   name              job             phone_number
#>   <chr>             <chr>           <chr>       
#> 1 Caleigh Ankunding Hospital doctor 986.519.8476
ch_generate(n = 100)
#> # A tibble: 100 × 3
#>    name                   job                                    phone_number   
#>    <chr>                  <chr>                                  <chr>          
#>  1 Cruz Schmeler          Equities trader                        04045926850    
#>  2 Tamala Schneider-Jerde Petroleum engineer                     639.839.7034x4…
#>  3 Zettie Toy             Manufacturing engineer                 1-706-090-9843 
#>  4 Vito Wisozk            Scientist, forensic                    995.865.2696x9…
#>  5 Lennon Ullrich-Sanford Statistician                           415.727.8862   
#>  6 Pablo Jacobson         Haematologist                          06698440201    
#>  7 Eino Beer IV           Teacher, English as a foreign language 595.021.4089x5…
#>  8 Coleton Koch-Jacobi    Food technologist                      975-953-8785x2…
#>  9 Bettie Hintz DVM       Occupational therapist                 556.481.0423x4…
#> 10 Brody Bahringer Jr.    Administrator, Civil Service           (473)998-7918x…
#> # … with 90 more rows

ch_generate('job')
#> # A tibble: 10 × 1
#>    job                          
#>    <chr>                        
#>  1 Retail manager               
#>  2 Warehouse manager            
#>  3 Podiatrist                   
#>  4 Town planner                 
#>  5 Politician's assistant       
#>  6 Telecommunications researcher
#>  7 Biomedical scientist         
#>  8 Journalist, broadcasting     
#>  9 Regulatory affairs officer   
#> 10 Community arts worker        
ch_generate('job', 'name')
#> # A tibble: 10 × 2
#>    job                                 name                    
#>    <chr>                               <chr>                   
#>  1 Technical sales engineer            Claiborne Torp-Prohaska 
#>  2 Visual merchandiser                 Averi Franecki          
#>  3 Horticultural consultant            Rhea Schoen             
#>  4 Ambulance person                    Carolyne O'Conner       
#>  5 Social research officer, government Mr. Albertus Schuppe Jr.
#>  6 Community education officer         Penelope White          
#>  7 Water quality scientist             Maddox Dicki            
#>  8 Sales professional, IT              Talan Stehr III         
#>  9 Scientist, physiological            Rosco Altenwerth        
#> 10 Computer games developer            Torie Rodriguez         
ch_generate('job', 'color_name')
#> # A tibble: 10 × 2
#>    job                       color_name    
#>    <chr>                     <chr>         
#>  1 Engineer, manufacturing   Fuchsia       
#>  2 Heritage manager          LawnGreen     
#>  3 Accountant, chartered     Blue          
#>  4 Analytical chemist        Lavender      
#>  5 Fisheries officer         GhostWhite    
#>  6 Engineer, mining          Aquamarine    
#>  7 Brewing technologist      White         
#>  8 Radiographer, therapeutic DarkSlateGray 
#>  9 Intelligence analyst      LightPink     
#> 10 Software engineer         MediumSeaGreen

# locale
ch_generate(locale = "en_US")
#> # A tibble: 10 × 3
#>    name                       job                                   phone_number
#>    <chr>                      <chr>                                 <chr>       
#>  1 Mrs. Margretta Dickens DDS Optician, dispensing                  1-093-537-8…
#>  2 Benjamine Stiedemann       Surveyor, building control            (896)443-75…
#>  3 Baylie Gerlach             Accommodation manager                 646-517-845…
#>  4 Louetta Kihn PhD           Barrister's clerk                     (647)234-55…
#>  5 Abagail Parker             Secretary, company                    648-818-162…
#>  6 Drake Grady                Restaurant manager                    429-691-5506
#>  7 Curt Lowe                  Scientist, research (physical scienc… 1-166-410-9…
#>  8 Tracie Bins                Estate agent                          754.234.3941
#>  9 Nola Hamill                Systems analyst                       398-871-416…
#> 10 Mr. Lone Ritchie           Lighting technician, broadcasting/fi… 778-650-4131
ch_generate(locale = "fr_FR")
#> # A tibble: 10 × 3
#>    name                         job                                phone_number 
#>    <chr>                        <chr>                              <chr>        
#>  1 Jérôme Lemonnier             Orthoptiste                        +33 2 74 10 …
#>  2 William Berthelot            Sommelier                          06 63 22 20 …
#>  3 Gilles Paris d'Maillot       Chargé                             +33 4 74 28 …
#>  4 Gilbert Gonzaléz             Concepteur de niveaux de jeu web   05 44 20 55 …
#>  5 Monique Bailly               Expert en sécurité informatique    0676528482   
#>  6 Alain Coulon                 Architecte réseau                  0863527165   
#>  7 Luc Guérin                   Coffreur                           +33 (0)6 44 …
#>  8 Célina d'Rossi               Démographe                         +33 8 38 87 …
#>  9 Éléonore Pasquier L'Charrier Styliste                           03 35 65 91 …
#> 10 Vincent Coulon               Vendeur en fournitures automobiles 01 13 49 45 …
ch_generate(locale = "fr_CH")
#> # A tibble: 10 × 3
#>    name                   job                                       phone_number
#>    <chr>                  <chr>                                     <chr>       
#>  1 Christophe Peitrequin  Mécanicien de production CFC              0878 615 980
#>  2 Vincent Conrad         Mécanicien en machines agricoles CFC      +41 (0)53 4…
#>  3 Nathalie Bonvin        Artisan du cuir et du textile CFC         0878 343 285
#>  4 Liliane Mercier        Projeteur frigoriste CFC                  098 203 32 …
#>  5 Sara de Dardel-Barbey  Concierge avec brevet fédéral             +41 (0)52 1…
#>  6 José Martin            Concierge avec brevet fédéral             +41 (0)83 9…
#>  7 René Crevoisier        Mécanicien de production CFC              089 335 08 …
#>  8 Stéphanie Monnet       Opticien en instruments de précision CFC  +41 90 295 …
#>  9 Alicia Charpié-Robadey Mécanicien en cycles CFC                  +41 81 494 …
#> 10 Bernard Vienne         Expert diplômé en finance et investissem… +41 72 437 …