Skip to content

Commit

Permalink
Prepare update to 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Nenuial committed Apr 30, 2024
1 parent 1c18a1d commit e29a55b
Show file tree
Hide file tree
Showing 121 changed files with 16,904 additions and 84 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
^.*\.Rproj$
^\.Rproj\.user$
^LICENSE\.md$
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/R-CMD-check.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]

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: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v4

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

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
52 changes: 52 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# 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

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 Nenuial 🚀
if: github.event_name != 'pull_request'
uses: burnett01/[email protected]
with:
switches: -avz
path: docs/
remote_path: ${{ secrets.DEPLOY_PATH }}
remote_host: ${{ secrets.DEPLOY_HOST }}
remote_port: ${{ secrets.DEPLOY_PORT }}
remote_user: ${{ secrets.DEPLOY_USER }}
remote_key: ${{ secrets.DEPLOY_KEY }}
36 changes: 22 additions & 14 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,38 @@ Title: Provide Helpers and Themes for ggplot
Version: 0.1.0
Author: Pascal Burkhard
Maintainer: Pascal Burkhard <[email protected]>
Description: ggplot helpers and themes
License: What license is it under?
Description: This package provides helper functions for ggplot graphs and maps.
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
URL: https://github.com/Nenuial/geographer.git
RoxygenNote: 7.3.1
Imports:
colorspace,
fs,
geotools,
ggplot2,
magrittr,
rlang,
sysfonts,
stringr,
glue,
grDevices,
highcharter,
lifecycle,
paletteer,
utils,
prismatic,
colorspace,
grDevices,
magrittr,
methods,
purrr,
rlang,
scales,
geotools,
lifecycle,
showtext,
fs
stringr,
sysfonts,
utils,
wesanderson,
preferably
Remotes:
Nenuial/geotools
Depends:
R (>= 3.1)
R (>= 4.1)
Roxygen: list(markdown = TRUE)
URL: https://ggeo.nenuial.org
Authors@R:
person("Pascal", "Burkhard", , "[email protected]", role = c("aut", "cre"))
2 changes: 2 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
YEAR: 2024
COPYRIGHT HOLDER: ggeo authors
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# MIT License

Copyright (c) 2024 ggeo authors

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.
4 changes: 4 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,17 @@ export(ggeo_remove_breaks)
export(ggeo_remove_title)
export(ggeo_save)
export(ggeoformat_pyramid_pop)
export(ggeopal_center)
export(ggeopal_chooser)
export(ggeopal_hex_to_hcl)
export(ggeopal_pal_to_gradient)
export(ggeopal_to_gradient)
export(ggeosave)
export(ggeotheme)
export(hc_purple_theme)
export(hc_samarqand_theme)
export(hc_web_theme)
export(palette_chooser)
export(return_palette)
importClassesFrom(colorspace,polarLUV)
importFrom(magrittr,"%<>%")
Expand Down
36 changes: 0 additions & 36 deletions R/color.R

This file was deleted.

1 change: 1 addition & 0 deletions R/fonts.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ ggeo_install_fonts_linux <- function() {
#' Register fonts
#'
#' @export
#' @keywords internal
ggeo_register_fonts <- function() {
sysfonts::font_add("Fira Sans", regular = "FiraSans-Regular.otf", bold = "FiraSans-Bold.otf", italic = "FiraSans-Italic.otf")
sysfonts::font_add("Fira Sans Light", regular = "FiraSans-Light.otf", italic = "FiraSans-LightItalic.otf")
Expand Down
21 changes: 21 additions & 0 deletions R/ggeo-package.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#' @keywords internal
"_PACKAGE"

## usethis namespace: start
## usethis namespace: end
NULL

# Globals
# utils::globalVariables(c("", "Part1"))

#' @importFrom magrittr %>%
#' @export
magrittr::`%>%`

#' @importFrom magrittr %<>%
#' @export
magrittr::`%<>%`

#' @importFrom rlang !!
#' @export
rlang::`!!`
8 changes: 7 additions & 1 deletion R/ggplot_themes.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#' ggeo theme
#' ggeo plot themes
#'
#' A function that returns the ggplot theme elements for the chosen
#' theme.
#'
#' @inheritParams ggplot2::theme_minimal
#' @param theme Name of the theme to use. One of "ghibli_mononoke", "islamic_samarquand",
Expand All @@ -9,8 +11,12 @@
#' @param plot One of `plot`, `plot_latex` or `plot_exa`
#' @param mode One of `light` or `dark`
#' @param base A ggplot2 theme
#' @inheritDotParams ggplot2::theme
#' @return An object of class [ggplot2::theme()].
#' @export
#' @examplesIf interactive()
#' ggeotheme("ghibli_mononoke")
#'
ggeotheme <- function(theme = c("ghibli_mononoke", "islamic_samarquand",
"pomological_green", "pomological_red",
"nord_blue", "swiss_red", "purple",
Expand Down
13 changes: 11 additions & 2 deletions R/gis.R
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
#' Return sf coord for given crs code
#' Return sf coord for given CRS code
#'
#' A function that uses [`geotools::gtl_crs_proj()`] to
#' get the CRS configuration and applies it to a ggplot2
#' map.
#'
#' @seealso [geotools::gtl_crs_proj()]
#'
#' @param proj A string for the projection code
#' @param ... Arguments passed to ggplot2::coord_sf
#' @inheritDotParams ggplot2::coord_sf
#'
#' @return A ggplot2 coord object
#' @export
#' @examplesIf interactive()
#' ggeo_coord("eqearth")
#'
ggeo_coord <- function(proj, ...) {
crs <- geotools::gtl_crs_proj(proj)

Expand Down
Loading

0 comments on commit e29a55b

Please sign in to comment.