Skip to content

Commit

Permalink
pkg site
Browse files Browse the repository at this point in the history
attempt #17
maybe we don't need a package?
  • Loading branch information
temospena committed Jun 7, 2024
1 parent 9f6cf3b commit cd0e116
Show file tree
Hide file tree
Showing 10 changed files with 152 additions and 10 deletions.
17 changes: 17 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
^LICENSE\.md$
^.Rhistory
^.Rapp.history
^.RData
^\.Rproj.user$
^\.ccache$
^database$
^outputdata$
^inputdata*
^analysis*
^\analysis*
^SiteSelection.qgz
^.*\.Rproj$
^\.Rproj\.user$
^_pkgdown\.yml$
^docs$
^pkgdown$
^\.github$
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
50 changes: 50 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
release:
types: [published]
workflow_dispatch:

name: pkgdown

permissions: read-all

jobs:
pkgdown:
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v4

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

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::pkgdown, local::.
needs: website

- name: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/[email protected]
with:
clean: false
branch: gh-pages
folder: docs
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,4 @@ SiteSelection.qgz
_targets/meta/meta*

_targets/meta/meta
docs
28 changes: 25 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ Package: SiteSelection
Title: An R script to find complex areas for the Streets4All Project
Version: 0.2.0
Authors@R:
person("Rosa", "Felix", , "rosamfelix@@tecnico.ulisboa.pt", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-5642-6006"))
c(person("Rosa", "Félix", , "rosamfelix@@tecnico.ulisboa.pt", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-5642-6006")),
person("Gabriel", "Valença", , "[email protected]", role = "aut",
comment = c(ORCID = "0000-0002-3684-3005"))
comment = c(ORCID = "0000-0002-3684-3005")))
Maintainer: Rosa Félix <[email protected]>
Description: SiteSelection aims to find areas for a dynamic street
re-allocation experiment. It consist in a process of multi criteria
to select the cell locations of a giver city or neighborhood where the
Expand All @@ -18,3 +19,24 @@ Depends:
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
Imports:
dplyr,
ggplot2,
leaflet,
lubridate,
qgisprocess,
readr,
scales,
sf,
sfheaders,
stplanr,
stringr,
tibble,
tidyr,
targets,
openxlsx
Suggests:
mapview,
sfnetworks,
viznetwork
URL: https://u-shift.github.io/SiteSelection/
17 changes: 17 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,2 +1,19 @@
# Generated by roxygen2: do not edit by hand

import(dplyr)
import(ggplot2)
import(leaflet)
import(lubridate)
import(qgisprocess)
import(readr)
import(scales)
import(sf)
import(stringr)
import(targets)
import(tibble)
import(tidyr)
importFrom(stats,frequency)
importFrom(stats,median)
importFrom(stats,quantile)
importFrom(stats,sd)
importFrom(utils,methods)
15 changes: 15 additions & 0 deletions R/functions.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
#' @import sf
#' @import ggplot2
#' @import leaflet
#' @import lubridate
#' @import qgisprocess
#' @import readr
#' @import scales
#' @import stringr
#' @import targets
#' @import tibble
#' @import tidyr
#' @import dplyr
#' @importFrom stats frequency median quantile sd
#' @importFrom utils methods

# functions all in one


Expand Down
4 changes: 2 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ knitr::include_graphics("img/tar_result.png")

If you want to see the filtered cells (candidates), you can load the `site_selection` object and plot it, with *complex* and *very complex* cells (transit layer considered).

```{r}
```{r echo=FALSE}
knitr::include_graphics("img/complexity.png")
```

Expand Down Expand Up @@ -119,7 +119,7 @@ It includes sequential runs with all inputs, outputs, and variable statistics.

_Work in Progress..._

## Citation
## About

This work is part of [Streets4All Project](https://streets4all.tecnico.ulisboa.pt), developed at the University of Lisbon and at the University of Coimbra, and funded by Fundação para a Ciência e Tecnologia (PT).

Expand Down
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,6 @@ If you want to see the filtered cells (candidates), you can load the
`site_selection` object and plot it, with *complex* and *very complex*
cells (transit layer considered).

``` r
knitr::include_graphics("img/complexity.png")
```

<img src="img/complexity.png" width="660" />

When the process is not complete, you may have an error like this
Expand Down Expand Up @@ -123,7 +119,7 @@ statistics.

*Work in Progress…*

## Citation
## About

This work is part of [Streets4All
Project](https://streets4all.tecnico.ulisboa.pt), developed at the
Expand Down
23 changes: 23 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
url: https://u-shift.github.io/SiteSelection/
template:
bootstrap: 5
bootswatch: flatly
navbar:
structure:
left:
- intro
- reference
- articles
- news
right:
- search
- github
home:
links:
- text: Streets4All
href: https://streets4all.tecnico.ulisboa.pt
footer:
structure:
left: developed_by
right: built_with

0 comments on commit cd0e116

Please sign in to comment.