Skip to content

Commit

Permalink
geobr v1.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rafapereirabr committed Sep 9, 2023
1 parent a527b28 commit 1ca8f25
Show file tree
Hide file tree
Showing 8 changed files with 873 additions and 831 deletions.
18 changes: 10 additions & 8 deletions r-package/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: geobr
Title: Download Official Spatial Data Sets of Brazil
Version: 1.7.0999
Version: 1.8.0
Authors@R: c(person(given="Rafael H. M.", family="Pereira", email="[email protected]", role=c("aut", "cre"), comment = c(ORCID = "0000-0003-2125-7465")),
person(given="Caio Nogueira", family="Goncalves", role=c("aut")),
person(given="Paulo Henrique Fernandes de", family="Araujo", role=c("ctb")),
Expand Down Expand Up @@ -29,20 +29,22 @@ Encoding: UTF-8
LazyData: TRUE
Depends:
R (>= 3.5.0)
Suggests:
covr,
dplyr (>= 0.8-3),
ggplot2 (>= 3.3.1),
knitr,
rmarkdown (>= 2.6),
testthat
Imports:
curl,
data.table,
httr (>= 1.4.1),
methods,
sf (>= 0.9-3),
utils
Suggests:
censobr,
covr,
dplyr (>= 0.8-3),
ggplot2 (>= 3.3.1),
knitr,
rmarkdown (>= 2.6),
scales,
testthat
RoxygenNote: 7.2.3
Roxygen: list(markdown = TRUE)
VignetteBuilder: knitr
4 changes: 4 additions & 0 deletions r-package/NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
**New function**
- `read_capitals()` to download either a spatial `sf` object with the location of the municipal seats (sede dos municipios) of state capitals, or a `data.frame` with the names of codes of state capitals. [Closes #243](https://github.com/ipeaGIT/geobr/issues/243)

**Minor changes**
- Update intro vignette to show how to use geobr together with the new [**censobr**](https://ipeagit.github.io/censobr/index.html) sister package.

**Bug fixes**

- fixed bug from conflict between `sf` and `data.table` that was messing with plot extent. [Closes #284](https://github.com/ipeaGIT/geobr/issues/284).
- fixed bug from conflicts between `plotly` and `data.table`. [Closes #279](https://github.com/ipeaGIT/geobr/issues/279).
- fixed bug in `cep_to_state()` function. [Closes #317](https://github.com/ipeaGIT/geobr/issues/317).
Expand Down
2 changes: 1 addition & 1 deletion r-package/R/read_health_facilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#' column `data_source`. Periodically the coordinates are revised with the
#' objective of improving the quality of the data." The date of the last data
#' update is registered in the database in the columns `date_update` and
#' `year_update`. More information available at \url{https://dados.gov.br/dataset?q=CNES}.
#' `year_update`. More information in the CNES data set available at \url{https://dados.gov.br/}.
#' These data use Geodetic reference system "SIRGAS2000" and CRS(4674).
#' @template showProgress
#'
Expand Down
18 changes: 5 additions & 13 deletions r-package/cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
## -- R CMD check results -------------------------------------- geobr 1.6.599909 ----
Duration: 3m 49.4s
## ── R CMD check results ───────────────────────────────────── geobr 1.8.0 ────
Duration: 8m 3.8s

> checking data for non-ASCII characters ... NOTE
checking data for non-ASCII characters ... NOTE
Note: found 58 marked UTF-8 strings

0 errors v | 0 warnings v | 1 note x
0 errors | 0 warnings | 1 note

* This is a submission to get the geobr package back on CRAN.

The geobr package was suspended on CRAN on January 2022 because it continuously failed CRAN's policy to "fail gracefully" when there are any internet connection problems.

We have scrutinized the package, which has now gone through structural changes to address this issue. Here are the main changes:
1. New internal function `check_connection()` and tests that cover cases when users have no internet connection, whem url links are offline, time out or work normally.
2. All functions that require internet connection now use `check_connection()` and return informative messages when url links are offline or timeout.
3. The data used in the package is now simultaneously stored in two independent servers, where one of them is used as a backup link. In other words, the geobr will download the data from server 1. If, for some reason, the download fails because of internet connection problems, then geobr tries to download the data from server 2. If this second attempt fails, then the package returns `invisible(NULL)` with an informative message.

We believe these changes and the redundancy in data storage have made the geobr package substantially more robust and in line with CRAN's policies.
* Update to version v.1.8.0 with one new function and a few bug fixes.

2 changes: 1 addition & 1 deletion r-package/man/read_health_facilities.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1ca8f25

Please sign in to comment.