GithubHelp home page GithubHelp logo

clickme's People

Contributors

kbroman avatar nachocab avatar timelyportfolio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

clickme's Issues

Is a server really necessary?

Couldn't you just write the data into the javascript file?

This way, the browser doesn't need to access local files other than the html and js (which I think can do without running a server).

What is the best way to manage existing ractives?

Adding new ractives to inst/examples is not sustainable. Perhaps we need a separate repository ("clickme_ractives") to upload them.

We would also need a way to list, sort, rank, and describe them (wiki page?)

I'm open for suggestions

Difficulty running examples

After a new installation of clickme, I can't run either example listed on the readme. Do you have any suggestions on how I should proceed?

First example

clickme(points, rnorm(100))
Error: x has 1 elements, but y has 100

Second example

data(microarray)
clickme(points, x = microarray$significance, y = microarray$logFC,
        color_groups = ifelse(microarray$adj.P.Val < 1e-4, "Significant", "Noise"),
        names = microarray$gene_name,
        x_title = "Significance (-log10)", y_title = "Fold-change (log2)",
        extra = list(Probe = microarray$probe_name))

Error in file(con, "w") : cannot open the connection
In addition: Warning messages:
1: In `$.data.frame`(names_groups, group) :
  Name partially matched in data frame
2: In `$.data.frame`(names_groups, group) :
  Name partially matched in data frame
3: In file(con, "w") :
  cannot open file '/usr/local/lib/R/site-library/clickme/output/temp-Points.html': Permission denied

Reversing color_group switching

This might not be an issue, so much as a query. I'm new to github, so if that violates any rules please let me know.

With the new points template, I'm trying to make it so that instead of a category being de-selected, the opposite happens. That is the rest of them disappear.

This works fine if I change the line in toggle function to return d.color_group != category

However, when I select two categories, it reverts to old behaviour. Then with 3 it works fine qtqin. I think there is something obvious I'm missing. I'd rather take the time to figure it out, but I'm in deadline and I'd appreciate any help.

Great work on Clickme though.

export standalone ractives

I like the ractive idea for quickly generating interactive graphs.

But once you have a graph you like its nice to be able to save for later use as a static html file. For example if I am working on a project in a directory called Project it would be great if there was a function, saveRactive that would allow me to save the final html file ( or htmlfile plus supporting files). I am thinking something like:

##generate ractive
x <- clickme(cars, "par_coords")
##save ractive
saveRactive(x, name = "coolgraph", directory="Project" )

I could then send the coolgraph HTML file to a collaborator or embed it in a slideshow. This would require a function that would keep track of all of the path directories and save all of the supporting documents to the target directory. Although I don't think it would work well here, I have used Frozen-Flask for this purpose previous python applications.

active development/recent changes

hi, im interested in creating templates for gis/geo projects. i saw that you commented recently about completely refactoring the package, and that now the templates have been updated significantly. do you expect to make major changes over the next few days? weeks?

can't use clickme without attaching package

I would like to use clickme within another package, but it seems like it needs to be attached to work. For example, if I run:

clickme::clickme('points', to_plot[, 1], to_plot[, 2],
                           color_groups = factor(to_plot$point_colors),
                           names = to_plot$point_names)

I get:

     Error in callSuper() : could not find function "%or%" 

Error with the examples

First of all, congratulations and thank you for this great tool!

The issue:

df2 is OK but when I run clickme this is the result:

