# Data Setup

## Overview

This section describes the post-deployment data setup process for the DIGIT CMS module using Jupyter Notebook. It serves as a comprehensive guide to help implementation teams prepare and configure the required master data after the CMS module deployment.

The section :

* An overview of all master data that must be collected as part of CMS implementation
* Standard data collection templates, including sample/default values for reference
* A detailed list of attributes for each master, along with the expected data types and formats
* Detailed, step-by-step instructions to ingest the collected master data into the DIGIT CMS system, following the required order of execution.

This setup is designed to improve usability and make the system configuration process straightforward and intuitive.

{% hint style="info" %}
**Note:** The data setup process should be performed from the user’s local machine or VM.
{% endhint %}

***

## Pre-requisites

* Ensure that a **registered domain name** is available for the CMS application.
* Ensure you have the admin user credentials with the root tenant ID mapped. This will be created as part of the deployment.
* Python needs to be [installed](https://www.python.org/downloads/).
* Jupyter Notebook should be installed on [Linux](https://jupyter.org/install), [macOS](https://jupyter.org/install), and [Windows](https://www.geeksforgeeks.org/installation-guide/install-jupyter-notebook-in-windows/).
* Ensure that Jupyter Notebook is up and running.

## Steps

The data-loading process is divided into four major phases:

How the templates are phased out, based on the order data needed to be pushed and later the master data required in the other master.

* **Load Tenant and Branding Information** – Creates city/ULB records and configures header logo, footer logo, login page background image, and state emblem
* **Upload Boundary Master** – Defines administrative hierarchy (City → Zone → Ward → Block → Locality)
* **Upload Common Master** – Creates departments, designations, and complaint types with SLA definitions
* **Upload Employee Master** – Creates employee accounts with role assignments and jurisdiction mappings

Each phase implements three layers of validation to ensure data accuracy, consistency, and schema compliance.

### Setup CMS Notebooks

This section explains how to clone the Complaints Management repository and run the DataLoader.ipynb notebook locally.

{% stepper %}
{% step %}

### Clone the Repository

Run the following command in Terminal (macOS/Linux) or PowerShell/Command Prompt (Windows):

```
git clone https://github.com/egovernments/Citizen-Complaint-Resolution-System.git
```

After cloning, navigate to the Data Loader directory:

```
cd Citizen-Complaint-Resolution-System/utilities/crs_dataloader
git checkout  pgr-data-loader 

```

{% endstep %}

{% step %}

### Verify Jupyter Installation

Ensure Jupyter is installed:

`jupyter --version`

If not installed, refer to the [Before You Begin](#pre-requisites) section for installation instructions.

![](/files/pp1uCKD45pfY6r4xdZOW)
{% endstep %}

{% step %}

### Launch Jupyter Notebook

Start Jupyter Notebook:

`jupyter notebook (or) jupyter labs`

A browser window will open at:

`http://localhost:8888/tree`

![](/files/gP6boUGsHYPIvcZ7TiI6)

Navigate to Citizen-Complaint-Resolution-System/utilities/crs\_dataloader and open DataLoader.ipynb

![](/files/gsfsb3xIPmpaDoHqPKrI)
{% endstep %}

{% step %}

### Run the Data Loader Notebook

* Open the notebook.
* Review the notebook sections.
* Read the instructions&#x20;
* Execute each cell in sequence using Shift + Enter.
* Provide any required inputs (tenant, file paths, etc.).
* Validate output logs as the loader processes data.

![](/files/ZxLIxSuADwZSfMeOWKPJ)
{% endstep %}
{% endstepper %}

## Next Steps

This section completes the setup, execution, and maintenance workflow for running the Data Loader notebook locally.

Once setup is complete, proceed based on your chosen approach:

<table><thead><tr><th width="254.66015625">Your Approach</th><th>Next Section</th></tr></thead><tbody><tr><td>Unified (DataLoader.ipynb)</td><td><p>User Guide  → Step 1: Login</p><p><a href="/pages/9hOko2mPL4xLHZ6fRXuz">CMS Data Loader – Technical Implementation &#x26; Usage Guide</a></p></td></tr><tr><td>Notebook-wise (3 notebooks)</td><td><p>Alternative Method → Notebook 1: Tenant and Common Masters</p><p><a href="/pages/QL2WOKb7DYnp7DR7dSCN">CMS Data Loader – Technical Implementation &#x26; Usage Guide</a></p></td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.digit.org/complaints-management/complaints-resolution-v2.10/deploy/setup/production-setup/deploy-complaints-management/data-setup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
