From: Jeremy Foote Date: Thu, 26 Apr 2018 15:57:56 +0000 (-0500) Subject: Merge branch 'master' of git://code.communitydata.cc/social-media-chapter X-Git-Url: https://code.communitydata.science/social-media-chapter.git/commitdiff_plain/b13ac079561a833b36050c96c76fb573db987dda?hp=04f78b382c70531dfadeb12fdbc2811a78addfa8 Merge branch 'master' of git://code.communitydata.cc/social-media-chapter --- diff --git a/MacInstallNotes b/MacInstallNotes new file mode 100644 index 0000000..df6f63f --- /dev/null +++ b/MacInstallNotes @@ -0,0 +1,66 @@ + +Purpose +======= +This document is what I'd call a "ridealong" -- it's intended a quick +repository of observations and hints that I kept as annotation to the project +README and install guides I found online. It's not a substitute for your own +research and good judgment. That said, I found the whole process relatively +straightforward, so the other purpose here is to encourage Mac users to just +give it a try. + +Software Setup +=================== + +- Python and R +I initially thought I would use my IDEs (R Studio and Spyder via Anaconda) for +a lot of this project, but it turned out that command line was the easier way +to go when running the python scripts. + +- iGraph. I installed this as part of all the python lib installs rather than +dealing with it standalone. It's "python-igraph" in that case. + +- Python libraries install. These were almost all present in Spyder/Anaconda, +except for python-igraph and sklearn. Just calling install didn't work, so I +ended up installing them via pip -- conda didn't work. Here's an interesting +link about conda vs pip: +https://jakevdp.github.io/blog/2017/12/05/installing-python-packages-from-jupyter/ + Later on, I ended up installing homebrew package manager to get the final +make to work -- I could've probably saved a bit of time by installing it +earlier. + +- R libraries install. This worked fine from inside R studio, but later in +the process I ended up using Terminal to run the scripts from the chapter +build process itself. + +Data Cleaning +=============== +I copy-pasted all these commands into Terminal, and they just worked. Yay. + +Running Analyses +================ +To get infomap, I had to clone with: +git clone http://github.com/mapequation/infomap + +My old Macbook Air handled the computational load just fine, so don't be scared +about the memory warnings in the general README. + +The Gephi analysis did run forever (I didn't stay up long enough to watch it +do its thing, if you want to know what kind of forever I mean), but it stopped +actually updating or changing after a while. Just hit stop when the rainbow +jelly ball starts trembling instead of really moving around. I never did get +it to look like the one in the paper TBH but I took that to be aesthetic. + +Chapter-Building +================ +Here's where I found I needed to install homebrew, so that I could install all +the moreutils (sponge!) and run the compile. + +The LateX build process spit out a ton of errors -- not just the usual whining +about underfull hbox badness, but also stopping on various reference compiling +errors. Never fear: if you page through them, it'll work in the end. + +And done! +-Kaylea Champion +2.23.2018 +kaylea@uw.edu + diff --git a/README.md b/README.md index e66af27..6bb09f5 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ This document is meant to be read alongside our chapter. The rest of this docume We will be as explicit as possible in this document, and try to make it accessible to less-technical readers. However, we do make a few assumptions: -* You have access to and basic familiarity with [a POSIX command line interface](https://en.wikipedia.org/wiki/POSIX). The instructions here are written for and tested using [Debian](https://www.debian.org/) and [Ubuntu](https://www.ubuntu.com/) GNU/Linux. That said, these instructions should work without modification on most Linux systems. Although MacOS users may need to tweak a few things, they should work there, too. Microsoft Windows users will likely need to tweak more things. This is particularly true for the last step—building the paper itself. If you can get a simple example like [this one](https://github.com/yihui/knitr-examples/blob/master/005-latex.Rtex) working, then there's a decent chance you can get the chapter to build. +* You have access to and basic familiarity with [a POSIX command line interface](https://en.wikipedia.org/wiki/POSIX). The instructions here are written for and tested using [Debian](https://www.debian.org/) and [Ubuntu](https://www.ubuntu.com/) GNU/Linux. That said, these instructions should work without modification on most Linux systems. Although MacOS users may need to [tweak a few things](MacInstallNotes), they should work there, too. Microsoft Windows users will likely need to tweak more things. This is particularly true for the last step—building the paper itself. If you can get a simple example like [this one](https://github.com/yihui/knitr-examples/blob/master/005-latex.Rtex) working, then there's a decent chance you can get the chapter to build. * You have [Python 3.x](https://www.python.org/downloads/) installed. For many users, you will already have it installed. Debian and Ubuntu users can install it with `apt install python3`. Others can download it from [the Python download page](https://www.python.org/downloads/) * You have [GNU R 3.x](https://www.r-project.org/) installed. Debian and Ubuntu users can install it with `apt install r-base`. Others can install it from [the R homepage](https://www.r-project.org/). In our testing we used versions GNU R versions 3.3.2 and 3.4.1. * To conduct the bibliometric network analysis, you'll need the [igraph library](http://igraph.org/). To install it on Debian or Ubuntu you can run `apt install libigraph0v5`. @@ -165,7 +165,7 @@ Doing this will require two final steps: The code used for our bibliometric analysis is contained within the `code/bibliometrics/` subdirectory. -We've included two copies of our Python code for our bibliometric analysis in the files `00_citation_network_analysis.py` and `00_citation_network_analysis.ipynb`. We will describe using the former in this section. If you have [Juypter](https://jupyter.org/) installed you can open the file in a a notebook format used by many scientists by running `jupyter-notebook citation_network_analysis.ipynb`. If you want to try Jupyter, Debian and Ubuntu users can install it with `apt install jupyter-notebook` and other users can download it [here](https://jupyter.org/install.html). +We've included two copies of our Python code for our bibliometric analysis in the files `00_citation_network_analysis.py` and `00_citation_network_analysis.ipynb`. We will describe using the former in this section. If you have [Jupyter](https://jupyter.org/) installed you can open the file in a a notebook format used by many scientists by running `jupyter-notebook citation_network_analysis.ipynb`. If you want to try Jupyter, Debian and Ubuntu users can install it with `apt install jupyter-notebook` and other users can download it [here](https://jupyter.org/install.html). Our bibliometric analysis code does require one additional piece of software called [Infomap](http://www.mapequation.org/) which we use to identify clusters in our citation network. There are some [instructions online](https://github.com/mapequation/infomap) but you can download and install it with the following commands run from the `code/bibliometrics` subdirectory: