Skip to content

Releases: pralinkhaira/Data-Visualization-Dashboard

Data-Visualization-Dashboard-V1.1

06 Jun 19:19
c65e0ee
Compare
Choose a tag to compare

The code updates can be summarized as follows:

  1. Modularize the code by separating it into three files: data_loader.py for data loading, visualization_creator.py for visualization creation, and dashboard_layout.py for dashboard layout.
  2. Use a configuration file (config.py) to store file paths and other settings.
  3. Implement error handling in data_loader.py to handle potential errors like file not found or data format issues.
  4. Optimize data loading by reading data in chunks using the chunksize parameter in pd.read_csv().

Note:
Code for data_loader.py is combination of three part of codes which provides a flexible data loading function that incorporates error handling and supports chunked reading. It includes three main options:

Option 1: pd.read_csv(file_path)
-Loads the entire CSV file into memory and returns a DataFrame.
-Suitable for small to medium-sized datasets that fit into memory.

Option 2: pd.read_csv(file_path, chunksize=10000)
-Reads the data in chunks of 10,000 rows.
-Suitable for large datasets that may not fit into memory all at once.
-Enables memory-efficient processing and performance optimization.

Option 3: pd.read_csv(file_path) with error handling
-Catches FileNotFoundError and ParserError exceptions.
-Raises custom exceptions with informative error messages.
-Suitable for handling file-related issues or data format problems gracefully.

These changes improve code organization, enhance reusability, provide better error handling, and optimize data loading for larger datasets.