{"id":13563347,"url":"https://github.com/beatrizmilz/noticiasgov","last_synced_at":"2025-07-30T10:33:33.071Z","repository":{"id":37621938,"uuid":"431518331","full_name":"beatrizmilz/noticiasgov","owner":"beatrizmilz","description":"Raspagem de dados de portais de noticias governamentais","archived":false,"fork":false,"pushed_at":"2024-03-07T18:03:23.000Z","size":48026,"stargazers_count":12,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-04T16:44:10.706Z","etag":null,"topics":["git-scraping","r","rstats","web-scraping"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/beatrizmilz.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-24T14:37:13.000Z","updated_at":"2024-03-16T00:12:06.000Z","dependencies_parsed_at":"2024-08-01T13:19:22.613Z","dependency_job_id":"45e5d5ca-6f1e-466c-924e-de77eaf8181a","html_url":"https://github.com/beatrizmilz/noticiasgov","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beatrizmilz%2Fnoticiasgov","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beatrizmilz%2Fnoticiasgov/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beatrizmilz%2Fnoticiasgov/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beatrizmilz%2Fnoticiasgov/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beatrizmilz","download_url":"https://codeload.github.com/beatrizmilz/noticiasgov/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228124558,"owners_count":17873170,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git-scraping","r","rstats","web-scraping"],"created_at":"2024-08-01T13:01:18.126Z","updated_at":"2024-12-04T14:16:49.074Z","avatar_url":"https://github.com/beatrizmilz.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# noticiasgov\n\n\u003c!-- badges: start --\u003e\n\n[![atualiza_dados](https://github.com/beatrizmilz/noticiasgov/actions/workflows/atualizar_dados.yaml/badge.svg)](https://github.com/beatrizmilz/noticiasgov/actions/workflows/atualizar_dados.yaml)\n[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)\n\u003c!-- badges: end --\u003e\n\nO objetivo deste repositório/pacote é raspar as notícias de portais de noticias governamentais, e disponibilizar em `.csv`.\n\n```{r echo=FALSE}\nlibrary(magrittr)\ntibble::tribble(\n  ~estado, ~nome_site, ~url_site, ~url_csv, ~cod_r, ~freq_action,\n  \"SP\",\n  \"Portal do Governo do Estado de São Paulo\",\n  \"https://www.saopaulo.sp.gov.br/ultimas-noticias/\",\n  \"https://raw.githubusercontent.com/beatrizmilz/noticiasgov/master/inst/base_noticias_gov_sp.csv\",\n  \n  \n  '`base_noticias_gov_sp \u003c- readr::read_delim(\"https://raw.githubusercontent.com/beatrizmilz/noticiasgov/master/inst/base_noticias_gov_sp.csv\", delim = \";\")` ',\n  \"A cada 6 horas\"\n) %\u003e% \n  dplyr::transmute(\n    Estado = estado,\n    Fonte = glue::glue(\"[{nome_site}]({url_site})\"),\n    `Freq. de atualização` = freq_action,\n    `Baixar base` = glue::glue(\"[`.csv`]({url_csv})\"),\n    `Código para importar no R` = cod_r\n    \n  ) %\u003e% \n  knitr::kable()\n```\n## Exemplo dos dados disponíveis\n\n```{r echo=TRUE, message=FALSE, warning=FALSE}\nbase_noticias_gov_sp \u003c- readr::read_delim(\"https://raw.githubusercontent.com/beatrizmilz/noticiasgov/master/inst/base_noticias_gov_sp.csv\", delim = \";\")\n\ndplyr::glimpse(base_noticias_gov_sp)\n```\n\n\nPesquisar as notícias que contém algum termo ao longo do tempo:\n\n\n```{r grafico-sp-covid-noticias, echo=TRUE, dpi=300}\nlibrary(ggplot2)\n\nnoticias_sp_filtradas \u003c- base_noticias_gov_sp %\u003e%\n  dplyr::mutate(titulo_clean = stringr::str_to_lower(titulo),\n                titulo_clean = abjutils::rm_accent(titulo_clean)) %\u003e% \n  dplyr::filter(\n      stringr::str_detect(titulo_clean, \"rio pinheiros\")\n  )\n\nnoticias_sp_filtradas |\u003e \n  dplyr::mutate(titulo_url = glue::glue(\"[{titulo}]({url_noticia})\")) |\u003e \n    dplyr::select(data, titulo_url) |\u003e \n  knitr::kable()\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeatrizmilz%2Fnoticiasgov","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeatrizmilz%2Fnoticiasgov","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeatrizmilz%2Fnoticiasgov/lists"}