clickme(df2, "line_with_focus")
Renaming: name => line
Renaming: y => TRUE
Error in [.data.frame(data, data$line == line, c("x", "y")) :
undefined columns selected

I am running R under Ubuntu 12.10

Explain what running a server means

probably good to explain what running a local server means...

Make sure you have a server running at: /Users/tim/Library/R/2.15/library/clickme/examples

allow multiple data inputs

data can be a list that contains n dataframes - check if any of the elements is a dataframe or a matrix (this distinguishes it from a regular list)

Require user confirmation before installing new packages

When a new ractive is about to be used, show something like:
The xxx ractive requires the following packages:
- rjson
- df2json
Type "c" If you want to manually install them,
otherwise press "enter" and clickme will install them for you.

Implement new ractives

Ractives coming down the pipeline

  • volcano plot (all genes) + jitter plot (single gene) + line plot (all genes)
    • they are all linked (hover, click)
    • 3 colors grey80, black (significant), red (clicked)
    • add a new row of plots, so you can compare with another gene (choose side by side, or top-on-bottom, choose same scales or not, symmetric or not)
    • draggable limits to define cutoffs
    • allow adding manual annotations for specific (subsets of) probes
    • I don't know how hard it would be, but resizable plots would be awesome (a dashed line appears around the plot on hover and the cursor changes to a resize cursor, I think I saw an SVG example of resizing)
  • zoomable scatterplot (needs a fix in the axes)
  • AA <=> NT

Improve existing ractives

Add an excel-like view to the par_coords ractive
Enable clicking on scatterplot/zoomable_scatterplot so names can be copy/pasted

‘html’ is not a valid field or method name for reference class “Points”

Hello

This is a great package however I'm trying to run your asteroids example that you posted with RShiny and I got this error ‘html’ is not a valid field or method name for reference class “Points”. I'm running chrome.. When I run the clickme function from command line it works fine...

thanks
steve

Here's my session info:
Platform: x86_64-apple-darwin10.8.0 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] data.table_1.9.2 rjson_0.2.13 stringr_0.6.2 knitr_1.6 yaml_2.1.11 clickme_0.4.0 ggplot2_0.9.3.1
[8] rrdf_2.0.2 rrdflibs_1.3.0 rJava_0.9-6 shiny_0.10.0 rCharts_0.4.5

'df2json' as a dependency

In running the example, I got

Error in FUN("df2json"[[1L]], ...) : 
  Package df2json is not installed, try install.packages("df2json")

df2json should be added to Imports: in the DESCRIPTION file.

server function doesn't put space between host and port, doesn't need to pushd

The server function has some problems:

server()
sh: pushd: not found
/usr/bin/python: No module named SimpleHTTPServer8888
sh: popd: not found

the pushd/popd errors come because the shell is sh and not bash. In fact there's no need to pushd/popd since you can just 'cd' to the directory in the system command:

system("cd /foo/bar/baz ; python -m SimpleHTTPServer 8888")

won't change the R setwd() result because system() runs in a subshell.

The other error is because currently your server() function doesn't put a space between the host and the port.

You could implement this in R using R's built in web server, thus removing the python dependency.

But hey, this is well cool 👍

No clickme_vega function

I just installed clickme today and R says that there is no clickme_vega function. The preinstalled ractive demos work (force_directed, heatmap, lines, par_coords, points). I grabbed the line_with_focus ractive and it works fine. But, when I grabbed the vega ractive or tried to just use clickme_vega in R, I got the error.

Error in eval(expr, envir, enclos) :
could not find function "clickme_vega"

R version 3.0.1 (2013-05-16) -- "Good Sport"

I see there's a clickme_vega.R file in the clickme_reactives-master folder (I grabbed from https://github.com/nachocab/clickme_ractives). Maybe that needs to go somewhere?

Categorical Columns in Par_Coords

Hi Nachocab,

I just stumbled across your awesome clickme package - its great and unusually well-documented. I have a question about the par_coord clickme. Is there a way to get categorical columns to display? For example in the cars example - I would like to get the leftmost column to be the names of the cars, something like:

clickme(cars, "par_coords", params=list(color_by="name"))

is there a way to do this?

No clickme_vega function

I just installed clickme today and R says that there is no clickme_vega function. The preinstalled ractive demos work (force_directed, heatmap, lines, par_coords, points). I grabbed the line_with_focus ractive and it works fine. But, when I grabbed the vega ractive or tried to just use clickme_vega in R, I got the error.

Error in eval(expr, envir, enclos) :
could not find function "clickme_vega"

R version 3.0.1 (2013-05-16) -- "Good Sport"

I see there's a clickme_vega.R file in the clickme_reactives-master folder (I grabbed from https://github.com/nachocab/clickme_ractives). Maybe that needs to go somewhere?

color by group in line_with_focus

If you have groups of data that you want to color by group in the line_with_focus ractive, well, you might want to look at the line_with_focus2 I have here https://github.com/lcolladotor/ballgownR-devel/tree/master/clickme-test

