This Django-based web application allows users to upload CSV files, perform data analysis using pandas and numpy, and display results and visualizations on a web interface. Users can handle missing values in their data using various strategies and view histograms of numerical columns.
- CSV File Upload: Users can upload CSV files for analysis.
- Data Analysis: Displays basic statistics and identifies missing values.
- Missing Values Handling: Options to drop rows, fill with mean/median, or use forward/backward fill.
- Data Visualization: Generates and displays histograms for numerical columns.
- Python 3.x
- Django
- Pandas
- Matplotlib
- Seaborn
-
Clone the Repository
git clone https://github.com/Vedansh1857/django-data-visualizer.git cd django-data-visualizer
-
Create and Activate a Virtual Environment
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install Dependencies
pip install -r requirements.txt
-
Ensure "requirements.txt" contains:
Django>=4.0 pandas>=1.5.0 matplotlib>=3.5.0 seaborn>=0.12.0
-
Apply Database Migrations
python manage.py migrate
-
Run the Development Server
python manage.py runserver
-
Access the Application
Open your web browser and navigate to 'http://127.0.0.1:8000/csv/upload/'.
myproject/
├── myproject/ # Django project directory containing settings and configuration
│ ├── init.py
│ ├── settings.py
│ ├── urls.py
│ └── wsgi.py
├── csv_analysis/ # Django app directory for handling CSV files and data analysis
│ ├── migrations/ # Database migrations for the app
│ ├── templates/
│ │ └── csv_analysis/
│ │ ├── upload.html # HTML template for file upload page
│ │ └── analyze.html # HTML template for data analysis page
│ ├── static/
│ │ └── histograms/ # Directory for static files such as histogram images
│ ├── init.py
│ ├── admin.py
│ ├── apps.py
│ ├── forms.py # Contains forms for file upload
│ ├── models.py # Contains models for storing uploaded files
│ ├── tests.py
│ └── views.py # Contains logic for file upload, data processing, and visualization
├── static/ # Static files directory
│ └── histograms/ # Directory for static files such as histogram images
├── manage.py # Django's command-line utility for administrative tasks
└── requirements.txt # List of dependencies to be installed with pip