Skip to content

Commit

Permalink
Merge pull request #28 from chainsawriot/gnew_fix
Browse files Browse the repository at this point in the history
Hide the details about caching in the Google news Chapter
  • Loading branch information
paulcbauer authored Feb 22, 2022
2 parents c0e9f5f + d35b922 commit 71c80c5
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions 08-Google_news_api.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,10 @@ sources <- httr::GET(url = endpoint_url,
query = params)
sources_df <- bind_rows(content(sources)$sources)
save(sources_df, file = "google_news-sources.RData")
sources_df[,c("id", "name", "url", "category")]
```

```{r google-news-5}
```{r google-news-5, echo = FALSE}
load("figures/rds/google_news-sources.RData")
sources_df[,c("id", "name", "url", "category")]
```
Expand All @@ -116,11 +115,10 @@ headlines <- httr::GET(url = endpoint_url,
headlines_df <- bind_rows(content(headlines)$articles) %>%
mutate(source = tolower(source)) %>% unique()
save(headlines_df, file = "google_new-headlines.RData")
headlines_df[,c("publishedAt","title")]
```

```{r google-news-7}
```{r google-news-7, echo = FALSE}
load("figures/rds/google_new-headlines.RData")
headlines_df[,c("publishedAt","title")]
```
Expand Down

0 comments on commit 71c80c5

Please sign in to comment.