Skip to content

Commit

Permalink
Examples ans data availability updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Haydée Svab committed Oct 11, 2023
1 parent 065aff1 commit f8eeaea
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 13 deletions.
6 changes: 3 additions & 3 deletions R/read_map.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,23 @@
#' @examples
#' library(odbr)
#'
#' # return zone data from OD Surveys database as data.frame at a given city and year
#' # return zone data from OD Surveys database as sf object at a given city and year
#' df <- read_map(
#' city = "Sao Paulo",
#' year = 2017,
#' harmonize = FALSE,
#' geometry = "zone"
#' )
#'
#' #' # return district data from OD Surveys database as data.frame at a given city and year
#' #' # return district data from OD Surveys database as sf object at a given city and year
#' df <- read_map(
#' city = "Sao Paulo",
#' year = 2017,
#' harmonize = FALSE,
#' geometry = "district"
#' )
#'
#' # return municipality data from OD Surveys database as data.frame at a given city and year
#' # return municipality data from OD Surveys database as sf object at a given city and year
#' df <- read_map(
#' city = "Sao Paulo",
#' year = 2017,
Expand Down
47 changes: 42 additions & 5 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,55 @@ The syntax of all `odbr` functions operate on the same logic so it becomes intui

```{r example}
library(odbr)
## basic example code
# Return data from OD Surveys database as data.frame
df <- read_od(
city = "Sao Paulo",
year = 2017,
harmonize = FALSE
)

Check warning on line 62 in README.Rmd

View workflow job for this annotation

GitHub Actions / lint-project

file=README.Rmd,line=62,col=2,[indentation_linter] Indentation should be 0 spaces but is 2 spaces.
# Return zone data from OD Surveys database as sf object at a given city and year
df <- read_map(
city = "Sao Paulo",
year = 2017,
harmonize = FALSE,
geometry = "zone"
)

Check warning on line 70 in README.Rmd

View workflow job for this annotation

GitHub Actions / lint-project

file=README.Rmd,line=70,col=2,[indentation_linter] Indentation should be 0 spaces but is 2 spaces.
# Return data dictionary from OD Surveys, as data.frame, at a given city and year
df <- read_dictionary(
city = "Sao Paulo",
year = 1977,
harmonize = FALSE,
language = "pt"
)

Check warning on line 78 in README.Rmd

View workflow job for this annotation

GitHub Actions / lint-project

file=README.Rmd,line=78,col=2,[indentation_linter] Indentation should be 0 spaces but is 2 spaces.
```

## Available datasets:
## Available non-harmonized datasets:

:point_right: **The original geodetic reference system remained unchanged.**

|City|Years available| Harmonized | Source|
|-----|-----|-----|-----|
|São Paulo| 1977, 1987, 1997, 2007, 2017 | No | [Metrô-SP] (https://transparencia.metrosp.com.br/dataset/pesquisa-origem-e-destino)



## Available harmonized datasets:

:point_right: **All harmonized datasets use geodetic reference system "SIRGAS2000", CRS(4674).**

|City|Years available| Harmonized | Dictionary languages
|-----|-----|-----|-----|
|São Paulo| 1977, 1987, 1997, 2007, 2017 | Yes | en, es, pt-br

:point_right: **All hamonized datasets use geodetic reference system "SIRGAS2000", CRS(4674).**

## Contributing to odbr
If you would like to contribute to **odbr**, you're welcome to open an issue to explain the proposed a contribution.


## Credits <a href="https://ropensci.org/r"><img align="right" src="man/figures/ropenscilogo.png" alt="ropensci logo" width="150" /></a>
## Credits

Original databases and shapefiles are created by local official government institutions.

Expand All @@ -87,6 +124,6 @@ bibentry(
```

## Sponsor <a href="https://ropensci.org/r"><img align="right" src="man/figures/ropenscilogo.png" alt="ropensci logo" width="150" /></a>
## Sponsors <a href="https://ropensci.org/r"><img align="right" src="man/figures/ropenscilogo.png" alt="ropensci logo" width="150" /></a>

The **odbr** package was initialy sponsored by rOpenSci through its Champions Program (2022 edition) whose main goal is to provide support to R developers from around the world who identify themselves as members of groups that are systematically excluded from the open-source software community.
45 changes: 40 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,55 @@ Like this:

``` r
library(odbr)
## basic example code

# Return data from OD Surveys database as data.frame
df <- read_od(
city = "Sao Paulo",
year = 2017,
harmonize = FALSE
)

# Return zone data from OD Surveys database as sf object at a given city and year
df <- read_map(
city = "Sao Paulo",
year = 2017,
harmonize = FALSE,
geometry = "zone"
)

# Return data dictionary from OD Surveys, as data.frame, at a given city and year
df <- read_dictionary(
city = "Sao Paulo",
year = 1977,
harmonize = FALSE,
language = "pt"
)
```

## Available datasets:
## Available non-harmonized datasets:

| City | Years available | Harmonized | Source |
|-----------|------------------------------|------------|-----------------------------------------------------------------------------------------|
| São Paulo | 1977, 1987, 1997, 2007, 2017 | No | \[Metrô-SP\] (<https://transparencia.metrosp.com.br/dataset/pesquisa-origem-e-destino>) |

point_right: **The original geodetic reference system remained
unchanged.**

## Available harmonized datasets:

| City | Years available | Harmonized | Dictionary languages |
|-----------|------------------------------|------------|----------------------|
| São Paulo | 1977, 1987, 1997, 2007, 2017 | Yes | en, es, pt-br |

:point_right: **All hamonized datasets use geodetic reference system
point_right: **All harmonized datasets use geodetic reference system
“SIRGAS2000”, CRS(4674).**

## Contributing to odbr

If you would like to contribute to **odbr**, you’re welcome to open an
issue to explain the proposed a contribution.

## Credits <a href="https://ropensci.org/r"><img align="right" src="man/figures/ropenscilogo.png" alt="ropensci logo" width="150" /></a>
## Credits

Original databases and shapefiles are created by local official
government institutions.
Expand All @@ -87,7 +122,7 @@ If you want to cite this package, you can cite it as:
textVersion = "Svab, H.; Milz, B.; Oliveira, D. R.; Pereira, R. H. M. (2023) odbr: Download Data from Brazil's Origin Destination Surveys v0.1.0, <https://CRAN.R-project.org/package=odbr>."
)

## Sponsor <a href="https://ropensci.org/r"><img align="right" src="man/figures/ropenscilogo.png" alt="ropensci logo" width="150" /></a>
## Sponsors <a href="https://ropensci.org/r"><img align="right" src="man/figures/ropenscilogo.png" alt="ropensci logo" width="150" /></a>

The **odbr** package was initialy sponsored by rOpenSci through its
Champions Program (2022 edition) whose main goal is to provide support
Expand Down

0 comments on commit f8eeaea

Please sign in to comment.