Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ibensusan/page-view-time-series-visualizer
Page View Time Series Visualizer project from FreeCodeCamp using Python
https://github.com/ibensusan/page-view-time-series-visualizer
Last synced: 8 days ago
JSON representation
Page View Time Series Visualizer project from FreeCodeCamp using Python
- Host: GitHub
- URL: https://github.com/ibensusan/page-view-time-series-visualizer
- Owner: iBensusan
- Created: 2024-09-25T13:18:07.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-10-02T13:31:44.000Z (3 months ago)
- Last Synced: 2024-10-18T07:02:30.678Z (2 months ago)
- Language: Python
- Size: 13.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Time Series Visualizer
This project is a time series visualizer that analyzes and visualizes page view data from the freeCodeCamp forum from May 2016 to December 2019. It generates three different plots to visualize trends in the data: a line plot, a bar plot, and box plots. Each of these visualizations helps explore various aspects of the data such as long-term trends, seasonal variations, and year-over-year comparisons.
## Objectives:
1. **Data Preprocessing**:
- Load the dataset `fcc-forum-pageviews.csv`, parsing the dates and setting the 'date' column as the index.
- Clean the data by removing outliers that fall outside the 2.5th and 97.5th percentiles.2. **Line Plot**:
- Create a line plot to visualize daily page views over time.
- Add appropriate labels for the x-axis (Date) and y-axis (Page Views) and a title "Daily freeCodeCamp Forum Page Views 5/2016-12/2019".3. **Bar Plot**:
- Create a bar plot showing the average daily page views for each month, grouped by year.
- Display the year on the x-axis, and show the months along with their respective average page views for each year.4. **Box Plot**:
- Create two box plots:
1. **Year-wise box plot** to show trends in page views across different years.
2. **Month-wise box plot** to visualize the seasonal variations in page views for each month.## Tools and Libraries:
- **Pandas**: For loading and cleaning the dataset, and performing data manipulation.
- **Matplotlib**: For creating and saving the visualizations.
- **Seaborn**: For generating the box plots and adding aesthetics to the plots.
- **NumPy**: For data type conversions and numeric operations.## Running the Project:
To run the project and generate the visualizations:
1. Install the necessary libraries:
```bash
pip install pandas matplotlib seaborn numpy
```2. Run the `main.py` file to generate the visualizations:
```bash
python main.py
```This will generate three visualizations:
- **line_plot.png**: A line plot showing daily page views.
- **bar_plot.png**: A bar plot showing average daily page views per month.
- **box_plot.png**: Two box plots: one for yearly trends and one for monthly seasonality.## Visualizations:
1. **Line Plot**: Shows the daily page views over time, highlighting long-term trends and fluctuations.
2. **Bar Plot**: Visualizes the average daily page views for each month, grouped by year.
3. **Box Plot**:
- **Year-wise Box Plot**: Highlights how page views have changed year over year.
- **Month-wise Box Plot**: Illustrates the seasonal trends in page views.## File Structure:
- **fcc-forum-pageviews.csv**: The dataset containing the page views for each date.
- **main.py**: The main script to run the visualizations and unit tests.
- **time_series_visualizer.py**: Contains the functions to generate the line plot, bar plot, and box plots.## License
This project is licensed under the MIT License.