COSEWIC Sar Data Analyser

author image
Dev Soni24th Jan 2024

COSEWIC SAR Data Analyser - Canada Species at Risk Analysis

GITHUB LINK - https://github.com/DevS0ni/COSEWIC-Sar-Data-Analyser

Overview

This project focuses on analyzing data related to species at risk in Canada. The system loads data from a file, provides a user interface for data analysis, and presents insights based on various criteria such as year, province, taxon, and their combinations.

TechStack Used:

  • C, Data Structures and Algorithms, Modular Approach

Features

  1. Data Loading:
    • Reads species data from the "data.txt" file.
    • Handles potential errors, such as missing files.
  2. Main Logic:
    • Implements a menu-driven user interface for data analysis.
    • Options include viewing data by year, province, taxon, or a combination of province and taxon.
    • Handles user input validation.
  3. Data Analysis:
    • Provides insights into species counts based on different criteria.
    • Displays data sorted and organized for better readability.
  4. Province and Taxon Selection:
    • Allows the user to choose a specific province and taxon for detailed analysis.
    • Enhances user interactivity and customization.

Implementation

File Loading

  • Function: loadData
    • Opens the "data.txt" file and calls importDataFile to load data into the program.
    • Returns the total number of records loaded.
  • Function: importDataFile
    • Reads data from the file, parsing and storing it in the struct FileData array.

User Interface

  • Function: mainLogic
    • Drives the main program logic, continuously interacting with the user until termination.
    • Calls specific functions based on user input.
  • Function: mainMenu
    • Displays the main menu for user interaction.
    • Takes user input and returns the selection.

Data Analysis

  • Function: viewAllByYear
    • Displays species data organized by year.
    • Calculates and presents totals and grand totals.
  • Function: viewAllByProvince
    • Organizes and displays species data by province.
    • Sorts data in descending order based on totals.
  • Function: viewAllByTaxon
    • Presents data sorted by taxon.
    • Provides insights into species counts for each taxon.
  • Function: viewAllByProvinceAndTaxon
    • Allows the user to select a specific province and taxon for detailed analysis.
    • Displays data related to the chosen province and taxon.

User Selection

  • Functions: provinceSelection and taxonSelection
    • Guide the user in choosing a specific province or taxon, respectively.
    • Ensure valid input from the user.

Conclusion

This Canada Species at Risk Analysis project demonstrates effective file handling, user interface design, and data analysis skills. The modular structure allows for easy maintenance and scalability. The project offers a comprehensive tool for understanding and exploring species data based on various criteria.

author image

Dev Soni

Connect with me

© Copyright 2024. All right reserved, Dev Soni.