A comprehensive web application for analyzing browser usage trends with interactive data visualization and rolling average calculations.
- CSV Data Processing: Upload browser usage data in CSV format (
browser_name
,timestamp
,number
) - 7-Day Rolling Averages: Automatically calculates trailing rolling averages for trend analysis
- Market Share Percentages: Converts raw usage counts into percentage distributions
- Date Format Support: Handles multiple date formats (YYYY-MM-DD, MM/DD/YYYY)
- Dynamic Line Charts: Powered by Recharts for smooth, responsive visualizations
- Browser Toggle Controls: Show/hide individual browsers or use bulk operations (Show All, Hide All, Reverse Select)
- Customizable Y-Axis: Adjust scale from auto (0-100%) to focused ranges (20%, 30%, etc.)
- Adjustable Chart Height: Multiple size options from 400px to 800px
- Multi-Day Tooltips: Pin tooltips for specific dates to compare data across time periods
- Draggable Tooltips: Move pinned tooltips around the chart for better visibility
- Sorted Data Display: Browser percentages automatically sorted by value in tooltips
- Debug Mode: Detailed calculation breakdown showing step-by-step processing
- Input Validation: Ensures CSV format compliance and minimum data requirements
- Error Handling: Clear error messages for invalid files or parsing issues
- Sample Data: Download feature provides example CSV format
- Frontend: React 18 with modern hooks (useState, useCallback)
- Build Tool: Vite for fast development and optimized builds
- Styling: Tailwind CSS for responsive, utility-first design
- Visualization: Recharts library for interactive charts
- Data Processing: Papa Parse for CSV parsing
- Icons: Lucide React icon library
- Utilities: Lodash for data manipulation
- Node.js (v16 or higher)
- npm or yarn
- Clone the repository:
git clone <repository-url>
cd browser_data_analyzer
- Install dependencies:
npm install
- Start the development server:
npm run dev
- Open your browser and navigate to
http://localhost:5173
npm run build
npm run preview
Your CSV file should contain three columns:
browser_name
: Name of the browser (e.g., "Chrome", "Firefox", "Safari")timestamp
: Date in YYYY-MM-DD or MM/DD/YYYY formatnumber
: Usage count for that browser on that date
browser_name,timestamp,number
Chrome,2024-01-01,150
Firefox,2024-01-01,100
Safari,2024-01-01,80
Chrome,2024-01-02,160
Firefox,2024-01-02,90
Safari,2024-01-02,85
- Upload Data: Click the upload area or "Download Sample" to get started
- Browser Controls: Use the legend controls to show/hide browsers
- Pin Tooltips: Select dates from the dropdown to pin comparison tooltips
- Drag Tooltips: Click and drag the small dot on pinned tooltips to reposition
- Adjust View: Change Y-axis scale and chart height using the controls
- Debug Mode: Expand the "Detailed Calculation Breakdown" section to see step-by-step processing
- Uses 7-day trailing windows (includes current date + 6 previous days)
- Maintains full floating-point precision during intermediate calculations
- Applies
Math.floor(value * 10) / 10
rounding for consistent display (e.g., 6.57% → 6.5%) - Requires minimum 7 data points to begin generating rolling averages
- Validation: Filter valid rows and parse dates
- Aggregation: Calculate daily totals per browser
- Percentage Conversion: Convert counts to market share percentages
- Rolling Average: Apply 7-day sliding window calculations
- Display Formatting: Round values for consistent visualization
browser_data_analyzer/
├── src/
│ ├── main.jsx # Application entry point
│ └── index.css # Tailwind CSS imports
├── browser_data_analyzer.tsx # Main React component
├── index.html # HTML template
├── package.json # Dependencies and scripts
├── vite.config.js # Vite configuration
├── tailwind.config.js # Tailwind CSS configuration
├── postcss.config.js # PostCSS configuration
└── README.md # This file
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is open source and available under the MIT License.
For questions, issues, or feature requests, please open an issue on the GitHub repository.