Skip to content

Commit

Permalink
post-tutorial push
Browse files Browse the repository at this point in the history
Former-commit-id: 2407290
  • Loading branch information
ericmjl committed May 17, 2017
1 parent 747a346 commit 92bbdc2
Show file tree
Hide file tree
Showing 9 changed files with 260 additions and 191 deletions.
33 changes: 24 additions & 9 deletions 1-introduction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
"slide_type": "skip"
}
},
"source": [
Expand Down Expand Up @@ -131,17 +131,17 @@
}
},
"source": [
"# Examples of Networks\n",
"\n",
"# Examples of Networks"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"1. Facebook's network: Individuals are nodes, edges are drawn between individuals who are FB friends with one another. **undirected network**.\n",
"2. Air traffic network: Airports are nodes, flights between airports are the edges. **directed network**.\n",
"\n",
"Can you think of any others?\n",
"\n",
"The key questions here are as follows. How do we...:\n",
"\n",
"1. model a problem as a network?\n",
"2. extract useful information from a network?"
"Can you think of any others?"
]
},
{
Expand Down Expand Up @@ -178,6 +178,21 @@
"- Think through statistical problems in network analysis."
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"# Tutorial Format\n",
"\n",
"- Student notebooks for coding exercises.\n",
"- Instructor versions for reference.\n",
"- Feel free to skip ahead of myself if I'm too slow for you."
]
},
{
"cell_type": "markdown",
"metadata": {
Expand Down
85 changes: 54 additions & 31 deletions 2-networkx-basics-instructor.ipynb

Large diffs are not rendered by default.

150 changes: 80 additions & 70 deletions 3-hubs-and-paths-instructor.ipynb

Large diffs are not rendered by default.

14 changes: 4 additions & 10 deletions 3-hubs-and-paths-student.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -437,12 +437,6 @@
"def path_exists(node1, node2, G):\n",
" \"\"\"\n",
" This function checks whether a path exists between two nodes (node1, node2) in graph G.\n",
" \n",
" Special thanks to @ghirlekar for suggesting that we keep track of the \"visited nodes\" to\n",
" prevent infinite loops from happening. This also removes the need to remove nodes from\n",
" queue.\n",
" \n",
" Reference: https://github.com/ericmjl/Network-Analysis-Made-Simple/issues/3\n",
" \"\"\"\n",
" visited_nodes = set()\n",
" queue = [node1]\n",
Expand All @@ -456,9 +450,9 @@
" else:\n",
" _________.add(______)\n",
" _______.extend(________)\n",
" if len(queue) == 0:\n",
" print('Path does not exist between nodes {0} and {1}'.format(node1, node2))\n",
" return False\n",
"\n",
" print('Path does not exist between nodes {0} and {1}'.format(node1, node2))\n",
" return False\n",
" "
]
},
Expand Down Expand Up @@ -571,7 +565,7 @@
"source": [
"### Exercise\n",
"\n",
"Write a function that extracts the edges in the shortest path between two nodes and puts them into a new graph, and draws it to the screen. It should also return an error if there is no path between the two nodes. (10 min.)\n",
"Write a function that extracts the edges in the shortest path between two nodes and puts them into a new graph, and draws it to the screen. It should also return an error if there is no path between the two nodes. (5 min.)\n",
"\n",
"Hint: You may want to use `G.subgraph(iterable_of_nodes)` to extract just the nodes and edges of interest from the graph `G`. You might want to use the following lines of code somewhere:\n",
"\n",
Expand Down
59 changes: 30 additions & 29 deletions 4-cliques-triangles-structures-instructor.ipynb

Large diffs are not rendered by default.

68 changes: 47 additions & 21 deletions 5-graph-input-output-instructor.ipynb

Large diffs are not rendered by default.

42 changes: 21 additions & 21 deletions 6-bipartite-graphs-instructor.ipynb

Large diffs are not rendered by default.

Binary file modified images/crime-crime.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/crime-person.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 92bbdc2

Please sign in to comment.