{"id":25306748,"url":"https://github.com/rafath0ssain/predihome","last_synced_at":"2026-05-01T19:34:57.487Z","repository":{"id":270884360,"uuid":"911746824","full_name":"RafatH0ssain/PrediHome","owner":"RafatH0ssain","description":"Data analysis using economic factors affecting living conditions across Canadian provinces.","archived":false,"fork":false,"pushed_at":"2025-01-05T21:26:39.000Z","size":1444,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T06:33:08.613Z","etag":null,"topics":["data-analysis","data-visualization","dplyr","ggplot2","graph","kaggle","linear-regression","prediction-model","r","shiny","tidyr"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RafatH0ssain.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-03T18:44:47.000Z","updated_at":"2025-01-05T21:26:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"07d26cd9-6a95-4f54-bd62-d9b8f7b63ca7","html_url":"https://github.com/RafatH0ssain/PrediHome","commit_stats":null,"previous_names":["rafath0ssain/predihome"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RafatH0ssain/PrediHome","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RafatH0ssain%2FPrediHome","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RafatH0ssain%2FPrediHome/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RafatH0ssain%2FPrediHome/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RafatH0ssain%2FPrediHome/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RafatH0ssain","download_url":"https://codeload.github.com/RafatH0ssain/PrediHome/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RafatH0ssain%2FPrediHome/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32510808,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-analysis","data-visualization","dplyr","ggplot2","graph","kaggle","linear-regression","prediction-model","r","shiny","tidyr"],"created_at":"2025-02-13T10:39:39.012Z","updated_at":"2026-05-01T19:34:57.465Z","avatar_url":"https://github.com/RafatH0ssain.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PrediHome: Housing Price Index and Employment Rate Analytics\n\n**PrediHome** is an interactive web app built using **R** and **Shiny**, designed to help users make informed decisions about the best province to live in Canada. The app provides detailed analytics on **housing price data (HPI)**, **unemployment rate**, and **employment rate** data for the years **1986-2035**. Users can input a specific year and receive insights and predictions about the HPI and employment metrics across different provinces.\n\n## Objective\n\nThe primary goal of **PrediHome** is to help users evaluate potential provinces to live in based on key economic and housing indicators. Users can:\n- Explore **historical data (1986-2022)** and **predicted data (2023-2035)**.\n- View the province with the **lowest Housing Price Index (HPI)** and the province with the **lowest unemployment rate**.\n- **Visualize** HPI and employment statistics for different provinces, assisting in comparing various factors that impact the cost of living.\n\n## Features\n\n1. **User Input**:\n   - Users select a year between **1986** and **2035** to analyze housing prices and employment statistics.\n   \n2. **Data Analysis**:\n   - The app identifies the **lowest HPI** province and **lowest unemployment rate** province using both historical data and predictive models (for the years 2023-2035).\n   \n3. **Visualizations**:\n   - **Bar Chart**: Displays the **HPI** values for each province in the selected year.\n   - **Bar Chart**: Shows the **unemployment rate** for each province in the selected year.\n\n4. **Regression Model Predictions (for years 2023-2035)**:\n   - Uses linear regression models to predict future **HPI** and **unemployment rates** based on historical data.\n   \n5. **Identifies the best province to live in**:\n- Calculates a composite score for each province, where a higher score indicates a better province to live in. This is done based on the following metrics:\n  - Housing Price Index (HPI)\n  - Unemployment Rate\n  - Employment Rate\n\n## Datasets\n\nThe analysis is based on the following datasets from Kaggle:\n\n1. [**Canada housing price data by regions 1981-2022**](https://www.kaggle.com/datasets/anki112279/canada-housing-price-data-by-regions-19812022): Contains data on the housing price index for each province in Canada between 1981 and 2022.\n2. [**Unemployment in Canada, by Province (1976-Present)**](https://www.kaggle.com/datasets/pienik/unemployment-in-canada-by-province-1976-present): Includes employment and unemployment rates for each province between 1976 and 2022.\n\n## Steps Involved\n\n### 1. **Data Preprocessing**:\n   - Cleaned and prepared the datasets by removing unnecessary columns and aggregating data at the **province** level for comparison.\n\n### 2. **Data Analysis**:\n   - **Historical Data (1986-2022)**: Analyzed trends in **HPI** and **unemployment rates** across provinces.\n   - **Prediction for Future Years (2023-2035)**: Applied regression models to predict future values of **HPI** and **unemployment rates**.\n\n### 3. **Data Visualization**:\n   The following visualizations help users understand and compare housing and employment metrics across provinces:\n\n#### 1. **Bar Chart**: Housing Price Index (HPI) by Province\n   - A bar chart showing **HPI** values for each province in the selected year.\n   - Helps users visually compare housing prices and identify affordable or expensive provinces for that year.\n   - The bars have **continuous color coding** that reflects the HPI values.\n\n   ![Bar Chart: Housing Price Index](plot-examples/lowest_hpi_2027.png)\n\n#### 2. **Bar Chart**: Unemployment Rates by Province\n   - A bar chart displaying the **unemployment rate** for each province in the selected year.\n   - Helps users analyze the economic climate in different provinces and make informed decisions about employment opportunities.\n   - The bars have **continuous color coding** that reflects the unemployment rates.\n\n   ![Bar Chart: Unemployment Rates](plot-examples/lowest_unemployment_rate_2027.png)\n\n## User Interface\n\n**PrediHome** features a modern, easy-to-navigate user interface that includes:\n\n- **Numeric Input**: Users can select a year between **1986** and **2035**.\n- **Submit Button**: After selecting the year, users can click the submit button to receive:\n  - The overall **best province** to live in.\n  - The province with the **lowest HPI**.\n  - The province with the **lowest unemployment rate**.\n  - **Visualizations**: A bar chart showing the HPI values of all provinces and one showing unemployment rates for all provinces.\n  ![User Interface](webpage.jpeg)\n\n## Tech stack\n\n- **R**: For data cleaning, manipulation, and analysis.\n- **Shiny**: For building the interactive web application.\n- **ggplot2**: For creating visualizations like bar charts.\n- **dplyr**: For data manipulation and aggregation.\n- **tidyr**: For tidying and reshaping the data.\n- **lm()**: For building regression models to predict future data.\n\n## How to Run the App in RStudio\n\n1. Install the necessary R packages:\n   ```r\n   install.packages(c(\"shiny\", \"ggplot2\", \"dplyr\", \"tidyr\"))\n\n2. Clone or download the repository.\n3. Open the R script and run the app.\n4. Enter a year (1986-2035) to view the analysis and predictions.\n- **Note**: If you see an error that says \"*cannot open file '\u003cfilename\u003e': No such file or directory*\", run `setwd(\"\u003cpath_to_working_directory\u003e\")` in your terminal, replacing \u003cpath_to_working_directory\u003e with the path to the directory containing the files you cloned.\n\n## Authors\n\n1. - Name: Nafisah Nubah\n   - Email: nafisahnubah@gmail.com\n   \n2. - Name: Muhammad Rafat Hossain\n   - Email: rafat.click.hossain@gmail.com\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafath0ssain%2Fpredihome","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frafath0ssain%2Fpredihome","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafath0ssain%2Fpredihome/lists"}