Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mcgirjau/newsrec
A News Recommendation System written in R and deployed as a Shiny web app.
https://github.com/mcgirjau/newsrec
Last synced: about 2 months ago
JSON representation
A News Recommendation System written in R and deployed as a Shiny web app.
- Host: GitHub
- URL: https://github.com/mcgirjau/newsrec
- Owner: mcgirjau
- Created: 2019-11-24T15:18:12.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-03-07T23:27:39.000Z (over 4 years ago)
- Last Synced: 2024-05-21T02:10:53.170Z (4 months ago)
- Language: R
- Homepage:
- Size: 591 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
Awesome Lists containing this project
README
---
output: github_document
---```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```# News Recommendation System
A news recommendation system written in R and deployed as a Shiny web application.
## Requirements
### API Keys
To use the News Recommendation System, you need two API keys:
- A [NewsAPI](https://newsapi.org/) key for pulling in news. This API offers a free plan, which comes with [limitations](https://newsapi.org/pricing), e.g. a maximum of 500 requests per day, and new articles available with a 15-minute delay. A key can be obtained [here](https://newsapi.org/register).
- A [Diffbot Article API](https://www.diffbot.com/products/automatic/#article) key for the web extraction of article contents. This API offers a 14-day free trial, with [limitations](https://www.diffbot.com/pricing/) like only 10,000 included requests, and a maximum of 1 request per second. A key can be obtained [here](https://www.diffbot.com/plans/trial), (note that a credit card is not necessary for the free trial).### Package Dependencies
The News Recommendation System relies on a number of R packages. To run the app, you must have all of them installed. You can ensure all dependencies are satisfied by running the code below in your R console:
```{r, eval=FALSE}
# Packages to install from CRAN
package_list <- c("devtools", "dplyr", "future", "future.apply", "httr",
"lubridate", "mongolite", "promises", "RCurl", "readability",
"RJSONIO", "shiny", "shinycssloaders", "shinydashboard",
"shinyjs", "stringr", "tidyr", "tidytext")missing_packages <- package_list[!(package_list %in% installed.packages()[ , "Package"])]
if (length(missing_packages) > 0) {
install.packages(missing_packages)
}# Packages to install from GitHub
devtools::install_github("mcgirjau/newspapr")
```## Installation
A version of the News Recommendation System will be soon deployed to shinyapps.io. For now, you can test out the current GitHub version of the app by running the following command in your R console:
```{r, eval=FALSE}
shiny::runGitHub(repo = "newsrec", username = "mcgirjau", subdir = "app/")
```## Usage
There are 3 main steps you need to follow in order to successfully use the News Recommendation System:
#### 1. Log In / Sign Up
Upon running the app, you will be taken to an authentication screen. If you already have an account, simply enter your credentials (username and password), and log in. If you don't yet have an account, you can create one by choosing some username and password as well as entering your two API keys, and then sign up.
#### 2. Train the SystemOnce logged in, you will be taken to the system training page, where you can search for articles based on some keyword, and then indicate whether you like them or not. It is recommended that you indicate your preferences over at least 10-20 articles.
#### 3. Explore Recommended News
In the sidebar to your left, you can now navigate to the page where the system issues you with recommendations. You have more control over news filtering here - you can select whether you want to search only the current top headlines, or all articles, and you can search by keyword, language, category etc. The system will pick the best article tailored to your preferences, and recommend it. Please be patient, as the system might take a while to determine the best article for you.
## Technology
## Bug Reports
If you find a bug as you run the application, please [open an issue](https://github.com/mcgirjau/newsrec/issues) to report it.
## Future Improvements
The following are desirable new features or design tweaks that will possibly be introduced in future versions of the app:
* Edit appearance
* Add an option for the user to flush the system if they'd like to start over
* Eliminate dependency on the Diffbot API and replace it with a versatile web scraping alternative