knitr::opts_chunk$set( warning = FALSE, collapse = TRUE, comment = "#>" ) library(htmltools)
br() br() div( class = "row", div( class = "col-md-4", img( src = "logo.png", class = "img-responsive responsive-img" ) ), div( class = "col-md-8", p( "Access local and world news." ), p( tags$a( tags$i(class = "fa fa-github"), class = "btn btn-primary", href = "https://github.com/news-r/accunews", style = "margin-bottom: 5px;", "Repository" ), tags$a( tags$i(class = "fa fa-code"), class = "btn btn-default", href = "reference/index.html", style = "margin-bottom: 5px;", "Reference" ) ) ) )
You can install accunews with remotes
from Github, see changes.
# install.packages("remotes") remotes::install_github("news-r/accunews") # github
Get a free key from the accunewsapp.com website.
accunews_key("xxXXxxXx")
Note that you can specify the ACCUNEWS_API_KEY
key as an environment variable in your .Renviron
for convenience.
library(accunews) # get business news sources (src <- acc_world_sources(type = "business", pages = 2))
Plot with echarts4r.
library(echarts4r.suite) src %>% e_charts(lon) %>% em_map("USA") %>% e_geo("USA") %>% e_scatter( lat, bind = name, symbol_size = 10, symbol = ea_icons("signals"), legend = FALSE, coord_system = "geo" ) %>% e_tooltip() %>% e_color( "#247BA0", "#f9f7f1" )
You can also look for local news.
library(accunews) # get articles local (to somewhere) acc_local_articles(27.964157, -82.452606, pages = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.