ML and Data Insights Hub is a comprehensive web application for data analysis, visualization, and machine learning. It offers the following features:
- Data Upload: Upload and preview CSV files
- Statistical Analysis: Calculate and display key statistics for selected columns
- Data Visualization: Create various charts (bar, scatter, line, pie) from your data
- Machine Learning: Train and evaluate ML models, make predictions
- Data Quality Assessment: Analyze data completeness and identify quality issues
- Dark Mode: Toggle between light and dark themes for comfortable viewing
To run this project on your local machine:
- Clone the repository
- Install dependencies:
npm install - Start the development server:
npm run dev - Open your browser and navigate to
http://localhost:5173
- React
- Vite
- Tailwind CSS
- Recharts
- Shadcn UI components
- Lucide React icons
-
src/pages/Index.jsx- Main entry point of the application
- Controls the overall layout and navigation
- Manages dark mode toggle
-
src/pages/DataUpload.jsx- Handles data uploading functionality
- Parses CSV files and displays a preview of the data
- Triggers initial data quality assessment
-
src/pages/StatisticalAnalysis.jsx- Performs basic statistical analysis on selected columns
- Calculates mean, median, mode, and standard deviation
- Allows exporting of statistics
-
src/pages/DataVisualization.jsx- Manages various data visualization options
- Supports bar charts, scatter plots, line charts, and pie charts
- Uses Recharts library for rendering visualizations
-
src/pages/MachineLearning.jsx- Implements machine learning algorithms
- Supports Linear Regression, Polynomial Regression, Random Forest, Decision Tree, and K-Means Clustering
- Handles model training, evaluation, and prediction
-
src/pages/DataPreprocessing.jsx- Provides data preprocessing options
- Includes handling missing values, normalization, and custom transformations
-
src/pages/DataQualityAssessment.jsx- Assesses the quality of uploaded data
- Detects missing values, inconsistencies, and potential outliers
-
src/App.jsx- Sets up routing and global providers
- Manages the application's overall structure
-
src/nav-items.jsx- Defines the navigation structure for the application
ml-and-data-insights-hub/
├── public/
│ └── favicon.ico
├── src/
│ ├── components/
│ │ └── ui/
│ │ └── (various UI components)
│ ├── lib/
│ │ └── utils.js (utility functions)
│ ├── pages/
│ │ ├── Index.jsx (main page)
│ │ ├── DataUpload.jsx
│ │ ├── StatisticalAnalysis.jsx
│ │ ├── DataVisualization.jsx
│ │ ├── MachineLearning.jsx
│ │ ├── DataPreprocessing.jsx
│ │ ├── DataQualityAssessment.jsx
│ │ ├── CorrelationAnalysis.jsx
│ │ ├── DataExport.jsx
│ │ ├── DataFiltering.jsx
│ │ └── DataSorting.jsx
│ ├── App.jsx
│ ├── index.css (global styles)
│ ├── main.jsx (entry point)
│ └── nav-items.jsx (navigation configuration)
├── .eslintrc.cjs (ESLint configuration)
├── index.html (HTML template)
├── package.json (project dependencies and scripts)
├── tailwind.config.js (Tailwind CSS configuration)
└── vite.config.js (Vite configuration)
- To modify the overall layout or add new pages, edit
src/pages/Index.jsx - For changes to data processing or analysis, look in the respective files in
src/pages/ - UI components are located in
src/components/ui/ - Styling changes can be made in
src/index.cssor by modifying Tailwind classes in components - To add or modify machine learning models, edit
src/pages/MachineLearning.jsx - For changes to the navigation structure, update
src/nav-items.jsx
Remember to check package.json for available scripts and dependencies when working on the project.
The project follows a standard React application structure:
ml-and-data-insights-hub/
├── public/
├── src/
│ ├── components/
│ │ └── ui/
│ ├── lib/
│ ├── pages/
│ ├── App.jsx
│ ├── index.css
│ ├── main.jsx
│ └── nav-items.jsx
├── .eslintrc.cjs
├── index.html
├── package.json
├── tailwind.config.js
└── vite.config.js
The main components of the application are located in the src/pages/ directory:
Index.jsx: The main page component that orchestrates the overall layout and navigation.DataUpload.jsx: Handles data uploading and initial processing.StatisticalAnalysis.jsx: Performs basic statistical analysis on the uploaded data.DataVisualization.jsx: Provides various data visualization options.MachineLearning.jsx: Implements machine learning algorithms and model training.
Other important files:
src/App.jsx: The root component of the application.src/nav-items.jsx: Defines the navigation structure.src/index.css: Contains global styles and Tailwind CSS configurations.
The application follows a linear workflow:
- Data Upload
- Statistical Analysis
- Data Visualization
- Machine Learning
Each step is represented by a tab in the main interface. Users progress through these steps sequentially, although they can move back and forth between tabs as needed.
To add a new feature to the application:
- Create a new component in the
src/pages/directory if it's a major feature, or insrc/components/for smaller, reusable components. - Import and use the new component in
Index.jsxor the relevant parent component. - If the feature requires a new tab, add it to the
navItemsarray insrc/nav-items.jsx. - Implement the necessary logic, state management, and UI elements in your new component.
- Style your component using Tailwind CSS classes for consistency with the rest of the application.
- Use functional components and hooks for state management and side effects.
- Leverage the UI components from
src/components/ui/for consistent styling. - Follow the existing code style and formatting conventions.
- Write clear, descriptive comments for complex logic or algorithms.
- Use meaningful variable and function names that describe their purpose.
- Optimize performance by memoizing expensive computations or using React.memo for pure components.
Common issues and their solutions:
- If you encounter dependency issues, try deleting the
node_modulesfolder and runningnpm installagain. - For styling problems, make sure Tailwind CSS is properly configured in
tailwind.config.jsand that you're using the correct class names. - If a component is not rendering as expected, check the React DevTools to inspect the component hierarchy and state.
- For performance issues, use the React Profiler to identify bottlenecks in rendering or computation.
For any other issues, consult the project's issue tracker or reach out to the project maintainers.
Enjoy exploring your data with ML and Data Insights Hub!