Skip to content

Commit 41c1422

Browse files
authored
Merge pull request #9 from FlowmapBlue/prep-for-CRAN-release
Cleanup before CRAN release, new feature to handle time column
2 parents 30a9344 + fd3dd2d commit 41c1422

35 files changed

Lines changed: 1812 additions & 52 deletions

.Rbuildignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,16 @@
11
^flowmapblue\.Rproj$
22
^\.Rproj\.user$
3+
^.idea$
4+
^_pkgdown\.yml$
5+
^docs$
6+
^pkgdown$
7+
^CITATION\.cff$
8+
^codemeta\.json$
9+
^vignettes/webmedia$
10+
^vignettes/.quarto$
11+
^.github$
12+
^README.qmd$
13+
^cran-comments\.md$
14+
^data-raw$
15+
^man/figures/opengraph-card.png$
16+
^LICENSE.md$

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

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
workflow_dispatch:
9+
10+
name: R-CMD-check
11+
12+
permissions: read-all
13+
14+
jobs:
15+
R-CMD-check:
16+
runs-on: ${{ matrix.config.os }}
17+
18+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
19+
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
config:
24+
- {os: macos-latest, r: 'release'}
25+
- {os: windows-latest, r: 'release'}
26+
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
27+
- {os: ubuntu-latest, r: 'release'}
28+
- {os: ubuntu-latest, r: 'oldrel-1'}
29+
30+
env:
31+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
32+
R_KEEP_PKG_SOURCE: yes
33+
34+
steps:
35+
- uses: actions/checkout@v4
36+
37+
- uses: r-lib/actions/setup-pandoc@v2
38+
39+
- uses: r-lib/actions/setup-r@v2
40+
with:
41+
r-version: ${{ matrix.config.r }}
42+
http-user-agent: ${{ matrix.config.http-user-agent }}
43+
use-public-rspm: true
44+
45+
- uses: r-lib/actions/setup-r-dependencies@v2
46+
with:
47+
extra-packages: any::rcmdcheck
48+
needs: check
49+
50+
- uses: r-lib/actions/check-r-package@v2
51+
with:
52+
upload-snapshots: true
53+
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'

.github/workflows/pkgdown.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
release:
9+
types: [published]
10+
workflow_dispatch:
11+
12+
name: pkgdown
13+
14+
permissions: read-all
15+
16+
jobs:
17+
pkgdown:
18+
runs-on: ubuntu-latest
19+
# Only restrict concurrency for non-PR jobs
20+
concurrency:
21+
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
22+
env:
23+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
24+
permissions:
25+
contents: write
26+
steps:
27+
- uses: actions/checkout@v4
28+
29+
- uses: r-lib/actions/setup-pandoc@v2
30+
31+
- uses: r-lib/actions/setup-r@v2
32+
with:
33+
use-public-rspm: true
34+
35+
- uses: r-lib/actions/setup-r-dependencies@v2
36+
with:
37+
extra-packages: any::pkgdown, local::.
38+
needs: website
39+
40+
- name: Build site
41+
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
42+
shell: Rscript {0}
43+
44+
- name: Deploy to GitHub pages 🚀
45+
if: github.event_name != 'pull_request'
46+
uses: JamesIves/github-pages-deploy-action@v4.5.0
47+
with:
48+
clean: false
49+
branch: gh-pages
50+
folder: docs

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
11
.Rhistory
22
.Rproj.user
33
.idea
4+
5+
# macOS artifacts
6+
.DS_Store
7+
._.DS_Store
8+
**/.DS_Store
9+
**/._.DS_Store
10+
11+
/.quarto/
12+
.Renviron
13+
/doc/
14+
/docs/
15+
/Meta/
16+
vignettes/.quarto
17+
docs

CITATION.cff

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# --------------------------------------------
2+
# CITATION file created with {cffr} R package
3+
# See also: https://docs.ropensci.org/cffr/
4+
# --------------------------------------------
5+
6+
cff-version: 1.2.0
7+
message: 'To cite package "flowmapblue" in publications use:'
8+
type: software
9+
license: MIT
10+
title: 'flowmapblue: Flow Map Rendering'
11+
version: 0.0.1
12+
doi: 10.32614/CRAN.package.flowmapblue
13+
abstract: Rendering interactive flow maps to visualize numbers of movements between
14+
locations (origin-destination data).
15+
authors:
16+
- family-names: Boyandin
17+
given-names: Ilya
18+
email: ilya@boyandin.me
19+
orcid: https://orcid.org/0000-0001-5585-7587
20+
- family-names: Kotov
21+
given-names: Egor
22+
email: kotov.egor@gmail.com
23+
orcid: https://orcid.org/0000-0001-6690-5345
24+
preferred-citation:
25+
type: manual
26+
title: Flowmap.blue widget for R
27+
authors:
28+
- family-names: Boyandin
29+
given-names: Ilya
30+
email: ilya@boyandin.me
31+
orcid: https://orcid.org/0000-0001-5585-7587
32+
year: '2024'
33+
url: https://github.com/FlowmapBlue/flowmapblue.R
34+
doi: 10.32614/CRAN.package.flowmapblue
35+
repository-code: https://github.com/FlowmapBlue/flowmapblue.R
36+
url: https://github.com/FlowmapBlue/flowmapblue.R
37+
contact:
38+
- family-names: Kotov
39+
given-names: Egor
40+
email: kotov.egor@gmail.com
41+
orcid: https://orcid.org/0000-0001-6690-5345
42+
keywords:
43+
- datavis
44+
- mobility
45+
- mobility-data
46+
- movement-data
47+
- rstats
48+
- rstudio
49+
references:
50+
- type: software
51+
title: 'R: A Language and Environment for Statistical Computing'
52+
notes: Depends
53+
url: https://www.R-project.org/
54+
authors:
55+
- name: R Core Team
56+
institution:
57+
name: R Foundation for Statistical Computing
58+
address: Vienna, Austria
59+
year: '2024'
60+
version: '>= 2.10'
61+
- type: software
62+
title: htmlwidgets
63+
abstract: 'htmlwidgets: HTML Widgets for R'
64+
notes: Imports
65+
url: https://github.com/ramnathv/htmlwidgets
66+
repository: https://CRAN.R-project.org/package=htmlwidgets
67+
authors:
68+
- family-names: Vaidyanathan
69+
given-names: Ramnath
70+
- family-names: Xie
71+
given-names: Yihui
72+
- family-names: Allaire
73+
given-names: JJ
74+
- family-names: Cheng
75+
given-names: Joe
76+
email: joe@posit.co
77+
- family-names: Sievert
78+
given-names: Carson
79+
email: carson@posit.co
80+
orcid: https://orcid.org/0000-0002-4958-2844
81+
- family-names: Russell
82+
given-names: Kenton
83+
year: '2024'
84+
- type: software
85+
title: quarto
86+
abstract: 'quarto: R Interface to ''Quarto'' Markdown Publishing System'
87+
notes: Suggests
88+
url: https://quarto-dev.github.io/quarto-r/
89+
repository: https://CRAN.R-project.org/package=quarto
90+
authors:
91+
- family-names: Allaire
92+
given-names: JJ
93+
email: jj@posit.co
94+
orcid: https://orcid.org/0000-0003-0174-9868
95+
- family-names: Dervieux
96+
given-names: Christophe
97+
email: cderv@posit.co
98+
orcid: https://orcid.org/0000-0003-4474-2498
99+
year: '2024'
100+

