Skip to content

Commit

Permalink
Merge branch 'develop' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
J535D165 committed Feb 11, 2021
2 parents 3bd76ae + f8f5133 commit 84bafba
Show file tree
Hide file tree
Showing 50 changed files with 4,361 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
^.*\.Rproj$
^\.Rproj\.user$
^LICENSE\.md$
^docker/*$
^img/*$
^\.github$
^codecov\.yml$
^README\.Rmd$
^_pkgdown.yml$
^docs/$
^pkgdown/$
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
104 changes: 104 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# NOTE: This workflow is overkill for most R packages
# check-standard.yaml is likely a better choice
# usethis::use_github_action("check-standard") will install it.
#
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
on:
push:
branches:
- main
- release
- develop
pull_request:
branches:
- main
- release
- develop
paths-ignore:
- 'docs/**'

name: R-CMD-check

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: ubuntu-16.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
- {os: ubuntu-16.04, r: '3.5', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
- {os: ubuntu-16.04, r: '3.4', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@v1
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}

- uses: r-lib/actions/setup-pandoc@v1

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}

- name: Cache R packages
if: runner.os != 'Windows'
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Install system dependencies
if: runner.os == 'Linux'
run: |
while read -r cmd
do
eval sudo $cmd
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "16.04"))')
- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
shell: Rscript {0}

- name: Session info
run: |
options(width = 100)
pkgs <- installed.packages()[, "Package"]
sessioninfo::session_info(pkgs, include_base = TRUE)
shell: Rscript {0}

- name: Check
env:
_R_CHECK_CRAN_INCOMING_: false
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
shell: Rscript {0}

- name: Show testthat output
if: always()
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload check results
if: failure()
uses: actions/upload-artifact@main
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check
48 changes: 48 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# From: https://github.com/github/gitignore/blob/master/R.gitignore

# History files
.Rhistory
.Rapp.history

# Session Data files
.RData

# User-specific files
.Ruserdata

# Example code in package build process
*-Ex.R

# Output files from R CMD build
/*.tar.gz

# Output files from R CMD check
/*.Rcheck/

# RStudio files
.Rproj.user/

# produced vignettes
vignettes/*.html
vignettes/*.pdf

# OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3
.httr-oauth

# knitr and R markdown default cache directories
*_cache/
/cache/

# Temporary files created by R markdown
*.utf8.md
*.knit.md

# R Environment Variables
.Renviron

# pkgdown site
docs/

# translation temp files
po/*~
inst/doc
38 changes: 38 additions & 0 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"creators": [
{
"affiliation": "Utrecht University",
"name": "van Kesteren, Erik-Jan",
"orcid": "0000-0003-1548-1663"
},
{
"affiliation": "Utrecht University",
"name": "Vida, Leonardo",
"orcid": "0000-0002-0461-016X"
},
{
"affiliation": "Utrecht University",
"name": "de Bruin, Jonathan",
"orcid": "0000-0002-4297-0502"
},
{
"affiliation": "Utrecht University",
"name": "Oberski, Daniel",
"orcid": "0000-0001-7467-2297"
}
],
"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.",
"keywords": [
"data enrichment",
"openstreetmap",
"simple features",
"r",
"geo-data",
"spatial",
"statistics"
],
"license": {
"id": "MIT"
},
"title": "Enrich sf Data with Geographic Features from OpenStreetMaps"
}
39 changes: 39 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# YAML 1.2
---
authors:
-
affiliation: "Utrecht University"
family-names: "van Kesteren"
given-names: "Erik-Jan"
orcid: "https://orcid.org/0000-0003-1548-1663"
-
affiliation: "Utrecht University"
family-names: Vida
given-names: Leonardo
orcid: "https://orcid.org/0000-0002-0461-016X"
-
affiliation: "Utrecht University"
family-names: "de Bruin"
given-names: Jonathan
orcid: "https://orcid.org/0000-0002-4297-0502"
-
affiliation: "Utrecht University"
family-names: "Oberski"
given-names: Daniel
orcid: "https://orcid.org/0000-0001-7467-2297"
cff-version: "1.1.0"
date-released: 2021-02-15
keywords:
- "data enrichment"
- openstreetmap
- "simple features"
- r
- "geo-data"
- spatial
- statistics
license: MIT
message: "If you use this software, please cite it using these metadata."
repository-code: "https://github.com/sodascience/osmenrich"
title: Enrich sf Data with Geographic Features from OpenStreetMaps
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.
version: "1.0.0"
44 changes: 44 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
Package: osmenrich
Type: Package
Title: Enrich sf Data with Geographic Features from OpenStreetMaps
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.
Version: 1.0
Author: ODISSEI SoDa Team
Authors@R: c(
person("Erik-Jan", "van Kesteren", email = "e.vankesteren1@uu.nl",
role = "cre", comment = c(ORCID = "0000-0003-1548-1663")
),
person("Leonardo Jaya", "Vida", email = "l.j.vida@uu.nl", role = "aut",
comment = c(ORCID = "0000-0002-0461-016X")
),
person("Jonathan", "de Bruin", email = "j.debruin1@uu.nl", role = "aut",
comment = c(ORCID = "0000-0002-4297-0502")
),
person("Daniel", "Oberksi", email = "d.l.oberski@uu.nl", role = "ctb",
comment = c(ORCID = "0000-0001-7467-2297")
),
person("SoDa Team", role = c("cph", "fnd"))
)
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
Imports:
osmdata,
sf,
magrittr,
methods,
lwgeom,
tibble,
httr,
RCurl,
jsonlite
RoxygenNote: 7.1.1.9000
Roxygen: list(markdown = TRUE)
Suggests:
testthat,
covr,
knitr,
rmarkdown
VignetteBuilder: knitr
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 SoDa Team - ODISSEI

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
26 changes: 26 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Generated by roxygen2: do not edit by hand

S3method(print,enriched_overpass_query)
export()
export(add_bbox)
export(add_distance)
export(add_feature)
export(add_kernel)
export(add_type)
export(distance_by_bike)
export(distance_by_car)
export(distance_by_foot)
export(duration_by_bike)
export(duration_by_car)
export(duration_by_foot)
export(enrich_opq)
export(enrich_osm)
export(kernel_gaussian)
export(kernel_parabola)
export(kernel_uniform)
export(osrm_distance)
export(osrm_duration)
importFrom(magrittr,`%>%`)
importFrom(methods,is)
importFrom(osmdata,get_overpass_url)
importFrom(osmdata,set_overpass_url)
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# osmenrich 1.0

## Major changes:
- First release
Loading

0 comments on commit 84bafba

Please sign in to comment.