├── .ipynb_checkpoints
└── greNetwork-checkpoint.ipynb
├── README.md
├── data
└── GRE Links and Malaprops.xlsx
├── demo
└── demo.gif
├── greNetwork.ipynb
└── requirements.txt
/.ipynb_checkpoints/greNetwork-checkpoint.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {
6 | "slideshow": {
7 | "slide_type": "slide"
8 | }
9 | },
10 | "source": [
11 | "Use SPACE to change to next slide.
\n",
12 | "Whenever you see code cells press SHIFT+ENTER to execute it and then move to next slide."
13 | ]
14 | },
15 | {
16 | "cell_type": "markdown",
17 | "metadata": {
18 | "slideshow": {
19 | "slide_type": "slide"
20 | }
21 | },
22 | "source": [
23 | "Hola!
\n",
24 | "We have all tried keeping those high frequency GRE words in our memory using various hacks, sometimes even rote memorization.
\n",
25 | "This is an attempt to make that problem a bit easy.
\n"
26 | ]
27 | },
28 | {
29 | "cell_type": "markdown",
30 | "metadata": {
31 | "slideshow": {
32 | "slide_type": "slide"
33 | }
34 | },
35 | "source": [
36 | "There are a total of over 370 common GRE words that have been arranged as networks.
\n",
37 | "We have 2 kinds of networks.
\n",
38 | "The blue colored networks have synonyms. The meaning is represented by the central triangular node while the circles around it are all its synonymns.
\n",
39 | "On the other hand, the green colored networks are commonly confused words. These are represented by squares. If you hover over them, you will see their meanings.
"
40 | ]
41 | },
42 | {
43 | "cell_type": "code",
44 | "execution_count": null,
45 | "metadata": {
46 | "_cell_guid": "79c7e3d0-c299-4dcb-8224-4455121ee9b0",
47 | "_uuid": "d629ff2d2480ee46fbb7e2d37f6b5fab8052498a",
48 | "slideshow": {
49 | "slide_type": "subslide"
50 | }
51 | },
52 | "outputs": [],
53 | "source": [
54 | "#Press shift+enter to execute\n",
55 | "import pandas as pd;import networkx as nx;from pyvis.network import Network;from pyvis import network as net;import numpy as np\n",
56 | "df1=pd.read_excel('data/GRE Links and Malaprops.xlsx');df1.fillna(0,inplace=True);df2=pd.read_excel('data/GRE Links and Malaprops.xlsx',sheet_name=1,header=None);df2.fillna(0,inplace=True);df2 = df2.drop(index=38,axis=0).reset_index();df2.drop(columns='index',axis=1,inplace=True);gre_net=net.Network(height=\"500px\", width=\"100%\", bgcolor=\"#222222\", font_color=\"white\",notebook=True)\n",
57 | "for i in df1.values:\n",
58 | " if i[0]==0:\n",
59 | " continue\n",
60 | " gre_net.add_node(i[0],i[0],title=i[0],size=50,shape='triangle')\n",
61 | " for syn in i[1:]:\n",
62 | " if syn==0:\n",
63 | " break\n",
64 | " gre_net.add_node(syn,syn,title=syn,shape='dot',size=25);gre_net.add_edge(i[0],syn)\n",
65 | "neighbor_map = gre_net.get_adj_list()\n",
66 | "for i in range(0,len(df2.values),2):\n",
67 | " gre_net.add_node(df2.values[i][0],df2.values[i][0],title=df2.values[i+1][0],color=\"#00ff1e\")\n",
68 | " for j in range(1,len(df2.values[i])):\n",
69 | " if df2.values[i][j]==0:\n",
70 | " break\n",
71 | " gre_net.add_node(df2.values[i][j],df2.values[i][j],title=df2.values[i+1][j],color=\"#00ff1e\",shape='diamond',size=50);gre_net.add_edge(df2.values[i][0],df2.values[i][j])\n",
72 | "print(\"Done! Press SPACE to go ahead.\")"
73 | ]
74 | },
75 | {
76 | "cell_type": "markdown",
77 | "metadata": {
78 | "slideshow": {
79 | "slide_type": "slide"
80 | }
81 | },
82 | "source": [
83 | "The visualisation will come up after executing the next cell. \n",
84 | "You can play around by moving the networks."
85 | ]
86 | },
87 | {
88 | "cell_type": "code",
89 | "execution_count": null,
90 | "metadata": {
91 | "slideshow": {
92 | "slide_type": "slide"
93 | }
94 | },
95 | "outputs": [],
96 | "source": [
97 | "# Press shift+enter to see your network!\n",
98 | "gre_net.show(\"gre.html\")"
99 | ]
100 | }
101 | ],
102 | "metadata": {
103 | "celltoolbar": "Slideshow",
104 | "kernelspec": {
105 | "display_name": "Python 3",
106 | "language": "python",
107 | "name": "python3"
108 | },
109 | "language_info": {
110 | "codemirror_mode": {
111 | "name": "ipython",
112 | "version": 3
113 | },
114 | "file_extension": ".py",
115 | "mimetype": "text/x-python",
116 | "name": "python",
117 | "nbconvert_exporter": "python",
118 | "pygments_lexer": "ipython3",
119 | "version": "3.7.3"
120 | },
121 | "livereveal": {
122 | "autolaunch": true
123 | }
124 | },
125 | "nbformat": 4,
126 | "nbformat_minor": 1
127 | }
128 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # theGREvisualizer
2 | [](https://mybinder.org/v2/gh/arrayslayer/theGREvisualizer/master?filepath=%2FgreNetwork.ipynb)
3 |
4 | Visualize synonyms and commonly confused words in an interactive network.
5 | Just click on the Binder logo to get started!
6 |
7 | Here's a demo gif!
8 |
9 |
10 | 
11 |
12 |
13 |
--------------------------------------------------------------------------------
/data/GRE Links and Malaprops.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adityalahiri/theGREvisualizer/4b3062f859d3997956d6c00d4a2e7847550b45f3/data/GRE Links and Malaprops.xlsx
--------------------------------------------------------------------------------
/demo/demo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adityalahiri/theGREvisualizer/4b3062f859d3997956d6c00d4a2e7847550b45f3/demo/demo.gif
--------------------------------------------------------------------------------
/greNetwork.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {
6 | "slideshow": {
7 | "slide_type": "slide"
8 | }
9 | },
10 | "source": [
11 | "Use SPACE to change to next slide.
\n",
12 | "Whenever you see code cells press SHIFT+ENTER to execute it and then move to next slide."
13 | ]
14 | },
15 | {
16 | "cell_type": "markdown",
17 | "metadata": {
18 | "slideshow": {
19 | "slide_type": "slide"
20 | }
21 | },
22 | "source": [
23 | "Hola!
\n",
24 | "We have all tried keeping those high frequency GRE words in our memory using various hacks, sometimes even rote memorization.
\n",
25 | "This is an attempt to make that problem a bit easy.
\n"
26 | ]
27 | },
28 | {
29 | "cell_type": "markdown",
30 | "metadata": {
31 | "slideshow": {
32 | "slide_type": "slide"
33 | }
34 | },
35 | "source": [
36 | "There are a total of over 370 common GRE words that have been arranged as networks.
\n",
37 | "We have 2 kinds of networks.
\n",
38 | "The blue colored networks have synonyms. The meaning is represented by the central triangular node while the circles around it are all its synonymns.
\n",
39 | "On the other hand, the green colored networks are commonly confused words. These are represented by squares. If you hover over them, you will see their meanings.
"
40 | ]
41 | },
42 | {
43 | "cell_type": "code",
44 | "execution_count": null,
45 | "metadata": {
46 | "_cell_guid": "79c7e3d0-c299-4dcb-8224-4455121ee9b0",
47 | "_uuid": "d629ff2d2480ee46fbb7e2d37f6b5fab8052498a",
48 | "slideshow": {
49 | "slide_type": "subslide"
50 | }
51 | },
52 | "outputs": [],
53 | "source": [
54 | "#Press shift+enter to execute\n",
55 | "import pandas as pd;import networkx as nx;from pyvis.network import Network;from pyvis import network as net;import numpy as np\n",
56 | "df1=pd.read_excel('data/GRE Links and Malaprops.xlsx');df1.fillna(0,inplace=True);df2=pd.read_excel('data/GRE Links and Malaprops.xlsx',sheet_name=1,header=None);df2.fillna(0,inplace=True);df2 = df2.drop(index=38,axis=0).reset_index();df2.drop(columns='index',axis=1,inplace=True);gre_net=net.Network(height=\"500px\", width=\"100%\", bgcolor=\"#222222\", font_color=\"white\",notebook=True)\n",
57 | "for i in df1.values:\n",
58 | " if i[0]==0:\n",
59 | " continue\n",
60 | " gre_net.add_node(i[0],i[0],title=i[0],size=50,shape='triangle')\n",
61 | " for syn in i[1:]:\n",
62 | " if syn==0:\n",
63 | " break\n",
64 | " gre_net.add_node(syn,syn,title=syn,shape='dot',size=25);gre_net.add_edge(i[0],syn)\n",
65 | "neighbor_map = gre_net.get_adj_list()\n",
66 | "for i in range(0,len(df2.values),2):\n",
67 | " gre_net.add_node(df2.values[i][0],df2.values[i][0],title=df2.values[i+1][0],color=\"#00ff1e\")\n",
68 | " for j in range(1,len(df2.values[i])):\n",
69 | " if df2.values[i][j]==0:\n",
70 | " break\n",
71 | " gre_net.add_node(df2.values[i][j],df2.values[i][j],title=df2.values[i+1][j],color=\"#00ff1e\",shape='diamond',size=50);gre_net.add_edge(df2.values[i][0],df2.values[i][j])\n",
72 | "print(\"Done! Press SPACE to go ahead.\")"
73 | ]
74 | },
75 | {
76 | "cell_type": "markdown",
77 | "metadata": {
78 | "slideshow": {
79 | "slide_type": "slide"
80 | }
81 | },
82 | "source": [
83 | "The visualisation will come up after executing the next cell. \n",
84 | "You can play around by moving the networks."
85 | ]
86 | },
87 | {
88 | "cell_type": "code",
89 | "execution_count": null,
90 | "metadata": {
91 | "slideshow": {
92 | "slide_type": "slide"
93 | }
94 | },
95 | "outputs": [],
96 | "source": [
97 | "# Press shift+enter to see your network!\n",
98 | "gre_net.show(\"gre.html\")"
99 | ]
100 | }
101 | ],
102 | "metadata": {
103 | "celltoolbar": "Slideshow",
104 | "kernelspec": {
105 | "display_name": "Python 3",
106 | "language": "python",
107 | "name": "python3"
108 | },
109 | "language_info": {
110 | "codemirror_mode": {
111 | "name": "ipython",
112 | "version": 3
113 | },
114 | "file_extension": ".py",
115 | "mimetype": "text/x-python",
116 | "name": "python",
117 | "nbconvert_exporter": "python",
118 | "pygments_lexer": "ipython3",
119 | "version": "3.7.3"
120 | },
121 | "livereveal": {
122 | "autolaunch": true
123 | }
124 | },
125 | "nbformat": 4,
126 | "nbformat_minor": 1
127 | }
128 |
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | pandas
2 | networkx
3 | pyvis
4 | numpy
5 | xlrd
6 | RISE
--------------------------------------------------------------------------------