{
  "format": "dataset-manifest/1",
  "slug": "peer-to-peer-lending-insights",
  "version": 2,
  "seed": "peer-to-peer-lending-insights:1",
  "spec": {
    "format": "dataset/1",
    "slug": "peer-to-peer-lending-insights",
    "name": "Peer-to-Peer Lending Insights",
    "tagline": "Loan requests, investments, fees, and repayment data from a peer-to-peer lending platform.",
    "description": "A peer-to-peer lending platform facilitates transactions between borrowers and investors, enabling individuals and businesses to access funds while providing investors with opportunities to generate returns on their investments. Loan requests are made by those in need of capital, detailing the amount required and the intended use of the funds. Investors review these requests and choose which loans to fund, often spreading their investments across multiple borrowers to diversify their risk. The platform itself charges fees for facilitating these transactions and manages repayment schedules that outline when borrowers need to return the borrowed funds along with any interest. \n\nIn this dataset, the 'loans' table captures essential information about each loan transaction. Each row represents an individual loan request, detailing attributes such as the borrower’s ID, loan amount, interest rate, term length, and status of the loan. This table can be joined with other potential tables that might include investor profiles or transaction history, allowing for a broader analysis of how different investments perform relative to their associated loans. \n\nThe data answers pertinent questions, such as what types of loans are most frequently requested, the typical interest rates across different loan amounts, and how often loans are repaid on time versus those that incur late fees. This presents a rich opportunity for analysis, enabling developers to practice working with lending data, understanding borrower behavior, and examining investor strategies. Given its synthetic nature, this dataset provides a safe environment for experimentation and learning without the risks associated with real financial data.",
    "domain": "fintech",
    "shape": "ledger",
    "useCases": [
      "sql-practice",
      "teaching"
    ],
    "keywords": [
      "peer-to-peer lending",
      "investments",
      "loans",
      "financial analysis",
      "synthetic data"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "loans": {
        "description": "Each row represents a loan transaction, detailing the borrower, investment amount, status, and repayment schedule.",
        "rows": 500,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each loan transaction."
          },
          "borrower_id": {
            "kind": "uuid",
            "description": "Unique identifier for the borrower."
          },
          "investor_id": {
            "kind": "uuid",
            "description": "Unique identifier for the investor."
          },
          "loan_amount": {
            "kind": "decimal",
            "min": 1000,
            "max": 50000,
            "scale": 2,
            "description": "The total amount of the loan requested.",
            "distribution": "long-tail"
          },
          "invested_amount": {
            "kind": "decimal",
            "min": 100,
            "max": 50000,
            "scale": 2,
            "description": "The amount invested by the investor.",
            "distribution": "long-tail"
          },
          "platform_fee": {
            "kind": "decimal",
            "min": 0,
            "max": 5000,
            "scale": 2,
            "description": "Fee charged by the platform for the transaction.",
            "distribution": "long-tail"
          },
          "status": {
            "kind": "enum",
            "values": [
              "active",
              "repaid",
              "late",
              "defaulted",
              "sold"
            ],
            "description": "Current status of the loan."
          },
          "repayment_date": {
            "kind": "date",
            "from": "2022-01-01",
            "to": "2025-12-31",
            "description": "The date by which the loan is to be repaid.",
            "nullable": true,
            "when": {
              "column": "status",
              "in": [
                "repaid",
                "late",
                "defaulted"
              ]
            },
            "trend": "growing"
          },
          "created_at": {
            "kind": "datetime",
            "from": "2022-01-01",
            "to": "2023-12-31",
            "description": "The timestamp when the loan was created.",
            "dayProfile": "business"
          }
        }
      }
    },
    "structure": "single-table",
    "traits": [
      "monetary",
      "timestamped",
      "high-cardinality"
    ],
    "analysisQuestions": [
      "What percentage of loans are successfully repaid versus defaulted?",
      "How do platform fees vary by loan amount?",
      "What is the average repayment time for loans in different status categories?",
      "Which borrowers tend to incur late fees more frequently?",
      "How does investor participation differ across loan amounts?"
    ],
    "suggestedQueries": [
      {
        "title": "Retrieve active loans",
        "sql": "SELECT * FROM loans WHERE status = 'active';",
        "dialect": "postgres"
      },
      {
        "title": "Calculate total fees collected",
        "sql": "SELECT SUM(platform_fee) FROM loans;",
        "dialect": "postgres"
      },
      {
        "title": "Average loan amount by status",
        "sql": "SELECT status, AVG(loan_amount) FROM loans GROUP BY status;",
        "dialect": "postgres"
      },
      {
        "title": "Loans repaid over time",
        "sql": "SELECT DATE_TRUNC('month', repayment_date) AS month, COUNT(*) FROM loans WHERE status = 'repaid' GROUP BY month ORDER BY month;",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "Student Projects",
        "body": "Students in finance or data analytics courses can use this dataset to complete projects analyzing lending patterns and investment strategies. They can create reports, visualizations, and presentations based on the data, providing a practical learning experience."
      },
      {
        "title": "SQL Training",
        "body": "Instructors can utilize this dataset for teaching SQL skills, allowing students to practice writing queries to extract insights. The diverse data points encourage exploration of complex joins, aggregations, and filtering techniques."
      },
      {
        "title": "Data Analysis Workshops",
        "body": "Data analysts can leverage the dataset in workshops focused on financial analytics, exploring how various loan statuses impact investor returns. Participants can work on real-world scenarios and enhance their analytical skills using synthetic data."
      }
    ]
  },
  "counts": {
    "loans": 500
  },
  "stats": {
    "loans": {
      "rows": 500,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 500,
          "min": 1,
          "max": 500
        },
        "borrower_id": {
          "nulls": 0,
          "distinct": 500
        },
        "investor_id": {
          "nulls": 0,
          "distinct": 500
        },
        "loan_amount": {
          "nulls": 0,
          "distinct": 500,
          "min": 1000,
          "max": 49866.1
        },
        "invested_amount": {
          "nulls": 0,
          "distinct": 500,
          "min": 100.01,
          "max": 49969.44
        },
        "platform_fee": {
          "nulls": 0,
          "distinct": 500,
          "min": 0.09,
          "max": 4995.82
        },
        "status": {
          "nulls": 0,
          "distinct": 5,
          "min": "active",
          "max": "sold"
        },
        "repayment_date": {
          "nulls": 206,
          "distinct": 266,
          "min": "2022-01-11",
          "max": "2025-12-29"
        },
        "created_at": {
          "nulls": 0,
          "distinct": 500,
          "min": "2022-01-01 09:49:44",
          "max": "2023-12-31 16:56:20"
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/loans.csv",
      "format": "csv",
      "table": "loans",
      "key": "datasets/peer-to-peer-lending-insights/v2/csv/loans.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/peer-to-peer-lending-insights/v2/csv/loans.csv",
      "bytes": 68570,
      "sha256": "1cbbb319b636bd8f048121780e07801a71994576da5a67ff1e1a85d0cba062f4",
      "rows": 500,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "peer-to-peer-lending-insights.json",
      "format": "json",
      "table": null,
      "key": "datasets/peer-to-peer-lending-insights/v2/peer-to-peer-lending-insights.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/peer-to-peer-lending-insights/v2/peer-to-peer-lending-insights.json",
      "bytes": 174703,
      "sha256": "548fe2bba5e3213469c77f7d523e900efea93d2966a0157bba74ee7d3484f295",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/peer-to-peer-lending-insights/v2/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/peer-to-peer-lending-insights/v2/sql/postgres.sql",
      "bytes": 82132,
      "sha256": "85d881e0e919ba97aebb790137fad0f1288e237b01c82fef64e641452a507963",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/peer-to-peer-lending-insights/v2/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/peer-to-peer-lending-insights/v2/sql/mysql.sql",
      "bytes": 82046,
      "sha256": "e4063de1934ab513df2c5606c9c57fd0417047cef09ce92f93b32d75df5f2424",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/peer-to-peer-lending-insights/v2/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/peer-to-peer-lending-insights/v2/sql/mssql.sql",
      "bytes": 84413,
      "sha256": "8658413284cb22c4f679cd6677305286febaf86835cc95efa0a8bf257d72239e",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/peer-to-peer-lending-insights/v2/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/peer-to-peer-lending-insights/v2/sql/sqlite.sql",
      "bytes": 82011,
      "sha256": "7e424bebabcf46270050aba8f3b0932e56eb6ed29e709a8d91e4ace8c5061081",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/peer-to-peer-lending-insights/v2/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/peer-to-peer-lending-insights/v2/prisma/seed.ts",
      "bytes": 150124,
      "sha256": "ac2a526ba9d8fcd47b4a6235540fd082791fe5374ea29686334f19dd402700ff",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/peer-to-peer-lending-insights/v2/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/peer-to-peer-lending-insights/v2/django/fixtures.json",
      "bytes": 198883,
      "sha256": "7ca78894a4f4ff8e19f622c64a6f4a11fd385dfcfb165289161d188130860d69",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788767117239,
  "updatedAt": 1788785377951
}
