cstories-app / cstories-app.github.io

Community driven story building app to inform offshore energy planning
https://cstories.integral-corp.com/
MIT License
2 stars 0 forks source link

+ news feed #3

Open bbest opened 1 year ago

bbest commented 1 year ago

newsapi (formerly GoogleNews API)

bbest commented 1 year ago

Local news sources (and RSS feeds)

Santa Barbara

TODO: San Luis Obisbo (for Morro Bay)

Humboldt County

Priority feeds / example news items:

bbest commented 1 year ago

software

newsapi in Py

rss handling in R

bbest commented 1 year ago

From @jzadra : the news package from Matt Tierney is ~6 yrs old, so prob want to go a diff't direction

bbest commented 1 year ago

For raw API parsing, check out:

bbest commented 1 year ago

Hi @jzadra,

Check out this little example of using the free version (100 requests per day, search articles up to a month old) of the newsapi.org API (see docs) using R package httr2:

Next steps could be:

jzadra commented 1 year ago

Another R Package for newsapi.org: https://cran.r-project.org/web/packages/newsanchor/vignettes/usage-newsanchor.html

I have not investigated thoroughly; probably created our own API requests is more customizable.

jzadra commented 1 year ago

News API

Function features:

Decisions to be made:

bbest commented 1 year ago

@geocoug's suggestion of each news item to have it's own *.qmd doc is a good one. The metadata can be populated into the frontmatter yaml and then a listing created per here:

https://quarto.org/docs/websites/website-listings.html

jzadra commented 1 year ago

Newsapi.org results are listed on the index page (currently most recent 3), and there is a News page with all results.

Next items to do:

jzadra commented 1 year ago

The following RSS feeds suggested above either do not have rss feeds, or link to empty xml documents:

Local news sources (and RSS feeds)

Santa Barbara

TODO: San Luis Obisbo (for Morro Bay)

Priority feeds / example news items:

jzadra commented 1 year ago

The issue with the news item below is not clear. It appears to break at the $, however there are 15 other news items that have $ in the title and do not have an issue.

image

jzadra commented 1 year ago

It appears that this issue is due to it trying to render it as a mathjax equation. I am still at a loss as to why. @bbest any ideas?

jzadra commented 1 year ago

Ok, I have further eliminated some possible causes - it turns out that the offending item "Landmark California"... is not the issue. If it is removed, a different item has the same issue:

Original issue image

Same issue, different item once first item is removed: image