Skip to content

Commit

Permalink
Hide the details about caching in the Google news Chapter
Browse files Browse the repository at this point in the history
Make it look like the Media Cloud Chapter
  • Loading branch information
chainsawriot committed Feb 22, 2022
1 parent c0e9f5f commit d35b922
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 d35b922

Please sign in to comment.