dreamrs / esquisse Goto Github PK
View Code? Open in Web Editor NEWRStudio add-in to make plots interactively with ggplot2
Home Page: https://dreamrs.github.io/esquisse
License: Other
RStudio add-in to make plots interactively with ggplot2
Home Page: https://dreamrs.github.io/esquisse
License: Other
Hi,
First of all thank for this esquisse tool, i found it really interesting.
Have you think about adding plotly option so plots can be dynamic?
regards #
Hi! great package! Thank you
I just observed that when deselecting all categories of a categorical variable in the "Data" filters, the app/window crashes (even in "pause" mode). It seems obvious that at least one category should be included, but may be some message to prevent this happening or somehow disabling the selector if only one remaining, would be a good solution.
Cheers
Alejandro
Worked awesome with the meuse dataset's landuse variable set to "Color", but borked on setting the same to "Size".
data('meuse', package = "sp")
df <- sf::st_as_sf(meuse, coords = c('x', 'y'), crs = 28992)
esquisser(df)
esquisser version: 9340e35
First of all great package ! I would however like to suggest the followings:
group
variable in the main mapping panel.position
argument (e.g. stack, dodge, fill) under the "plot options" tab when a group variable has been defined.When trying to execute the Addin:
Error in if (is.null(data) && defaultData %in% ls(pos = globalenv())) { :
missing value where TRUE/FALSE needed
The export to PowerPoint Addin seems to execute just fine.
How do i get the esquisse package for R3.3.3
When i am trying to install the package for esquisse then i m getting below error
install.packages("esquisse")
Installing package into ‘C:/Users/Amit/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘esquisse’ is not available (for R version 3.3.3)
I was wondering if anyone has the same problem... my builder does almost everything find except for showing the preview of the graphs. Any idea how to go get the graphs to show up?
Win10, R3.5.1
Thanks.
NA values can be removed from the image on the plugin window
however when I copy the code to the console, the code does not contain information to remove NA. Copied code still produces plot with NAs.
The dragulaInput control type in the ggplot2 builder interface works very smoothly and would be useful in many other Shiny apps.
Extracting this functionality into a separate dragulaR (for instance) package would be beneficial to the community.
package ‘esquisse’ is not available (for R version 3.4.3)
Great package! Has been really useful for data exploration.
I was wondering if you guys had considered adding tooltips to graphs? I know that ggplot doesn't have this, but there are a few ways it could be incorporated into the shiny app (https://stackoverflow.com/questions/38917101/how-do-i-show-the-y-value-on-tooltip-while-hover-in-ggplot2).
Does this sound like functionality you guys would want to add? If so, I am happy to go away and put together a PR.
What a nice project! I love it!
It would be great if the user could also choose a table (or a view) on a DBI
connection.
Hi Victor,
Sorry to come back with a new shinydashboard
related issue.
On the example I get the css property below when using esquisse modules :
html, body {
overflow: hidden;
}
I'm not even sure that's coming from esquisse
but it behaves well without... 😕
library(shiny)
library(shinydashboard)
library(esquisse)
ui <- dashboardPage(
dashboardHeader(title = "Equisse in shinydashboard", titleWidth = "300"),
dashboardSidebar(
sidebarMenu(id = "tabs",
menuItem("Dataset", tabName = "dataset", icon = icon("database")),
menuItem("Esquisse", tabName = "esquisse", icon = icon("line-chart"))
)
),
dashboardBody(
# My dirty workaround :)
#HTML("<script>
# document.getElementsByTagName('html')[0].style.overflow = 'auto';
# </script>"),
tabItems(
tabItem(tabName = "dataset",
fluidRow(
box(radioButtons("RB_dataset", label = "Choose dataset", choices = c("iris", "mtcars"), selected = "iris"))
)
,fluidRow(
box(uiOutput("very_long_text"))
)
),
tabItem(tabName = "esquisse",
fluidRow(
box(title = "Create my plot", status = "success", solidHeader = FALSE, collapsible = FALSE, collapsed = FALSE, width=12,
style = "height: 400px;"
,esquisserUI(
id = "graph",
header = FALSE,
choose_data = FALSE
)
)
,box(uiOutput("very_long_text2"))
)
)
)
)
)
server <- function(input, output) {
graph_param <- reactiveValues(data = NULL, name = NULL)
observe({
if (input$RB_dataset == "iris") {
graph_param$data <- iris
graph_param$name <- "iris"
} else {
graph_param$data <- mtcars
graph_param$name <- "mtcars"
}
})
observeEvent(input$tabs, {
if (input$tabs == "esquisse") {
callModule(module = esquisserServer, id = "graph", data = graph_param)
}
})
output$very_long_text <- renderUI({
HTML(paste(rep(paste(letters, collapse = ""), 100), collapse = "<br/>"))
})
output$very_long_text2 <- renderUI({
HTML(paste(rep(paste(letters, collapse = ""), 100), collapse = "<br/>"))
})
}
shinyApp(ui, server)
can not change the title and label size, and picture height and width.
The add-in won't launch for me either when trying to open from the menu of Rstudio:
esquisse:::esquisser()
Error in match.arg(arg = status, choices = c("default", "primary", "success", :
'arg' should be one of "default", "primary", "success", "info", "warning", "danger"
I have the same issue when trying to launch directly from the code:
esquisse::esquisser()
Error in match.arg(arg = status, choices = c("default", "primary", "success", :
'arg' should be one of "default", "primary", "success", "info", "warning", "danger"
I have tried typing the suggested arguments i.e. (arg = default, or "default") as well as specifiying a data frame i.e ( esquisse::esquisser(data = my.dataframe) and the program still fails to launch giving one of the following errors:
Error in esquisse::esquisser(defult) : object 'defult' not found
Error in esquisse::esquisser(arg = "default") : unused argument (arg = "default")
Error in match.arg(arg = status, choices = c("default", "primary", "success", : 'arg' should be one of "default", "primary", "success", "info", "warning", "danger"
Any ideas?
Hi
How can I get the code of the ggplot plot using shiny modules?
Thanks!
Hi
I am testing your tool via PowerBI actually and when I use the designer to add smoothed lines in a scatter chart - it works fine in the designer but the code doesn't get updated with the
Before
ggplot(data = dataset) +
aes(x = Sales_Amount, y = Sales_Profit, color = BusinessType) +
geom_point() +
theme_minimal()
and after
ggplot(data = dataset) +
aes(x = Sales_Amount, y = Sales_Profit, color = BusinessType) +
geom_point() +
theme_minimal()
Hope you can solve this
Best regards
Erik
It would be great to be able to convert a numeric variable to a factor one for example
@pvictor Excellent work! Is it possible to provide more clarity/detail around your LICENSE? Do you intend for this not to be open source? Thank you!
Hi,
First of all, this looks pretty awesome tool to quickly build and analyze data sets. Is there any vision down the road to add any spatial map support to this builder. ? Probably an enhancement request.
Thanks !
Mohammed Ayub
Right now a random port is assigned by r shiny. It would be useful to be able to make this port a constant value.
devtools::install_github("dreamRs/esquisse")
Downloading GitHub repo dreamRs/esquisse@master
from URL https://api.github.com/repos/dreamRs/esquisse/zipball/master
Installing esquisse
Downloading GitHub repo dreamRs/shinyWidgets@master
from URL https://api.github.com/repos/dreamRs/shinyWidgets/zipball/master
Installing shinyWidgets
"D:/PROGRA2/R/R-331.1/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL
"C:/Users/wushengdan/AppData/Local/Temp/RtmpW0eLbk/devtools1d00eb8790a/dreamRs-shinyWidgets-07b07d8"
--library="D:/Program Files/R/R-3.3.1/library" --install-tests
ERROR: dependency 'shiny' is not available for package 'shinyWidgets'
Error in getExportedValue(pkg, name) :
cannot open file '~/R/win-library/3.5/viridisLite/data/Rdata.rdb': No such file or directory
In addition: Warning message:
In getExportedValue(pkg, name) : restarting interrupted promise evaluation
I run install.packages("gdtools", type = "source")
I get the following error message (both in RStudio and in Terminal:
install.packages("gdtools", type = "source")
trying URL 'https://cran.ma.imperial.ac.uk/src/contrib/gdtools_0.1.7.tar.gz'
Content type 'application/x-gzip' length 35268 bytes (34 KB)
==================================================
downloaded 34 KB
The downloaded source packages are in
‘/private/var/folders/y8/6klg_4dx4gjgvhv5q6tf9qj00000gn/T/RtmpJ2Yvb6/downloaded_packages’
I've tried updating, upgrading and reinstalling cairo through Homebrew multiple times to no effect.
I'm running MacOS v10.13.4, RStudio v1.1.453, R v3.5.0
When running esquisse:: esquisser(data) in R Studio, the esquisse window opens and crashes with the error message:
Loading required package: shiny
Listening on http://127.0.0.1:4000
Warning: Error in badgeType: length(col_name) == length(col_type) is not TRUE
80:
I have shiny 1.2.0 installed and loaded.
Great package!
When I use a custom filter (e.g. remove a factor from the "Data" window), the change is reflected in the dynamic graph but it is not reflected in the code on export. It would be great if the exported code reproduced exactly the same graph as in the window.
John
When I try to install it in Rstudio 1.1.453 on Windows 10, I get the following error:
**Skipping 2 packages not available: officer, shinyWidgets**
Skipping 2 packages ahead of CRAN: R.oo, stringr
Installing 6 packages: gdtools, ggthemes, miniUI, rvg, stringi, xml2
package ‘gdtools’ successfully unpacked and MD5 sums checked
package ‘ggthemes’ successfully unpacked and MD5 sums checked
package ‘miniUI’ successfully unpacked and MD5 sums checked
package ‘rvg’ successfully unpacked and MD5 sums checked
package ‘stringi’ successfully unpacked and MD5 sums checked
package ‘xml2’ successfully unpacked and MD5 sums checked
Installing package into ‘C:/Users/olivi/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)
**ERROR: dependency 'officer' is not available for package 'esquisse'**
Repositories set up in RStudio appear to be CRAN and CRANextra.
I really like the power point functionality but there seems to be a bug, once I clicked on the Power point button if any modifications are made to the graph after that it causes the app to refresh and re-export the graph to power point again and again. The same behavior happens if I try to click the PNG button after the Power Point it keeps exporting to pptx.
It would be nice to ensure that the graph is only exported when the power point button is clicked.
Neat concept!
When I open the add-in (either from the add in menu, or from devtools), it appears as a blank screen & I get this error in the console:
Listening on http://127.0.0.1:6030
Error in .Call("_later_execCallbacks", PACKAGE = "later", timeoutSecs, :
Incorrect number of arguments (2), expecting 1 for '_later_execCallbacks'
I JUST updated R (3.5.2) and Rstudio (Version 1.1.463) & I'm working on a windows machine.
Any thoughts?
Thank you for an incredible package.
Any chance we can get
+scale_y_log10()
+scale_x_log10()
as options? Thank you
I often have data like that for a two-way ANOVA. It is usually best to show these data points (or violin plots for each category combination) + means and SE etc... There are numerous ways to achieve this in ggplot2.. could you add this functionality?
First of all, your project is awesome. Definitely.
Only thing I find difficult in view of possible contribution is to follow the code: it is a little bit difficult for me to get into the logic.
I would like to contribute wrapping ggplot inside ggplotly to add dynamic features on the plots but it is a bit hard to get into the code.
Is there any docs or file structure schema somewhere?
GREAT tools !! However, I installed fail, is there any specific R support version?
install.packages("esquisse")
Installing package into ‘C:/Users/bdad2/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘esquisse’ is not available (for R version 3.4.1)
First of all many thanks for creating such an awesome tool. I would love to use it for my data related tasks
I was trying my hands on with the esquisse package but it's crashing every time I try to execute it. below is the console output details:
#####################################################
library(esquisse)
data = read.csv("iris.csv")
esquisse::esquisser(data)
Loading required package: shiny
Listening on http://127.0.0.1:6376
Warning: Error in observeEvent: unused argument (ignoreInit = TRUE)
Stack trace (innermost first):
51: observeEvent
50: module
49: withReactiveDomain
48: callModule
47:
46: do.call
45: server
3: shiny::runApp
2: runGadget
1: esquisse::esquisser
Error in observeEvent(input$changeData, { :
unused argument (ignoreInit = TRUE)
#####################################################
The window opens and crashes with this error message, Please suggest how to resolve this issue?
My R Studio version is 1.0.153
The ability to have either individual or harmonised Y axis ranges on facet_wrapped scatterplots would be extremely useful. Often the fact that the ranging forces to a value that accommodates all facets renders some of the individual facet plots less usable.
A way to change the point shape - possibly using 'schemes' in a similar fashion to the colour scheme templates, either explicitly stating the 0-25 geom_point value in one column of the data frame or by using factors, would be really useful
Seems like Esquisse is a shiny app with lots of extra stuff added. I wonder, Is it possible to run it on its own on a Shiny Server? I've tried but it checks for RStudio and fails.
choosed
should be chosen
:
esquisse/R/module-chooseData.R
Line 150 in 1ae3d4b
esquisse/R/module-chooseData.R
Line 299 in 1ae3d4b
choosed
should be chose
:
Line 87 in ef45c86
This package is awesome and I love the simplicity with which we can quickly get to something viewable. Still.. are you planning to add facets as abox? I rarely work without them.
Thanks!
The ability for the export code for the plot to include any filtering that had been applied in the UI would be very useful.
Hi,
I'm testing your addin which is promising.
I have renamed my dataframe columns and when I choose my fileds and click the Choose button, your addin is crashing and I get the following error :
Listening on http://127.0.0.1:3726
Warning: Error in <Anonymous>: No handler registered for type controls-filter-data-verklgkeqo_Hors de la région de résidence actuelle : en métropole
[No stack trace available]
Error in (function (name, val, shinysession) :
No handler registered for type controls-filter-data-verklgkeqo_Hors de la région de résidence actuelle : en métropole
Hope it helps to solve the bug,
Thanks,
Is it possible to use esquisse to create a barplot similar to the output of this code that uses the stat = "identity" argument?
library(dplyr)
library(ggplot2)
df <- data.frame(age_group = c("0-18", "19-65", "65+"), n = c(100000, 101000, 103000))
ggplot(df, aes(x = age_group, y = n)) +
geom_bar(stat = "identity")
Thanks for this great package !
On the minimal example herebelow I've got the labels X, Y, Fill, etc... invisible.
Toying with css property z-index
on the class label-background
can make them appear but I didn't find a correct solutions (because they get above variables label).
library(shiny)
library(shinydashboard)
library(esquisse)
ui <- dashboardPage(
dashboardHeader(title = "Equisse in shinydashboard", titleWidth = "300"),
dashboardSidebar(
sidebarMenu(id = "tabs",
menuItem("Dataset", tabName = "dataset", icon = icon("database")),
menuItem("Esquisse", tabName = "esquisse", icon = icon("line-chart"))
)
),
dashboardBody(
tabItems(
tabItem(tabName = "dataset",
fluidRow(
box(radioButtons("RB_dataset", label = "Choose dataset", choices = c("iris", "mtcars"), selected = "iris"))
)
),
tabItem(tabName = "esquisse",
fluidRow(
box(title = "Create my plot", status = "success", solidHeader = FALSE, collapsible = FALSE, collapsed = FALSE, width=12,
style = "height: 400px;",
esquisserUI(
id = "graph",
header = FALSE,
choose_data = FALSE
)
)
)
)
)
)
)
server <- function(input, output) {
iris$VERYVERYVERYLONGNAME <- 1
mtcars$VERYVERYVERYLONGNAME <- 1
graph_param <- reactiveValues(data = NULL, name = NULL)
observe({
if (input$RB_dataset == "iris") {
graph_param$data <- iris
graph_param$name <- "iris"
} else {
graph_param$data <- mtcars
graph_param$name <- "mtcars"
}
})
observeEvent(input$tabs, {
if (input$tabs == "esquisse") {
callModule(module = esquisserServer, id = "graph", data = graph_param)
}
})
}
shinyApp(ui, server)
I've tested both the CRAN and GitHub versions, and the problem exists in both. Running R from a terminal, esquisse::esquisser()
works fine (using the default web browser). From an RStudio session, esquisse::esquisser(some_data_frame)
works as expected, but esquisse::esquisser()
throws an error:
Error in if (is.null(data) && defaultData %in% ls(pos = globalenv())) { :
missing value where TRUE/FALSE needed
RStudio version: 1.1.456
Session information:
R version 3.4.4 (2018-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Linux Mint 18.3
Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.6.0
LAPACK: /usr/lib/lapack/liblapack.so.3.6.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] Rcpp_0.12.19 pillar_1.3.0 compiler_3.4.4 RColorBrewer_1.1-2
[5] later_0.7.5 plyr_1.8.4 bindr_0.1.1 shinyWidgets_0.4.3
[9] tools_3.4.4 digest_0.6.17 jsonlite_1.5 tibble_1.4.2
[13] gtable_0.2.0 pkgconfig_2.0.2 rlang_0.2.2 shiny_1.1.0
[17] rstudioapi_0.8 yaml_2.2.0 bindrcpp_0.2.2 dplyr_0.7.6
[21] stringr_1.3.1 grid_3.4.4 tidyselect_0.2.4 glue_1.3.0
[25] R6_2.3.0 ggplot2_3.0.0 purrr_0.2.5 magrittr_1.5
[29] scales_1.0.0 promises_1.0.1 ggthemes_4.0.1 htmltools_0.3.6
[33] assertthat_0.2.0 xtable_1.8-3 esquisse_0.1.5.900 mime_0.6
[37] colorspace_1.3-2 httpuv_1.4.5 stringi_1.2.4 miniUI_0.1.1.1
[41] lazyeval_0.2.1 munsell_0.5.0 crayon_1.3.4
This is a fantastic package -- really accelerates the initial exploration process!
Would you consider an enhancement for enabling forcats::fct_reorder
? Similar to the "Flip coordinates" toggle.
Issue on initial install using:
Error is:
ERROR: dependency ‘officer’ is not available for package ‘esquisse’
I then installed the officer package
install.packages("officer")
library(officer)
However the package still could not be installed
** preparing package for lazy loading
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/Library/Frameworks/R.framework/Versions/3.4/Resources/library/gdtools/libs/gdtools.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.4/Resources/library/gdtools/libs/gdtools.so, 6): Library not loaded: /opt/X11/lib/libcairo.2.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/3.4/Resources/library/gdtools/libs/gdtools.so
Reason: image not found
ERROR: lazy loading failed for package ‘esquisse’
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.