This file contains hidden or 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
library(sf) | |
library(dplyr) | |
library(ggplot2) | |
library(gganimate) # needs development version from github | |
# helper function to place a geometric object at a desired position | |
# and scale | |
place_geometry <- function(geometry, position, scale = 1) { | |
(geometry - st_centroid(geometry)) * scale + | |
st_sfc(st_point(position)) |
This file contains hidden or 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
#current preferred version of wc2 | |
devtools::install_github("Lchiffon/wordcloud2#32") | |
#function to give wordcloud2 click interactivity | |
wc2ClickedWord = function(cloudOutputId, inputId) { | |
#ARGUMENTS | |
# - cloudOutputId: string; outputId of wordcloud2 obj being rendered (should be identical to the value passed to wordcloud2Output) | |
# - inputId: string; inputId of word clicked on (ie you will reference in server the word by input$inputId) | |
#OUPUT | |
# - referencing input in server will return a string of form word:freq (same as hover info shown in wordcloud; ie 'super:32') |
This file contains hidden or 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
# sudo dnf install udunits2 udunits2-devel | |
install.packages("udunits2", configure.args = c(udunits2 = '--with-udunits2-include=/usr/include/udunits2')) |