GithubHelp home page GithubHelp logo

randomdatagenerator's Introduction

Demo Data Generator

The Demo Data Generator is a Python script that generates demo data in JSON format for testing or demonstration purposes. This script creates synthetic data with random values for various fields such as names, IDs, dates, prices, and more.

Installation

To use the Demo Data Generator, you need to have Python installed on your system. Additionally, you'll need to install the Faker library, which is used to generate fake data.

You can install Faker using pip, the Python package installer. Run the following command in your command prompt or terminal:

Usage

To generate demo data, run the demo_data_generator.py script. You can customize the number of lines of data generated and the output file path.

Running the Script

Navigate to the directory containing the demo_data_generator.py script in your command prompt or terminal.

Run the script using the following command:

Customizing Data Generation

You can customize the data generation by modifying the parameters inside the demo_data_generator.py script. For example, you can change the number of lines of data generated or customize the fields and their types.

Data Format

The generated demo data is stored in JSON format. Each JSON object represents a single data entry with various fields such as:

  • First name
  • Last name
  • ID
  • Start date
  • End date
  • Price
  • Paid (Yes/No)
  • Complete (Yes/No)
  • City
  • State
  • Birthdate

Output

By default, the generated demo data is saved in a JSON file named demo_data.json in the same directory as the script. You can specify a different output directory or file name by modifying the script.

Example

Here's an example of generated demo data:

[
    {
        "Fname": "John",
        "Lname": "Doe",
        "ID": "12345678",
        "StartDate": "2023-03-03",
        "EndDate": "2023-03-22",
        "Price": 589.45,
        "Paid": "Yes",
        "Complete": "No",
        "City": "New York",
        "State": "NY",
        "Birthdate": "1985-08-12"
    },
    {
        "Fname": "Jane",
        "Lname": "Smith",
        "ID": "87654321",
        "StartDate": "2022-11-25",
        "EndDate": "2022-12-14",
        "Price": 278.73,
        "Paid": "No",
        "Complete": "Yes",
        "City": "Los Angeles",
        "State": "CA",
        "Birthdate": "1992-05-28"
    },
    ...
]

randomdatagenerator's People

Contributors

gffinn avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.