Package 'fakir'

Title: Generate Fake Datasets for Prototyping and Teaching
Description: Create fake datasets that can be used for prototyping and teaching. This package provides a set of functions to generate fake data for a variety of data types, such as dates, addresses, and names. It can be used for prototyping (notably in 'shiny') or as a tool to teach data manipulation and data visualization.
Authors: Colin Fay [aut, cre] , Sebastien Rochette [aut] , ThinkR [cph]
Maintainer: Colin Fay <[email protected]>
License: MIT + file LICENSE
Version: 1.1.0
Built: 2024-11-20 05:21:56 UTC
Source: https://github.com/ThinkR-open/fakir

Help Index


Create a fake base of tickets

Description

A fake base of customer support tickets

Usage

fake_base_clients(n, local = c("en_US", "fr_FR"), seed = 2811)

Arguments

n

the number of clients

local

the local of the base. Currently supported : "fr_FR" and "en_US".

seed

the random seed, default is 2811

Value

A dataframe of fake clients.

Examples

fake_base_clients(n = 10)
fake_base_clients(n = 10, local = "fr_FR")

Fake base of products

Description

Fake base of products

Usage

fake_products(n, seed = 2811)

Arguments

n

Number of Products to generate

seed

the random seed, default is 2811

Value

a dataframe

A dataframe of fake products.

Examples

fake_products(10)

Base ticket client

Description

Une fausse base client de ticket Telecom

Usage

fake_ticket_client(
  vol,
  x,
  n = 200,
  split = FALSE,
  seed = 2811,
  local = c("en_US", "fr_FR")
)

Arguments

vol

le nombre de tickets a retourner

x

Optionnal. fake client data base

n

Number of clients in the client database if x not provided

split

la base doit elle ĂȘtre separee en deux ?

seed

fixe la graine aleatoire

local

the local of the base. Currently supported : "fr_FR" and "en_US".

Details

  • Same client can have multiple tickets

  • Some clients are more sampled than others

  • Some types are more sampled than others

  • Some etat are more sampled than others

Value

A dataframe of fake tickets.

Examples

x <- fake_ticket_client(1000, split = TRUE)
plot(x$clients$entry_date, x$clients$fidelity_points)
barplot(table(x$tickets$type))
barplot(table(x$tickets$state))

Fake user feedbacks

Description

Fake user feedbacks

Usage

fake_user_feedback(
  n,
  seed = 2811,
  from = "2012-01-01 00:00:01",
  to = "2020-01-01 00:00:01"
)

Arguments

n

Number of feedbacks to generate

seed

the random seed, default is 2811

from, to

the date to cover

Value

a dataframe

Examples

fake_user_feedback(10)

Create a fake support ticket base

Description

Create a fake support ticket base

Usage

fake_visits(
  from = "2017-01-01",
  to = "2017-12-31",
  local = c("en_US", "fr_FR"),
  seed = 2811
)

Arguments

from, to

the date to cover

local

the local of the base. Currently supported : "fr_FR" and "en_US".

seed

fixe la graine aleatoire

Value

A dataframe of fake web visits.

Examples

fake_visits()

Map of France

Description

A map of France as sf object. Can be used as dataset or for maps

Usage

fra_sf

Format

A data frame with 96 rows, 5 variables and a spatial geometry (MULTIPOLYGON):

OBJECTID

polygon identifier

pays

country: France

region

region name

departement

departement name

id_dpt

departement id

geometry

polygon geometry