https://github.com/brentthorne/posterdown
https://github.com/rstudio/pagedown
https://github.com/GerkeLab/betterposter
stat_smooth_func <- function(mapping = NULL, data = NULL, | |
geom = "smooth", position = "identity", | |
..., | |
method = "auto", | |
formula = y ~ x, | |
se = TRUE, | |
n = 80, | |
span = 0.75, | |
fullrange = FALSE, | |
level = 0.95, |
# Download earth data first | |
# https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/physical/ne_110m_land.zip | |
library(sf) | |
library(lwgeom) | |
library(dplyr) | |
library(ggplot2) | |
library(mapview) | |
# Read the data |
#=============================================================================== | |
# 2021-01-07 -- twitter | |
# Visualize Publons country data | |
# https://publons.com/country | |
# Ilya Kashnitsky, [email protected] | |
#=============================================================================== | |
library(tidyverse) | |
library(magrittr) | |
library(sf) |
--- | |
title: "Flexdashboard theming demo" | |
runtime: shiny | |
output: | |
flexdashboard::flex_dashboard: | |
theme: | |
bg: "#101010" | |
fg: "#FDF7F7" | |
primary: "#ED79F9" | |
base_font: !expr bslib::font_google("Prompt") |
## ----setup,include=FALSE,message=FALSE,warning=FALSE----------------------------------------------------------------------------------------------------------------------------------------------------- | |
library("here") # 1.0.1 | |
library("sf") # 1.0-14 | |
library("rgl") # 1.2.1 | |
library("geoviz") # 0.2.2 | |
library("raster") # 3.6-26 | |
library("rayshader") # 0.35.7 | |
library("osmdata") # 0.2.5 | |
library("tidyverse") # 2.0.0 |
library(tidyverse) | |
library(systemfonts) | |
mpg_sum <- mpg %>% | |
## just use 2008 data | |
dplyr::filter(year == 2008) %>% | |
## turn into lumped factors with capitalized names | |
dplyr::mutate( | |
manufacturer = stringr::str_to_title(manufacturer), | |
manufacturer = forcats::fct_lump(manufacturer, n = 10) |
library(rayshader) | |
library(rayrender) | |
popdata = raster::raster("gpw_v4_population_density_rev11_2020_15_min.tif") | |
population_mat = rayshader:::flipud(raster_to_matrix(popdata)) | |
above1 = population_mat > 1 | |
above5 = population_mat > 5 | |
above10 = population_mat > 10 |
# data: https://sedac.ciesin.columbia.edu/data/collection/gpw-v4 | |
library(rayshader) | |
library(rayrender) | |
popdata = raster::raster("gpw_v4_population_density_rev11_2020_15_min.tif") | |
population_mat = rayshader:::flipud(raster_to_matrix(popdata)) | |
above1 = population_mat > 1 |
library(geojsonsf) | |
library(sf) | |
library(rayrender) | |
#Data source: https://github.com/telegeography/www.submarinecablemap.com | |
cables = geojson_sf("cable-geo.json") | |
cablescene = list() | |
counter = 1 | |
for(i in 1:length(cables$geometry)) { |