-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add, style, and roxygenise functions
- Loading branch information
1 parent
14a3714
commit 2acec48
Showing
40 changed files
with
5,001 additions
and
564 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
source("renv/activate.R") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,102 @@ | ||
# Generated by roxygen2: do not edit by hand | ||
|
||
export(hello) | ||
export(plumber_api) | ||
export(shiny_app) | ||
importFrom(utils,packageName) | ||
export(covid_eviction_labels) | ||
export(custom_ojo_theme) | ||
export(hc_theme_ojo) | ||
export(highchart_label_formatter) | ||
export(ojo_add_geoid) | ||
export(ojo_add_geometries) | ||
export(ojo_add_month_and_year) | ||
export(ojo_add_population) | ||
export(ojo_aggregate) | ||
export(ojo_district_and_date_filters) | ||
export(ojo_highchart_map) | ||
export(ojo_optional_filter) | ||
export(ojo_plot_lines) | ||
export(pretty_variable_names) | ||
export(tably) | ||
importFrom(dplyr,any_of) | ||
importFrom(dplyr,arrange) | ||
importFrom(dplyr,bind_rows) | ||
importFrom(dplyr,count) | ||
importFrom(dplyr,cross_join) | ||
importFrom(dplyr,distinct) | ||
importFrom(dplyr,filter) | ||
importFrom(dplyr,if_else) | ||
importFrom(dplyr,join_by) | ||
importFrom(dplyr,left_join) | ||
importFrom(dplyr,matches) | ||
importFrom(dplyr,mutate) | ||
importFrom(dplyr,nth) | ||
importFrom(dplyr,pull) | ||
importFrom(dplyr,select) | ||
importFrom(dplyr,slice) | ||
importFrom(dplyr,starts_with) | ||
importFrom(dplyr,summarise) | ||
importFrom(dplyr,tibble) | ||
importFrom(geojsonsf,sf_geojson) | ||
importFrom(ggplot2,aes) | ||
importFrom(ggplot2,annotate) | ||
importFrom(ggplot2,as_labeller) | ||
importFrom(ggplot2,element_blank) | ||
importFrom(ggplot2,element_rect) | ||
importFrom(ggplot2,element_text) | ||
importFrom(ggplot2,facet_wrap) | ||
importFrom(ggplot2,geom_label) | ||
importFrom(ggplot2,geom_line) | ||
importFrom(ggplot2,geom_point) | ||
importFrom(ggplot2,geom_rect) | ||
importFrom(ggplot2,geom_vline) | ||
importFrom(ggplot2,ggplot) | ||
importFrom(ggplot2,guide_legend) | ||
importFrom(ggplot2,guides) | ||
importFrom(ggplot2,scale_color_manual) | ||
importFrom(ggplot2,scale_fill_manual) | ||
importFrom(ggplot2,scale_y_continuous) | ||
importFrom(ggplot2,theme) | ||
importFrom(ggplot2,theme_bw) | ||
importFrom(ggplot2,vars) | ||
importFrom(grDevices,nclass.FD) | ||
importFrom(graphics,hist) | ||
importFrom(highcharter,color_classes) | ||
importFrom(highcharter,color_stops) | ||
importFrom(highcharter,hc_add_series_map) | ||
importFrom(highcharter,hc_add_theme) | ||
importFrom(highcharter,hc_caption) | ||
importFrom(highcharter,hc_colorAxis) | ||
importFrom(highcharter,hc_legend) | ||
importFrom(highcharter,hc_mapNavigation) | ||
importFrom(highcharter,hc_theme) | ||
importFrom(highcharter,hc_theme_merge) | ||
importFrom(highcharter,hc_theme_smpl) | ||
importFrom(highcharter,highchart) | ||
importFrom(htmlwidgets,JS) | ||
importFrom(jsonlite,fromJSON) | ||
importFrom(lubridate,floor_date) | ||
importFrom(lubridate,year) | ||
importFrom(lubridate,ymd) | ||
importFrom(ojodb,ojo_pal) | ||
importFrom(purrr,map_chr) | ||
importFrom(rlang,as_label) | ||
importFrom(rlang,check_installed) | ||
importFrom(rlang,enquo) | ||
importFrom(rlang,enquos) | ||
importFrom(rlang,quo_get_expr) | ||
importFrom(rlang,quo_text) | ||
importFrom(rlang,quos) | ||
importFrom(rlang,sym) | ||
importFrom(scales,label_comma) | ||
importFrom(snakecase,to_title_case) | ||
importFrom(stats,filter) | ||
importFrom(stats,na.omit) | ||
importFrom(stringr,str_detect) | ||
importFrom(stringr,str_flatten) | ||
importFrom(stringr,str_remove) | ||
importFrom(stringr,str_replace_all) | ||
importFrom(stringr,str_to_upper) | ||
importFrom(tidycensus,get_estimates) | ||
importFrom(tidyr,pivot_longer) | ||
importFrom(tidyr,pivot_wider) | ||
importFrom(tigris,counties) | ||
importFrom(tigris,states) | ||
importFrom(viridis,magma) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,37 @@ | ||
#' @title FUNCTION_TITLE | ||
#' @description FUNCTION_DESCRIPTION | ||
|
||
#' @return OUTPUT_DESCRIPTION | ||
#' @details DETAILS | ||
#' @examples | ||
#' \dontrun{ | ||
#' if(interactive()){ | ||
#' #EXAMPLE1 | ||
#' } | ||
#' } | ||
#' @seealso | ||
#' \code{\link[ggplot2]{ggtheme}}, \code{\link[ggplot2]{theme}}, \code{\link[ggplot2]{margin}} | ||
#' @rdname custom_ojo_theme | ||
#' @export | ||
#' @author Anthony Flores | ||
#' @importFrom ggplot2 theme_bw theme element_blank element_rect element_text | ||
custom_ojo_theme <- function() { | ||
ggplot2::theme_bw( | ||
base_size = 16, | ||
base_family = "roboto_condensed" | ||
) %+replace% | ||
ggplot2::theme( | ||
panel.background = ggplot2::element_blank(), | ||
plot.background = ggplot2::element_blank(), | ||
legend.background = ggplot2::element_rect(fill = "transparent", colour = NA), | ||
legend.key = ggplot2::element_rect(fill = "transparent", colour = NA), | ||
legend.position = "top" | ||
) + | ||
theme( | ||
legend.title = element_blank(), | ||
legend.text = element_text(size = 14), | ||
axis.title = element_blank(), | ||
strip.background = element_blank(), | ||
strip.text = element_text(face = "bold") | ||
) | ||
ggplot2::theme( | ||
panel.background = ggplot2::element_blank(), | ||
plot.background = ggplot2::element_blank(), | ||
legend.background = ggplot2::element_rect(fill = "transparent", colour = NA), | ||
legend.key = ggplot2::element_rect(fill = "transparent", colour = NA), | ||
legend.position = "top" | ||
) + | ||
ggplot2::theme( | ||
legend.title = ggplot2::element_blank(), | ||
legend.text = ggplot2::element_text(size = 14), | ||
axis.title = ggplot2::element_blank(), | ||
strip.background = ggplot2::element_blank(), | ||
strip.text = ggplot2::element_text(face = "bold") | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,43 @@ | ||
library(highcharter) | ||
library(ojodb) | ||
hc_theme_ojo <- hc_theme_merge( | ||
hc_theme_smpl(), | ||
hc_theme( | ||
colors = ojo_pal, | ||
plotOptions = list( | ||
line = list( | ||
lineWidth = 3, | ||
marker = list( | ||
enabled = TRUE, | ||
lineColor = "#000000", | ||
lineWidth = 1.5 | ||
#' @title FUNCTION_TITLE | ||
#' @description FUNCTION_DESCRIPTION | ||
|
||
#' @return OUTPUT_DESCRIPTION | ||
#' @details DETAILS | ||
#' @examples | ||
#' \dontrun{ | ||
#' if(interactive()){ | ||
#' #EXAMPLE1 | ||
#' } | ||
#' } | ||
#' @seealso | ||
#' \code{\link[highcharter]{hc_theme_merge}}, \code{\link[highcharter]{hc_theme_smpl}}, \code{\link[highcharter]{hc_theme}} | ||
#' \code{\link[ojodb]{ojo_pal}} | ||
#' @rdname hc_theme_ojo | ||
#' @export | ||
#' @author Anthony Flores | ||
#' @importFrom highcharter hc_theme_merge hc_theme_smpl hc_theme | ||
#' @importFrom ojodb ojo_pal | ||
hc_theme_ojo <- function() { | ||
theme <- highcharter::hc_theme_merge( | ||
highcharter::hc_theme_smpl(), | ||
highcharter::hc_theme( | ||
colors = ojodb::ojo_pal, | ||
plotOptions = list( | ||
line = list( | ||
lineWidth = 3, | ||
marker = list( | ||
enabled = TRUE, | ||
lineColor = "#000000", | ||
lineWidth = 1.5 | ||
) | ||
) | ||
), | ||
legend = list( | ||
align = "center", | ||
verticalAlign = "top" | ||
) | ||
), | ||
legend = list( | ||
align = "center", | ||
verticalAlign = "top" | ||
) | ||
) | ||
) | ||
|
||
return(theme) | ||
} |
Oops, something went wrong.