<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 29, 2017 at 9:01 AM, Karsten Loesing <span dir="ltr"><<a href="mailto:karsten@torproject.org" target="_blank">karsten@torproject.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi John,<br>
<br>
On 29.05.17 13:35, John Williams wrote:<br>
> Hi Karsten<br>
><br>
> The modern R tool chain  has the tidyverse<br>
> <<a href="https://blog.rstudio.org/2016/09/15/tidyverse-1-0-0/" rel="noreferrer" target="_blank">https://blog.rstudio.org/<wbr>2016/09/15/tidyverse-1-0-0/</a>> as it core.  The<br>
> tidyverse library is a convenience library for installing and loading the<br>
> core set of R packages that comprise the tidyverse - ggplot2, dplyr, tidyr,<br>
> readr, purrr & tibble. A dozen other packages are installed but not<br>
> explicitly loaded by tidyverse.<br>
><br>
> A high rate of R package innovation currently exists within & beyond<br>
> the tidyverse (e.g., the shiny tool chain) and it would be difficult to<br>
> exclude CRAN <<a href="https://cran.r-project.org/" rel="noreferrer" target="_blank">https://cran.r-project.org/</a>>-<wbr>compliant packages from use.<br>
><br>
> I have high confidence in the people & motivations<br>
> <<a href="https://rviews.rstudio.com/2016/10/12/interview-with-j-j-allaire/" rel="noreferrer" target="_blank">https://rviews.rstudio.com/<wbr>2016/10/12/interview-with-j-j-<wbr>allaire/</a>> behind<br>
> the tidyverse & shiny tool chains.<br>
><br>
> Speaking of shiny, a shiny server<br>
> <<a href="https://www.rstudio.com/products/shiny/shiny-server" rel="noreferrer" target="_blank">https://www.rstudio.com/<wbr>products/shiny/shiny-server</a>> installed in the Tor<br>
> metrics subnet will enable rapid innovation in Tor metrics. Instead of<br>
> creating plot code to called by javascript, we'll create interactive shiny<br>
> apps linked by iframe,  and/or standalone, data-centric web apps, just<br>
> using R.<br>
<br>
Can you elaborate on that?  How would we use Shiny Server without<br>
JavaScript?  (I'm not asking, because I think it's impossible.  I'm<br>
asking because I haven't looked at all the details there and am curious.)<br></blockquote><div><br></div><div>Shiny server based on node.js httpd. A shiny app has a can be embeded in Tor metrics page with html:</div><div>   <span style="box-sizing:inherit;font-family:Consolas,"courier new";font-size:16px;color:brown"><span style="box-sizing:inherit;color:mediumblue"><</span>iframe<span style="box-sizing:inherit;color:red"> src<span style="box-sizing:inherit;color:mediumblue">="<em style="box-sizing:inherit">URL</em>"</span></span><span style="box-sizing:inherit;color:mediumblue">></span></span><span style="box-sizing:inherit;font-family:Consolas,"courier new";font-size:16px;color:brown"><span style="box-sizing:inherit;color:mediumblue"><</span>/iframe<span style="box-sizing:inherit;color:mediumblue">></span></span></div><div><br></div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> My library of Tor analytics is small but growing:<br>
><br>
> Exit Nodes <<a href="http://rpubs.com/johnbwilliams/nodes" rel="noreferrer" target="_blank">http://rpubs.com/<wbr>johnbwilliams/nodes</a>><br>
> Network Size <<a href="http://rpubs.com/johnbwilliams/refactor" rel="noreferrer" target="_blank">http://rpubs.com/<wbr>johnbwilliams/refactor</a>><br>
> Network Size Delta <<a href="http://rpubs.com/johnbwilliams/network_size_delta" rel="noreferrer" target="_blank">http://rpubs.com/<wbr>johnbwilliams/network_size_<wbr>delta</a>><br>
> hidserv-descs-per-hsdir<br>
> <<a href="http://rpubs.com/johnbwilliams/hidserv-descs-per-hsdir" rel="noreferrer" target="_blank">http://rpubs.com/<wbr>johnbwilliams/hidserv-descs-<wbr>per-hsdir</a>><br>
><br>
> This is all well and good but pales in comparison to what could be done in<br>
> Tor Metrics with an analytics (shiny) server.<br>
><br>
> I see that a local cloud service provider, with whom I have done business<br>
> from time to time, is hosting a Tor exit address.  I was thinking that the<br>
> Project could make a business case to this provider's management for<br>
> hosting a shiny server for Tor metrics.<br>
><br>
> Yes, it is possible but not desirable to revert to base R functions from<br>
> readr - a core package of the tidyverse.  I'll do that as requested.<br>
<br>
I can understand that going back to base functions is a bit painful.  My<br>
main goal here is to start making improvements as soon as possible.  I<br>
think it would take some time to get everyone involved in dependencies<br>
on Tor hosts to make a decision here, and I'd rather want to postpone<br>
that and start coding and reviewing.<br></blockquote><div><br></div><div>Understood.  R's packrat package solves the package dependency issue</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Two ideas:<br>
<br>
 - We include our own version of a read_csv that internally uses R base<br>
functions to do the job and that we can later replace by what's in readr.<br></blockquote><div> </div><div>read.csv() likely good enough</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
 - We try to get readr into Debian backports.  A Debian developer told<br>
me that it's not that difficult to do that, and he might help with the<br>
process.  (We could even go one step further and try to get tidyverse<br>
into Debian backports, but that might be a bigger project.)<br>
<br>
I think my preference would be the first option, because that's likely<br>
the quickest way to get the code updated.  What do you think?<br>
<br></blockquote><div><br></div><div>Willing to help get code updated ASAP, but lack of tidyverse & CRAN packages likely to be limiting.</div><div><br></div><div>Would help to have a list of available R packages in Debian backports</div><div> </div><div>First priority is the 26 plots already identified (1st being plot_networksize()) ?</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> Cheers,<br>
><br>
> John<br>
<br>
All the best,<br>
Karsten<br>
<br>
<br>
><br>
> On Mon, May 29, 2017 at 3:12 AM, Karsten Loesing <<a href="mailto:karsten@torproject.org">karsten@torproject.org</a>><br>
> wrote:<br>
><br>
>> Hi John,<br>
>><br>
>> On 26.05.17 05:02, John Williams wrote:<br>
>>> something like this?<br>
>>><br>
>>> refactor of network size plot <<a href="http://rpubs.com/johnbwilliams/refactor" rel="noreferrer" target="_blank">http://rpubs.com/<wbr>johnbwilliams/refactor</a>><br>
>><br>
>> Looks great!  A lot shorter and clearer than before.<br>
>><br>
>> By the way, did you change that code after posting here?  I remember<br>
>> seeing `library(tidyverse)` in the original version, which I couldn't<br>
>> find in Debian stable or backports.<br>
>><br>
>> The current code doesn't contain `library(tidyverse)` anymore, but it<br>
>> has `library(readr)` which I couldn't find in Debian stable or backports<br>
>> either.<br>
>><br>
>> The other libraries are all available in Debian stable or backports as<br>
>> far as I can see.<br>
>><br>
>> We're trying to depend only on Debian packages for anything running on<br>
>> the server.  This is not an absolute requirement, and we might not keep<br>
>> it up anyway if we ever switch to a Shiny server.  But for the moment it<br>
>> would be great if we could keep this requirement.  Or at least we<br>
>> shouldn't give up on it too easily.<br>
>><br>
>> Do you think you can change the code to avoid `library(readr)`?<br>
>><br>
>> Thanks!<br>
>><br>
>> All the best,<br>
>> Karsten<br>
>><br>
>><br>
>>> On Wed, May 24, 2017 at 7:57 PM, David Fifield <<a href="mailto:david@bamsoftware.com">david@bamsoftware.com</a>><br>
>>> wrote:<br>
>>><br>
>>>> On Wed, May 24, 2017 at 07:28:39PM -0400, John Williams wrote:<br>
>>>>> Thanks, Karsten, but the direct links to CSV files are not working -<br>
>> get<br>
>>>>> Oops! Something went wrong here! We encountered a 404 Not Found when<br>
>>>> processing<br>
>>>>> your request!<br>
>>>><br>
>>>> The URLs were missing a "/stats".<br>
>>>><br>
>>>> <a href="https://metrics.torproject.org/stats/servers.csv" rel="noreferrer" target="_blank">https://metrics.torproject.<wbr>org/stats/servers.csv</a><br>
>>>> <a href="https://metrics.torproject.org/stats/bandwidth.csv" rel="noreferrer" target="_blank">https://metrics.torproject.<wbr>org/stats/bandwidth.csv</a><br>
>>>> <a href="https://metrics.torproject.org/stats/torperf-1.1.csv" rel="noreferrer" target="_blank">https://metrics.torproject.<wbr>org/stats/torperf-1.1.csv</a><br>
>>>> <a href="https://metrics.torproject.org/stats/connbidirect2.csv" rel="noreferrer" target="_blank">https://metrics.torproject.<wbr>org/stats/connbidirect2.csv</a><br>
>>>> <a href="https://metrics.torproject.org/stats/advbwdist.csv" rel="noreferrer" target="_blank">https://metrics.torproject.<wbr>org/stats/advbwdist.csv</a><br>
>>>> <a href="https://metrics.torproject.org/stats/hidserv.csv" rel="noreferrer" target="_blank">https://metrics.torproject.<wbr>org/stats/hidserv.csv</a><br>
>>>> <a href="https://metrics.torproject.org/stats/webstats.csv" rel="noreferrer" target="_blank">https://metrics.torproject.<wbr>org/stats/webstats.csv</a><br>
>>>><br>
>>><br>
>><br>
>><br>
>><br>
><br>
<br>
<br>
</blockquote></div><br></div></div>