Commit e2db0421 authored by Charles's avatar Charles

initial commit

parents
Pipeline #107 canceled with stages
.Rproj.user
.Rhistory
.RData
.Ruserdata
.Rbuildignore
rvelov.Rproj
Package: rvelov
Title: Visualize Velo'v availability and predictions
Version: 0.0.0.9000
Authors@R: person('Charles', 'Bordet', email = 'charles@datachamp.fr', role = c('cre', 'aut'))
Description: Visualize the availability of all Velo'v stations
through a Shiny app, and predictions of future availability. Users of this
app can use it to plan their journeys accordingly.
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
Imports:
shiny,
golem
RoxygenNote: 6.1.1
YEAR: 2019
COPYRIGHT HOLDER: Charles Bordet
# MIT License
Copyright (c) 2019 Charles Bordet
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.
# Generated by roxygen2: do not edit by hand
export(run_app)
import(shiny)
importFrom(golem,with_golem_options)
importFrom(shiny,shinyApp)
#' @import shiny
app_server <- function(input, output,session) {
# List the first level callModules here
}
#' @import shiny
app_ui <- function() {
tagList(
# Leave this function for adding external resources
golem_add_external_resources(),
# List the first level UI elements here
fluidPage(
h1("rvelov")
)
)
}
#' @import shiny
golem_add_external_resources <- function(){
addResourcePath(
'www', system.file('app/www', package = 'rvelov')
)
tags$head(
golem::activate_js()
# golem::favicon()
# Add here all the external resources
# If you have a custom.css in the inst/app/www
# Or for example, you can add shinyalert::useShinyalert() here
#tags$link(rel="stylesheet", type="text/css", href="www/custom.css")
)
}
#' Run the Shiny Application
#'
#' @export
#' @importFrom shiny shinyApp
#' @importFrom golem with_golem_options
run_app <- function(...) {
with_golem_options(
app = shinyApp(ui = app_ui, server = app_server),
golem_opts = list(...)
)
}
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# rvelov
<!-- badges: start -->
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)
<!-- badges: end -->
The goal of rvelov is to to provide Velo'v users with a way to visualize the availability of their preferred Velo'v stations. They can see the availability history as well as predictions to help them plan their journeys in the next few days.
## Installation
You can install the released version of rvelov from [Gitlab](https://gitlab.charlesbordet.com) with:
``` r
remotes::install_gitlab("rvelov", host = "gitlab.charlesbordet.com")
```
## Launch the app
You can run the app locally with the following command:
```
rvelov::run_app()
```
<!-- README.md is generated from README.Rmd. Please edit that file -->
# rvelov
<!-- badges: start -->
[![Lifecycle:
experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)
<!-- badges: end -->
The goal of rvelov is to to provide Velo’v users with a way to visualize
the availability of their preferred Velo’v stations. They can see the
availability history as well as predictions to help them plan their
journeys in the next few days.
## Installation
You can install the released version of rvelov from
[Gitlab](https://gitlab.charlesbordet.com) with:
``` r
remotes::install_gitlab("rvelov", host = "gitlab.charlesbordet.com")
```
## Launch the app
You can run the app locally with the following command:
rvelov::run_app()
# Building a Prod-Ready, Robust Shiny Application.
#
# Each step is optional.
#
# 1 - On init
#
## 1.1 - Fill the descripion & set options
##
## Add information about the package that will contain your app
golem::fill_desc(
pkg_name = "rvelov", # The Name of the package containing the App
pkg_title = "Visualize Velo'v availability and predictions",
pkg_description = "Visualize the availability of all Velo'v stations
through a Shiny app, and predictions of future availability. Users of this
app can use it to plan their journeys accordingly.",
author_first_name = "Charles", # Your First Name
author_last_name = "Bordet", # Your Last Name
author_email = "charles@datachamp.fr", # Your Email
repo_url = NULL # The (optional) URL of the GitHub Repo
)
## Use this desc to set {golem} options
golem::set_golem_options()
## 1.2 - Set common Files
##
## If you want to use the MIT licence, README, code of conduct, lifecycle badge, and news
usethis::use_mit_license(name = "Charles Bordet") # You can set another licence here
usethis::use_readme_rmd(open = TRUE)
usethis::use_code_of_conduct()
usethis::use_lifecycle_badge("Experimental")
usethis::use_news_md( open = FALSE )
usethis::use_git()
## 1.3 - Add a data-raw folder
##
## If you have data in your package
usethis::use_data_raw( name = "my_dataset", open = FALSE ) # Change "my_dataset"
## 1.4 - Init Tests
##
## Create a template for tests
golem::use_recommended_tests()
## 1.5 : Use Recommended Package
golem::use_recommended_deps()
## 1.6 Add various tools
# If you want to change the favicon (default is golem's one)
golem::remove_favicon()
golem::use_favicon() # path = "path/to/ico". Can be an online file.
# Add helper functions
golem::use_utils_ui()
golem::use_utils_server()
# You're now set!
# go to dev/02_dev.R
rstudioapi::navigateToFile( "dev/02_dev.R" )
# Building a Prod-Ready, Robust Shiny Application.
#
# Each step is optional.
#
# 2. All along your project
## 2.1 Add modules
##
golem::add_module( name = "my_first_module" ) # Name of the module
golem::add_module( name = "my_other_module" ) # Name of the module
## 2.2 Add dependencies
usethis::use_package( "thinkr" ) # To call each time you need a new package
## 2.3 Add tests
usethis::use_test( "app" )
## 2.4 Add a browser button
golem::browser_button()
## 2.5 Add external files
golem::add_js_file( "script" )
golem::add_js_handler( "handlers" )
golem::add_css_file( "custom" )
# 3. Documentation
## 3.1 Vignette
usethis::use_vignette("rvelov")
devtools::build_vignettes()
## 3.2 Code coverage
## You'll need GitHub there
usethis::use_github()
usethis::use_travis()
usethis::use_appveyor()
# You're now set!
# go to dev/03_deploy.R
rstudioapi::navigateToFile("dev/03_deploy.R")
# Deploy a Prod-Ready, Robust Shiny Application.
#
# 4. Test my package
devtools::test()
rhub::check_for_cran()
# 5. Deployment elements
## 5.1 If you want to deploy on RStudio related platforms
golem::add_rstudioconnect_file()
golem::add_shinyappsio_file()
golem::add_shinyserver_file()
## 5.2 If you want to deploy via a generic Dockerfile
golem::add_dockerfile()
## 5.2 If you want to deploy to ShinyProxy
golem::add_dockerfile_shinyproxy()
## 5.2 If you want to deploy to Heroku
golem::add_dockerfile_heroku()
# Set options here
options(golem.app.prod = FALSE) # TRUE = production mode, FALSE = development mode
# Detach all loaded packages and clean your environment
golem::detach_all_attached()
# rm(list=ls(all.names = TRUE))
# Document and reload your package
golem::document_and_reload()
# Run the application
rvelov::run_app()
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/run_app.R
\name{run_app}
\alias{run_app}
\title{Run the Shiny Application}
\usage{
run_app(...)
}
\description{
Run the Shiny Application
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment