{
  "format": "dataset-manifest/1",
  "slug": "home-finance-ledger",
  "version": 1,
  "seed": "home-finance-ledger:1",
  "spec": {
    "format": "dataset/1",
    "slug": "home-finance-ledger",
    "name": "Home Finance Ledger",
    "tagline": "Customer profiles, loan products, property details, and financial relationships for a mortgage and loan company.",
    "description": "A mortgage and loan company manages the intricate relationships between clients and their financing options, guiding them through securing funds for homes and investments. This dataset captures the essential elements of customer profiles, loan products, property details, and the loan funding processes, while tracking employment history and creditworthiness. The table models diverse financing profiles, where most customers have straightforward loans, while a smaller portion involves complex co-borrowing scenarios or varied asset portfolios. This synthetic dataset provides a rich resource for practicing SQL queries and understanding the various dimensions of mortgage and loan management. It is useful for teaching purposes as well, allowing learners to engage with real-world financial data without the complexities of actual personal information.",
    "domain": "banking",
    "shape": "ledger",
    "useCases": [
      "sql-practice",
      "teaching"
    ],
    "keywords": [
      "mortgage",
      "loan",
      "finance",
      "customer",
      "credit",
      "property",
      "employment",
      "co-borrowing",
      "assets"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "home_finance": {
        "description": "This table captures the details of client mortgages and loans, linking customer profiles with their financing options, property details, and relevant employment history. Each row represents a unique financing profile, including information on loan amounts, interest rates, and repayment statuses.",
        "rows": 500,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each financing profile."
          },
          "customer_name": {
            "kind": "fullName",
            "description": "Full name of the customer."
          },
          "loan_amount": {
            "kind": "decimal",
            "min": 10000,
            "max": 1000000,
            "scale": 2,
            "description": "Total amount of the loan."
          },
          "interest_rate": {
            "kind": "decimal",
            "min": 0.01,
            "max": 0.15,
            "scale": 4,
            "description": "Interest rate applicable to the loan."
          },
          "loan_term_years": {
            "kind": "int",
            "min": 5,
            "max": 30,
            "description": "Duration of the loan in years."
          },
          "property_value": {
            "kind": "decimal",
            "min": 50000,
            "max": 3000000,
            "scale": 2,
            "description": "Estimated market value of the property."
          },
          "employment_status": {
            "kind": "enum",
            "values": [
              "employed",
              "unemployed",
              "self-employed"
            ],
            "description": "Current employment status of the customer."
          },
          "credit_score": {
            "kind": "int",
            "min": 300,
            "max": 850,
            "description": "Credit score of the customer."
          },
          "co_borrower": {
            "kind": "fullName",
            "nullable": true,
            "description": "Full name of the co-borrower, if applicable."
          },
          "loan_status": {
            "kind": "enum",
            "values": [
              "active",
              "paid off",
              "defaulted"
            ],
            "description": "Current status of the loan."
          },
          "application_date": {
            "kind": "date",
            "from": "2020-01-01",
            "to": "2023-12-31",
            "description": "Date when the loan application was submitted.",
            "trend": "growing"
          }
        }
      }
    },
    "structure": "single-table",
    "traits": [
      "monetary",
      "categorical",
      "nullable",
      "timestamped"
    ],
    "analysisQuestions": [
      "What is the average loan amount for active loans?",
      "How does the interest rate vary based on customer credit scores?",
      "What percentage of customers have co-borrowers in their loans?",
      "Which employment status has the highest average loan amount?",
      "How many loans have defaulted in the past year?"
    ],
    "suggestedQueries": [
      {
        "title": "Join on Loan Status",
        "sql": "SELECT loan_status, COUNT(*) FROM home_finance GROUP BY loan_status;",
        "dialect": "postgres"
      },
      {
        "title": "Average Loan Amount by Employment Status",
        "sql": "SELECT employment_status, AVG(loan_amount) FROM home_finance GROUP BY employment_status;",
        "dialect": "postgres"
      },
      {
        "title": "Count of Loans by Credit Score Range",
        "sql": "SELECT CASE WHEN credit_score < 600 THEN 'Low' WHEN credit_score BETWEEN 600 AND 700 THEN 'Medium' ELSE 'High' END AS score_range, COUNT(*) FROM home_finance GROUP BY score_range;",
        "dialect": "postgres"
      },
      {
        "title": "Loans Over Time",
        "sql": "SELECT DATE_TRUNC('month', application_date) AS month, COUNT(*) FROM home_finance GROUP BY month ORDER BY month;",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "Financial Analysts",
        "body": "Financial analysts can utilize this dataset to evaluate the performance of mortgage products over time. They can analyze trends in loan amounts, interest rates, and default rates to inform strategic decisions regarding lending policies and risk management."
      },
      {
        "title": "Educators and Students",
        "body": "Educators can use this dataset in finance courses to teach students about mortgage and loan management. It provides a practical example for students to apply theoretical concepts in a real-world context, enhancing their understanding of financial data analysis."
      },
      {
        "title": "Loan Officers",
        "body": "Loan officers can leverage this data to assess customer applications more effectively. By analyzing the relationship between credit scores and loan amounts, they can better determine lending criteria and offer tailored financing solutions to clients."
      }
    ]
  },
  "counts": {
    "home_finance": 500
  },
  "stats": {
    "home_finance": {
      "rows": 500,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 500,
          "min": 1,
          "max": 500
        },
        "customer_name": {
          "nulls": 0,
          "distinct": 480,
          "min": "Alice Andersen",
          "max": "Zoe Vargas"
        },
        "loan_amount": {
          "nulls": 0,
          "distinct": 500,
          "min": 10198.75,
          "max": 999316.08
        },
        "interest_rate": {
          "nulls": 0,
          "distinct": 424,
          "min": 0.01,
          "max": 0.1499
        },
        "loan_term_years": {
          "nulls": 0,
          "distinct": 26,
          "min": 5,
          "max": 30
        },
        "property_value": {
          "nulls": 0,
          "distinct": 500,
          "min": 51766.64,
          "max": 2998700.74
        },
        "employment_status": {
          "nulls": 0,
          "distinct": 3,
          "min": "employed",
          "max": "unemployed"
        },
        "credit_score": {
          "nulls": 0,
          "distinct": 325,
          "min": 304,
          "max": 850
        },
        "co_borrower": {
          "nulls": 44,
          "distinct": 440,
          "min": "Alice Khan",
          "max": "Zoe Johnson"
        },
        "loan_status": {
          "nulls": 0,
          "distinct": 3,
          "min": "active",
          "max": "paid off"
        },
        "application_date": {
          "nulls": 0,
          "distinct": 406,
          "min": "2020-01-08",
          "max": "2023-12-30"
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/home_finance.csv",
      "format": "csv",
      "table": "home_finance",
      "key": "datasets/home-finance-ledger/v1/csv/home_finance.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/home-finance-ledger/v1/csv/home_finance.csv",
      "bytes": 46738,
      "sha256": "da05447b47856cde824fdbee443d1c1f7b41ca173545ac1503782fdffa1f8871",
      "rows": 500,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "home-finance-ledger.json",
      "format": "json",
      "table": null,
      "key": "datasets/home-finance-ledger/v1/home-finance-ledger.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/home-finance-ledger/v1/home-finance-ledger.json",
      "bytes": 185017,
      "sha256": "1723a3b0b3b26c1da06aee0b41922c902b8a7ecc5d153abd944ada1d8b7b5e80",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/home-finance-ledger/v1/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/home-finance-ledger/v1/sql/postgres.sql",
      "bytes": 61207,
      "sha256": "a4d475a59d20fe86a3bea3c10da1fca2716d54efeaf9785fe5c0ab1fac97ce09",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/home-finance-ledger/v1/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/home-finance-ledger/v1/sql/mysql.sql",
      "bytes": 61092,
      "sha256": "442b60ab8183adaded44519074a7c725bf130ad0c3dcd5b61bab05c5f8533deb",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/home-finance-ledger/v1/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/home-finance-ledger/v1/sql/mssql.sql",
      "bytes": 63621,
      "sha256": "db1b1564b3efabbbe8f036828a6052b52c6c1ed47ede8d078bea74e298f8e3c5",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/home-finance-ledger/v1/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/home-finance-ledger/v1/sql/sqlite.sql",
      "bytes": 61054,
      "sha256": "eb485bf205a75d42687475b509e9aeb4911f69043a2442a2bf567171ab530b0b",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/home-finance-ledger/v1/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/home-finance-ledger/v1/prisma/seed.ts",
      "bytes": 146917,
      "sha256": "63f97c6dc4255b9b29b7df82642d1b897fe2963737f49eb5fb2359ef8d73cc38",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/home-finance-ledger/v1/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/home-finance-ledger/v1/django/fixtures.json",
      "bytes": 212182,
      "sha256": "1190153bd376fff46eba4647a20ecb5a5d3be9280abd8c05a9daf881f594c0ab",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788768320773,
  "updatedAt": 1788768320773
}
