<commit_before>---
layout: post
title: Welcome to Social Network Analysis
author: <NAME>
date: November, 2 2015
---

* This is the first in a series of lectures and tutorials that I've prepared for COMM-645 at the USC Annenberg School of Communication *. 

* These talks are meant to be introductory self standing lectures which tackle the basics of social network analysis, hope you enjoy *

Welcome to COMM645! Today we are going to be demonstrating some of the capabilities of R and social network analysis. Don't worry about running this code at this time, just follow along and watch how the script, the console window and the environment interact.

Basic R runs off of the command line with text commands, for this class we will be using [RStudio](https://www.rstudio.com/) a program that sits on top of R and makes it easier to use. Let's take a quick tour of how RStudio works so you can understand this demo.

My window has four panes. The source pane is where you write code. It is basically a text editor like notepad. Any code you write in the source window will not run automatically, so you can tweak or make changes to it slowly. Once your are ready to run your code you can send a line to R by placing your cursor on it and pressing the run key, or **CTRL/Command-Enter**. 

Running code sends it from the source window to the console. The console is where your code is actually run, and any results will be displayed there. Additionally you can type code straight into the console and run it with the **Enter** key. You can only type one command at a time in the console so it is generally best to write most of your commands in the source window and just run code through the console only when you are mucking around or doing calculations you don't need to reproduce.
<commit_msg>Update 2015-11-02-net1.md<commit_after>---
layout: post
title: Welcome to Social Network Analysis
author: <NAME>
date: November, 2 2015
---

*This is the first in a series of lectures and tutorials that I've prepared for COMM-645 at the USC Annenberg School of Communication.*

*These talks are meant to be introductory self standing lectures which tackle the basics of social network analysis, hope you enjoy.*

Welcome to COMM645! Today we are going to be demonstrating some of the capabilities of R and social network analysis. Don't worry about running this code at this time, just follow along and watch how the script, the console window and the environment interact.

Basic R runs off of the command line with text commands, for this class we will be using [RStudio](https://www.rstudio.com/) a program that sits on top of R and makes it easier to use. Let's take a quick tour of how RStudio works so you can understand this demo.

My window has four panes. The source pane is where you write code. It is basically a text editor like notepad. Any code you write in the source window will not run automatically, so you can tweak or make changes to it slowly. Once your are ready to run your code you can send a line to R by placing your cursor on it and pressing the run key, or **CTRL/Command-Enter**. 

Running code sends it from the source window to the console. The console is where your code is actually run, and any results will be displayed there. Additionally you can type code straight into the console and run it with the **Enter** key. You can only type one command at a time in the console so it is generally best to write most of your commands in the source window and just run code through the console only when you are mucking around or doing calculations you don't need to reproduce.

{'fraction_non_alphanumeric': 0.03856825749167592, 'fraction_numerical': 0.008601553829078802, 'mean_word_length': 4.077464788732394, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7188021', 'n_tokens_mistral': 893, 'n_tokens_neox': 820, 'n_words': 627}