Skip to content

Commit 84bafba

Browse files
committed
Merge branch 'develop' into main
2 parents 3bd76ae + f8f5133 commit 84bafba

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+4361
-0
lines changed

.Rbuildignore

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
^.*\.Rproj$
2+
^\.Rproj\.user$
3+
^LICENSE\.md$
4+
^docker/*$
5+
^img/*$
6+
^\.github$
7+
^codecov\.yml$
8+
^README\.Rmd$
9+
^_pkgdown.yml$
10+
^docs/$
11+
^pkgdown/$

.gitattributes

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto

.github/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.html

.github/workflows/R-CMD-check.yaml

+104
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# NOTE: This workflow is overkill for most R packages
2+
# check-standard.yaml is likely a better choice
3+
# usethis::use_github_action("check-standard") will install it.
4+
#
5+
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
6+
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
7+
on:
8+
push:
9+
branches:
10+
- main
11+
- release
12+
- develop
13+
pull_request:
14+
branches:
15+
- main
16+
- release
17+
- develop
18+
paths-ignore:
19+
- 'docs/**'
20+
21+
name: R-CMD-check
22+
23+
jobs:
24+
R-CMD-check:
25+
runs-on: ${{ matrix.config.os }}
26+
27+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
28+
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
config:
33+
- {os: ubuntu-16.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
34+
- {os: ubuntu-16.04, r: '3.5', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
35+
- {os: ubuntu-16.04, r: '3.4', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
36+
37+
env:
38+
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
39+
RSPM: ${{ matrix.config.rspm }}
40+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
41+
42+
steps:
43+
- uses: actions/checkout@v2
44+
45+
- uses: r-lib/actions/setup-r@v1
46+
with:
47+
r-version: ${{ matrix.config.r }}
48+
http-user-agent: ${{ matrix.config.http-user-agent }}
49+
50+
- uses: r-lib/actions/setup-pandoc@v1
51+
52+
- name: Query dependencies
53+
run: |
54+
install.packages('remotes')
55+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
56+
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
57+
shell: Rscript {0}
58+
59+
- name: Cache R packages
60+
if: runner.os != 'Windows'
61+
uses: actions/cache@v2
62+
with:
63+
path: ${{ env.R_LIBS_USER }}
64+
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
65+
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
66+
67+
- name: Install system dependencies
68+
if: runner.os == 'Linux'
69+
run: |
70+
while read -r cmd
71+
do
72+
eval sudo $cmd
73+
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "16.04"))')
74+
75+
- name: Install dependencies
76+
run: |
77+
remotes::install_deps(dependencies = TRUE)
78+
remotes::install_cran("rcmdcheck")
79+
shell: Rscript {0}
80+
81+
- name: Session info
82+
run: |
83+
options(width = 100)
84+
pkgs <- installed.packages()[, "Package"]
85+
sessioninfo::session_info(pkgs, include_base = TRUE)
86+
shell: Rscript {0}
87+
88+
- name: Check
89+
env:
90+
_R_CHECK_CRAN_INCOMING_: false
91+
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
92+
shell: Rscript {0}
93+
94+
- name: Show testthat output
95+
if: always()
96+
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
97+
shell: bash
98+
99+
- name: Upload check results
100+
if: failure()
101+
uses: actions/upload-artifact@main
102+
with:
103+
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
104+
path: check

.gitignore

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# From: https://github.com/github/gitignore/blob/master/R.gitignore
2+
3+
# History files
4+
.Rhistory
5+
.Rapp.history
6+
7+
# Session Data files
8+
.RData
9+
10+
# User-specific files
11+
.Ruserdata
12+
13+
# Example code in package build process
14+
*-Ex.R
15+
16+
# Output files from R CMD build
17+
/*.tar.gz
18+
19+
# Output files from R CMD check
20+
/*.Rcheck/
21+
22+
# RStudio files
23+
.Rproj.user/
24+
25+
# produced vignettes
26+
vignettes/*.html
27+
vignettes/*.pdf
28+
29+
# OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3
30+
.httr-oauth
31+
32+
# knitr and R markdown default cache directories
33+
*_cache/
34+
/cache/
35+
36+
# Temporary files created by R markdown
37+
*.utf8.md
38+
*.knit.md
39+
40+
# R Environment Variables
41+
.Renviron
42+
43+
# pkgdown site
44+
docs/
45+
46+
# translation temp files
47+
po/*~
48+
inst/doc

.zenodo.json

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"creators": [
3+
{
4+
"affiliation": "Utrecht University",
5+
"name": "van Kesteren, Erik-Jan",
6+
"orcid": "0000-0003-1548-1663"
7+
},
8+
{
9+
"affiliation": "Utrecht University",
10+
"name": "Vida, Leonardo",
11+
"orcid": "0000-0002-0461-016X"
12+
},
13+
{
14+
"affiliation": "Utrecht University",
15+
"name": "de Bruin, Jonathan",
16+
"orcid": "0000-0002-4297-0502"
17+
},
18+
{
19+
"affiliation": "Utrecht University",
20+
"name": "Oberski, Daniel",
21+
"orcid": "0000-0001-7467-2297"
22+
}
23+
],
24+
"description": "Add columns to sf data using geographic features from OpenStreetMap. In the case of point geocoded observations, column values are based on weighted distances to the desired features.",
25+
"keywords": [
26+
"data enrichment",
27+
"openstreetmap",
28+
"simple features",
29+
"r",
30+
"geo-data",
31+
"spatial",
32+
"statistics"
33+
],
34+
"license": {
35+
"id": "MIT"
36+
},
37+
"title": "Enrich sf Data with Geographic Features from OpenStreetMaps"
38+
}

CITATION.cff

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# YAML 1.2
2+
---
3+
authors:
4+
-
5+
affiliation: "Utrecht University"
6+
family-names: "van Kesteren"
7+
given-names: "Erik-Jan"
8+
orcid: "https://orcid.org/0000-0003-1548-1663"
9+
-
10+
affiliation: "Utrecht University"
11+
family-names: Vida
12+
given-names: Leonardo
13+
orcid: "https://orcid.org/0000-0002-0461-016X"
14+
-
15+
affiliation: "Utrecht University"
16+
family-names: "de Bruin"
17+
given-names: Jonathan
18+
orcid: "https://orcid.org/0000-0002-4297-0502"
19+
-
20+
affiliation: "Utrecht University"
21+
family-names: "Oberski"
22+
given-names: Daniel
23+
orcid: "https://orcid.org/0000-0001-7467-2297"
24+
cff-version: "1.1.0"
25+
date-released: 2021-02-15
26+
keywords:
27+
- "data enrichment"
28+
- openstreetmap
29+
- "simple features"
30+
- r
31+
- "geo-data"
32+
- spatial
33+
- statistics
34+
license: MIT
35+
message: "If you use this software, please cite it using these metadata."
36+
repository-code: "https://github.com/sodascience/osmenrich"
37+
title: Enrich sf Data with Geographic Features from OpenStreetMaps
38+
abstract: Add columns to sf data using geographic features from OpenStreetMap. In the case of point geocoded observations, column values are based on weighted distances to the desired features.
39+
version: "1.0.0"

DESCRIPTION

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
Package: osmenrich
2+
Type: Package
3+
Title: Enrich sf Data with Geographic Features from OpenStreetMaps
4+
Description: Add columns to sf data using geographic features from
5+
OpenStreetMap. In the case of point geocoded observations, column values
6+
are based on weighted distances to the desired features.
7+
Version: 1.0
8+
Author: ODISSEI SoDa Team
9+
Authors@R: c(
10+
person("Erik-Jan", "van Kesteren", email = "e.vankesteren1@uu.nl",
11+
role = "cre", comment = c(ORCID = "0000-0003-1548-1663")
12+
),
13+
person("Leonardo Jaya", "Vida", email = "l.j.vida@uu.nl", role = "aut",
14+
comment = c(ORCID = "0000-0002-0461-016X")
15+
),
16+
person("Jonathan", "de Bruin", email = "j.debruin1@uu.nl", role = "aut",
17+
comment = c(ORCID = "0000-0002-4297-0502")
18+
),
19+
person("Daniel", "Oberksi", email = "d.l.oberski@uu.nl", role = "ctb",
20+
comment = c(ORCID = "0000-0001-7467-2297")
21+
),
22+
person("SoDa Team", role = c("cph", "fnd"))
23+
)
24+
License: MIT + file LICENSE
25+
Encoding: UTF-8
26+
LazyData: true
27+
Imports:
28+
osmdata,
29+
sf,
30+
magrittr,
31+
methods,
32+
lwgeom,
33+
tibble,
34+
httr,
35+
RCurl,
36+
jsonlite
37+
RoxygenNote: 7.1.1.9000
38+
Roxygen: list(markdown = TRUE)
39+
Suggests:
40+
testthat,
41+
covr,
42+
knitr,
43+
rmarkdown
44+
VignetteBuilder: knitr

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 SoDa Team - ODISSEI
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

NAMESPACE

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Generated by roxygen2: do not edit by hand
2+
3+
S3method(print,enriched_overpass_query)
4+
export()
5+
export(add_bbox)
6+
export(add_distance)
7+
export(add_feature)
8+
export(add_kernel)
9+
export(add_type)
10+
export(distance_by_bike)
11+
export(distance_by_car)
12+
export(distance_by_foot)
13+
export(duration_by_bike)
14+
export(duration_by_car)
15+
export(duration_by_foot)
16+
export(enrich_opq)
17+
export(enrich_osm)
18+
export(kernel_gaussian)
19+
export(kernel_parabola)
20+
export(kernel_uniform)
21+
export(osrm_distance)
22+
export(osrm_duration)
23+
importFrom(magrittr,`%>%`)
24+
importFrom(methods,is)
25+
importFrom(osmdata,get_overpass_url)
26+
importFrom(osmdata,set_overpass_url)

NEWS.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# osmenrich 1.0
2+
3+
## Major changes:
4+
- First release

0 commit comments

Comments
 (0)