Week 9 Assignment

Working with New York Time’s APIs.

By William Outcault

View Article Types

df <- count(json_data, results.nytdsection)
ggplot(df, aes(x=reorder(results.nytdsection, n),
                  y=n, label="count")) +
  geom_bar(stat='identity', width=.5, fill = "lightblue", color = "darkblue")  +
  scale_fill_manual(name="Article Type") + 
  labs(title= "Article Type") + 
  coord_flip()

View Article Publish Date

df <- count(json_data, results.published_date)
ggplot(df, aes(x=reorder(results.published_date, results.published_date),
                  y=n, label="count")) +
  geom_bar(stat='identity', width=.5, fill = "lightblue", color = "darkblue")  +
  scale_fill_manual(name="Published Articles by Date") + 
  labs(title= "Published Articles by Date")