Basically, I changed things a tiny bit to add a color parameter that specifies an array that is then used by nv.utils.defaultColor from the utils.js file

It was my first attempt at building upon a ractive and seeing if I could customize something to my liking. Thanks for the wiki info!

By the way, that was my first time looking at javascript code and D3. It was more intuitive than what I expected, but it still took me some time to do this small hack.

Maybe you could add these changes to your own line_with_focus and make the color call more robust. I would probably do that inside the translate() function in the translator.R file.

Stuff changed: utils.js line 56, template_config.yml line 28, template.Rmd line 13

df3 not defined in the readme

hi nacho,
example 3 in the readme attempts to modify df3, but this data.frame has not yet been created...

# visualize an interactive heatmap alongside a parallel coordinates plot
rownames(df3) <- paste0("GENE_", 1:25)
colnames(df3) <- paste0("sample_", 1:8)
clickme(df3, "longitudinal_heatmap") # you will need to have a local server running for this example to work

formatting axis labels

Hi there! Really impressed with clickme and having fun trying it out. Is there a way to format axis tick labels (similar to format parameter for tooltips) or any plans to add this functionality? For example, removing comma separator for years or thousands?

Error in get_opts(ractive, ...) : No ractive named 12345678910 found at: (root path)

Hi Nacho:

Newbie here, testing clickme for the first time. I wa looking for the simplest ever hello world tutorial to use your clickme package, and I can't make it work

I installed the package with no issues, set root path to some temporal dummy folder in my home directory (linux user here), and run clickme(points, 1:10), which produced this error message:


clickme(points, 1:10)
Error in get_opts(ractive, ...) :
No ractive named 12345678910 found at:/home/xavi/tmp/ In addition: Warning message:
In if (!file.exists(opts$path$ractive)) stop("No ractive named ", :

the condition has length > 1 and only the first element will be used

What am I doing wrong?

Thanks for your help and for developing such intersting clickme package (& open sourced)!

confusing to run installed vega examples

I think it is confusing for new users to know how to run the installed vega examples. Would it be best to go in the wiki or somehow in the documentation? For instance on the lifelines example, the process would go something like:

#if not already installed, uncomment the two lines below
#library(devtools)
#install_github("clickme", "nachocab")

require(clickme)
#set location where you put your multiline ractive
ractivepath = get_root_path()
#if we want to change then comment line above and uncomment next two
#ractivepath = "path to your ractive/"
#set_root_path(ractivepath)

#load the csv data from the example
data = read.csv(paste0(ractivepath,"/vega/data/lifelines_people.csv"),stringsAsFactors=FALSE)

eventdata = read.csv(paste0(ractivepath,"/vega/data/lifelines_events.csv"),stringsAsFactors=FALSE)

#run clickme to create
clickme_vega(spec="lifelines", data=data, params=list(width=400,height=100,event_data=eventdata))

Error while trying example: undefined class “Points”

I'm uing RStudio on Windows.
See logs below:

library(devtools)
install_github("clickme", "nachocab")
Installing github repo clickme/master from nachocab
Downloading clickme.zip from https://github.com/nachocab/clickme/archive/master.zip
Installing package from C:\Users\axcv\AppData\Local\Temp\RtmpS6qBes/clickme.zip
Installing clickme
"C:/PROGRA1/R/R-2151.2/bin/x64/R" --vanilla CMD INSTALL
"C:\Users\axcv\AppData\Local\Temp\RtmpS6qBes\devtools2aa032eb21bc\clickme-master"
--library="C:/Program Files/R/R-2.15.2/library" --install-tests

  • installing source package 'clickme' ...
    ** R
    ** data
    ** inst
    ** tests
    ** preparing package for lazy loading
    ** help
    *** installing help indices
    ** building package indices
    ** testing if installed package can be loaded
    *** arch - i386
    *** arch - x64

  • DONE (clickme)
    Reloading installed clickme

    library(clickme)
    clickme(points, rnorm(100))
    Error in .walkClassGraph(classDef, "subclasses", where) :
    the 'subClass' list for class “Chart”, includes an undefined class “Points”
    Error in setClass(Class, contains = superClasses, where = where, ...) :
    error in contained classes ("Chart") for class “Heatmap”; class definition removed from ‘.GlobalEnv’

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.