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 Seaborn Larkin          Sport and exercise psychologist     707.108.1489     
#>  2 Miss Wende Weber DDS    Rural practice surveyor             08012067540      
#>  3 Adilene Crooks          Academic librarian                  659-158-3621x921…
#>  4 Orris Auer              Associate Professor                 (746)715-5768    
#>  5 Jerold Windler-West     Engineer, broadcasting (operations) (693)312-5895x004
#>  6 Twyla Lockman-Bergstrom Applications developer              (704)119-0892    
#>  7 Mr. Keshaun Dooley III  Investment banker, corporate        (967)400-0762    
#>  8 Mr. Arvil Roob PhD      Chartered public finance accountant 549-007-8467x617…
#>  9 Celine Cole             Management consultant               910-866-6328     
#> 10 Mrs. Janey Goodwin      Medical physicist                   1-028-820-7868   
ch_generate(n = 1)
#> # A tibble: 1 × 3
#>   name           job                          phone_number
#>   <chr>          <chr>                        <chr>       
#> 1 Daron Hills II Education officer, community 108.305.3581
ch_generate(n = 100)
#> # A tibble: 100 × 3
#>    name                   job                      phone_number        
#>    <chr>                  <chr>                    <chr>               
#>  1 Rogelio Block-Nitzsche Copy                     1-689-379-0841      
#>  2 Ely Jacobi             Engineer, chemical       993-070-3468        
#>  3 Leigh Stracke          Warden/ranger            1-992-219-7938x66394
#>  4 Mima Ruecker-Crooks    Leisure centre manager   +97(3)2251015105    
#>  5 Kenley Cronin          Recruitment consultant   736.958.5862x1393   
#>  6 Venie Herman           Programmer, applications 180-291-3880x264    
#>  7 Anaya Hayes            Catering manager         1-318-961-7440      
#>  8 Ned Hansen             Dancer                   977-012-2752        
#>  9 Hadley Hills Jr.       Structural engineer      845-629-8884x491    
#> 10 Celestine Douglas      Records manager          603.620.4123x42392  
#> # ℹ 90 more rows

ch_generate('job')
#> # A tibble: 10 × 1
#>    job                        
#>    <chr>                      
#>  1 Lecturer, higher education 
#>  2 Sub                        
#>  3 Psychologist, occupational 
#>  4 Claims inspector/assessor  
#>  5 Psychologist, occupational 
#>  6 Nature conservation officer
#>  7 Cartographer               
#>  8 Radiographer, therapeutic  
#>  9 Manufacturing engineer     
#> 10 Theme park manager         
ch_generate('job', 'name')
#> # A tibble: 10 × 2
#>    job                             name              
#>    <chr>                           <chr>             
#>  1 Water quality scientist         Maverick Bashirian
#>  2 Heritage manager                Dr. Kody Hansen   
#>  3 Accountant, chartered certified Britany Lubowitz  
#>  4 Public house manager            Beyonce Brekke    
#>  5 Ergonomist                      Emit Weimann      
#>  6 Broadcast presenter             Dr. Luster Hayes  
#>  7 Designer, television/film set   Melvyn O'Kon      
#>  8 Early years teacher             Troy Pfannerstill 
#>  9 Medical illustrator             Riley Murray      
#> 10 Editorial assistant             Ms. Dema Boyer    
ch_generate('job', 'color_name')
#> # A tibble: 10 × 2
#>    job                                color_name     
#>    <chr>                              <chr>          
#>  1 Police officer                     HoneyDew       
#>  2 Systems analyst                    MidnightBlue   
#>  3 Special effects artist             RosyBrown      
#>  4 Tourist information centre manager NavajoWhite    
#>  5 Personal assistant                 MediumSlateBlue
#>  6 Engineer, energy                   MintCream      
#>  7 Sport and exercise psychologist    RoyalBlue      
#>  8 Programmer, applications           LightSkyBlue   
#>  9 Accounting technician              BurlyWood      
#> 10 Lobbyist                           DarkOrange     

# locale
ch_generate(locale = "en_US")
#> # A tibble: 10 × 3
#>    name                    job                                      phone_number
#>    <chr>                   <chr>                                    <chr>       
#>  1 Kristyn Toy             Administrator, charities/voluntary orga… 322-555-949…
#>  2 Norbert Muller          Translator                               002.944.6954
#>  3 Dr. Chin Gorczany       Clinical scientist, histocompatibility … 1-173-651-6…
#>  4 Beckie Parisian MD      Engineer, petroleum                      173-379-0382
#>  5 Kayden Thompson         Market researcher                        07839630680 
#>  6 Ms. Cheyenne Brekke DVM Energy engineer                          08162288191 
#>  7 Ezzard Erdman MD        Merchant navy officer                    05774471023 
#>  8 Susana Hickle MD        Aeronautical engineer                    273.210.5455
#>  9 Mr. Travon Brown Jr.    Conservator, furniture                   712.364.137…
#> 10 Cordaro Herzog          Environmental consultant                 659.344.9109
ch_generate(locale = "fr_FR")
#> # A tibble: 10 × 3
#>    name                      job                                    phone_number
#>    <chr>                     <chr>                                  <chr>       
#>  1 Tristan Roy d'Hamon       Technicien de maintenance en génie cl… +33 1 44 16…
#>  2 Henri Meyér               Chaudronnier                           +33 1 25 85…
#>  3 Jacques Fernandes L'Dumas Conducteur de machines agricoles       06 26 48 21…
#>  4 Emmanuel Gilles           Ingénieur technico-commerciale en éle… 0103544499  
#>  5 Marine Ramos              Installateur en télécoms               01 64 64 59…
#>  6 Margaux Imbert            Chargé d'études en aménagement         +33 8 19 08…
#>  7 Nicolas Rousséau          Cogniticien                            +33 (0)6 04…
#>  8 Martin Nguyen             Mécanicien                             +33 (0)1 92…
#>  9 Antoine Costa-Vidal       Ouvrier                                +33 (0)5 05…
#> 10 Aimé Allain               Gouvernante                            +33 2 05 67…
ch_generate(locale = "fr_CH")
#> # A tibble: 10 × 3
#>    name                       job                                   phone_number
#>    <chr>                      <chr>                                 <chr>       
#>  1 Laetitia Mayor             Mécanicien en motocycles              +41 89 735 …
#>  2 Michael Beuret             Charpentier CFC                       +41 95 915 …
#>  3 Elisabeth Chatriant-Comman Gainier                               0901 182 831
#>  4 Pierre Corbat              Horloger de production CFC            +41 (0)91 9…
#>  5 Arthur Barillon            Luthier                               091 928 90 …
#>  6 Louis Duvanel              Maître tableaux électriques et autom… +41 38 259 …
#>  7 Roland Alber               Bottier-orthopédiste                  068 635 93 …
#>  8 Christian Chatriant        Créateur de textiles intérieurs avec… +41 (0)20 1…
#>  9 Christian Brandt-Rey       Designer graphique diplomé            076 422 61 …
#> 10 Léa Cosandey-Chappuis      Nettoyeur de textiles CFC             +41 49 992 …