DESCRIPTION

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,26 @@
11
Package: flowmapblue
2-
Title: Flow map rendering
2+
Title: Flow Map Rendering
33
Version: 0.0.1
4-
Authors@R:
5-
person(given = "Ilya",
6-
family = "Boyandin",
7-
role = c("aut", "cre"),
8-
email = "ilya@boyandin.me",
9-
comment = c(ORCID = "0000-0001-5585-7587"))
10-
Description: Rendering interactive flow maps to visualize numbers of movements between locations (origin-destination data).
11-
License: `use_mit_license()`
4+
Authors@R: c(
5+
person("Ilya", "Boyandin", , "ilya@boyandin.me", role = c("aut", "cph"),
6+
comment = c(ORCID = "0000-0001-5585-7587")),
7+
person("Egor", "Kotov", , "kotov.egor@gmail.com", role = "cre",
8+
comment = c(ORCID = "0000-0001-6690-5345"))
9+
)
10+
Description: Rendering interactive flow maps to visualize numbers of
11+
movements between locations (origin-destination data).
12+
License: MIT + file LICENSE
13+
URL: https://github.com/FlowmapBlue/flowmapblue.R
14+
BugReports: https://github.com/FlowmapBlue/flowmapblue.R/issues
15+
Depends:
16+
R (>= 2.10)
17+
Imports:
18+
htmlwidgets
19+
Suggests:
20+
quarto
21+
VignetteBuilder:
22+
quarto
1223
Encoding: UTF-8
1324
LazyData: true
14-
Imports: htmlwidgets
1525
Roxygen: list(markdown = TRUE)
16-
RoxygenNote: 7.1.1
26+
RoxygenNote: 7.3.2

LICENSE

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

LICENSE.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# MIT License
2+
3+
Copyright 2020 Ilya Boyandin
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
this software and associated documentation files (the "Software"), to deal in
7+
the Software without restriction, including without limitation the rights to
8+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9+
the Software, and to permit persons to whom the Software is furnished to do so,
10+
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, FITNESS
17+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

NEWS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# flowmapblue 0.0.1
2+
3+
* Initial CRAN submission.

R/data.R

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#' Swiss Locations Dataset
2+
#'
3+
#' A dataset containing geographic information about 26 locations in Switzerland. This data includes unique identifiers, names, and geographic coordinates (latitude and longitude) for each location.
4+
#'
5+
#' @format ## `ch_locations`
6+
#' A data frame with 26 rows and 4 columns:
7+
#' \describe{
8+
#' \item{id}{A `character` vector representing the unique identifier for each Swiss location (e.g., "JU", "LU").}
9+
#' \item{name}{A `character` vector representing the name of each location (e.g., "Jura", "Luzern").}
10+
#' \item{lat}{A `numeric` vector representing the latitude of each location in WGS84 (EPSG: 4326) coordinate reference system.}
11+
#' \item{lon}{A `numeric` vector representing the longitude of each location in WGS84 (EPSG: 4326) coordinate reference system.}
12+
#' }
13+
"ch_locations"
14+
15+
#' Swiss Flows Dataset
16+
#'
17+
#' A dataset containing flow data between various locations in Switzerland. This data represents the flow counts between origin and destination locations, identified by their unique codes.
18+
#'
19+
#' @format ## `ch_flows`
20+
#' A data frame with 676 rows and 3 columns:
21+
#' \describe{
22+
#' \item{origin}{A `character` vector representing the origin location identifier (must match the `id` in the `ch_locations` dataset).}
23+
#' \item{dest}{A `character` vector representing the destination location identifier (must match the `id` in the `ch_locations` dataset).}
24+
#' \item{count}{An `integer` vector representing the flow count between the origin and destination locations.}
25+
#' }
26+
"ch_flows"

0 commit comments

Comments
 (0)