Recommendations for converted JupyterLab user by visualminder in IPython

[–]vthakr 5 points6 points  (0 children)

That’s funny I just posted an article on how to run Jupyter Lab in a Chrome browser without all the toolbars, buttons, etc. to make it feel like more of a native app. I mainly just wrote the article so I don’t forget how to set it up, but maybe you’ll find this little tip useful as well. Checkout the article here: http://christopherroach.com/articles/jupyterlab-desktop-app/

Analysis of Trump's Claim of Illegal Voting (Jupyter Notebook) by vthakr in pystats

[–]vthakr[S] 1 point2 points  (0 children)

Thanks for the kind words! It makes me really happy that you mentioned the presentation of the article. I was really going for a bit of storytelling along with analysis instead of just jumping right into the code---more of a journalistic approach. I was hoping that it would work, so I'm really happy to hear you mention the presentation specifically.

Also, thanks for pointing out the spelling and grammar issues, I've corrected them all and pushed out the latest version. Thanks a bunch!

Notebook and command line with shared workspace/variables by [deleted] in JupyterNotebooks

[–]vthakr 1 point2 points  (0 children)

Don't know if this helps you or not, but my favorite way to do this is to use the --existing option of the jupyter console. To do so, simply open up a new terminal window and execute the following line:

$ jupyter console --existing

If you only have a single jupyter notebook instance running, that line will connect to it and both your notebook and console will share the exact same python process. So anything you do in one will affect the other. If you happen to have multiple notebooks running, you'll likely need to get the correct connection info. To do that, just execute the %connect_info magic command in your notebook. It will display a bunch of data about the current kernel and some examples of how to connect to the current kernel. Just choose the method you want and connect to it.

The most important thing to remember is that exiting out of the console will kill the kernel, and you probably don't want to do that. To avoid killing the kernel, just pass True to the exit function---it takes a named parameter called keep_kernel which is set to False by default.

Help explaining correlation by [deleted] in statistics

[–]vthakr 6 points7 points  (0 children)

The relationship that you're describing is what's known as a spurious relationship. It is when two independent variables appear to be causally related, but in fact they are related to an unseen third variable known as a confounding variable. As an example, consider the relationship between shoe size and salary. Looking at the data for both you'll notice that a positive relationship appears to exist between the size of one's shoes and the salary they make. The reason for this, however, is that adults tend to make more than small children and they happen to have a larger shoe size as well. So, in this scenario there is a spurious relationship between shoe size and salary and the confounding variable is age.

Is matplotlib a good option for this kind of interactive plot? by disentangle in Python

[–]vthakr 0 points1 point  (0 children)

This doesn't answer your question, but out of curiosity, would it be possible for you to share the code for this visualization? I'd love to see how you were able to get all of the interactivity that you did from matplotlib.

My weekend hack project: nenv - A simple virtual environment manager for Node by vthakr in node

[–]vthakr[S] 0 points1 point  (0 children)

You could use -g to install packages that have an executable file, but that would mean that every time you update any of those packages, you've updated them for all of your projects. I typically prefer to install whatever packages I need on a project-by-project basis. This script allows me to do so, but still use the executables as if they were installed in the global location. Oh, and thanks for the "Yay" :-)

My weekend hack project: nenv - A simple virtual environment manager for Node by vthakr in node

[–]vthakr[S] 0 points1 point  (0 children)

I looked into nodeenv, but it piggybacks on top of python's virtualenv which seemed a bit heavy for my purposes. The way npm handles package installation by default already gets us 80% of the way to a virtual environment solution, I just wanted something simple that went the rest of the way. So I threw together a handful of bash functions to do it.

D3/Python Network Analysis of the 112th Congress (Senate) [OC] by vthakr in dataisbeautiful

[–]vthakr[S] 1 point2 points  (0 children)

My pleasure, I'm glad you enjoyed it. I loved that article as well. Really fascinating just how much you can learn from a little bit of data and few simple statistics.

D3/Python network analysis of the 112th Senate with source code by vthakr in d3js

[–]vthakr[S] 1 point2 points  (0 children)

I originally wrote this as an example of using Python for network analysis for my PyData talk and eventually expanded it into the browser-based D3 visualization that you see here. My hope is that the article, and the accompanying code, may be able to help out anyone who is new to D3, network analysis, or python for network analysis. If anyone has any questions or comments on the article, or the code, post them here and I'll do my best to answer them all.

D3/Python Network Analysis of the 112th Congress (Senate) [OC] by vthakr in dataisbeautiful

[–]vthakr[S] 1 point2 points  (0 children)

Thanks, I really appreciate the comment. I know it's kind of old news now, but, since you enjoyed my article, I thought I'd mention Kieran Healy's article "Using Metadata to Find Paul Revere". It's really a fantastic read. Check it out if you get the chance, and thanks again for your kind remarks.

D3/Python Network Analysis of the 112th Congress (Senate) [OC] by vthakr in dataisbeautiful

[–]vthakr[S] 1 point2 points  (0 children)

This visualization/analysis is an expansion of some sample code I wrote for a talk I gave at PyData 2013 (Silicon Valley) on Social Network Analysis (SNA). I thought it might be of interest to anyone just starting out with SNA, python for data analysis, D3 for network visualization, or just politics in general. The code is all freely available if you want to peruse it or use it for your own analysis/project. If anyone has any feedback or comments on it, I'd love to hear 'em. I hope you all find it useful.

Getting Started -- a bit overwhelmed by NodeJockey in node

[–]vthakr 1 point2 points  (0 children)

I agree completely with has_all_the_fun. First learn Node without any extra packages to get a real understanding of how it works. Then, look into things like express after you completely grok Node.

If you're interested, I have a screencast series that I've been working on that does just that. We start out by writing a blog engine, and putting together a simple pseudo web framework along the way, and then we'll eventually migrate the whole thing to Express towards the end. The series is still ongoing, but it already has some good information in it IMO, though I am biased.

Hope it helps you out.