This project is a Command Line Interface (CLI) program designed to read and analyze housing data from a CSV file. The system provides functionalities for descriptive analysis, data search, and sorting, making it a versatile tool for basic data exploration.
The program groups and summarizes data based on specific attributes, such as:
- Location (primary and secondary)
- Housing type
- Number of rooms, bathrooms, and car parks
- Area and price
It calculates the frequency, maximum, minimum, and average values for each attribute.
Users can search for specific data points by column, such as location, housing type, or furnishing status. Partial matches and exact matches are supported for flexible searching.
The system sorts data by selected criteria, helping users identify trends or patterns, such as grouping data by location or type of property.
-
Data Input:
The program reads data from a CSV file namedfile.csv
. Each row represents a housing entry with attributes like location, price, number of rooms, etc. -
Descriptive Functions:
The program analyzes data and provides a summary, including maximum, minimum, and average calculations. -
Search and Sorting:
Data is sorted based on the selected column, and users can search for entries matching their query. -
User Interaction:
Users interact with the program through a menu-driven interface:- Option 1: Analyze data based on a chosen column.
- Option 2: Search data by specific criteria.
- Option 0: Exit the program.
- C Programming Language
- File Handling (via
stdio.h
) for reading CSV files - Structs and Arrays for efficient data management
- Compile the program using a C compiler, for example:
gcc -o housing_analysis housing_analysis.c