cakiki commited on
Commit
b6de7dc
·
1 Parent(s): 9cf4ac9

fix Makefile

Browse files
Files changed (3) hide show
  1. .gitignore +1 -0
  2. Makefile +1 -1
  3. facets-dive.ipynb +32 -23
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ .ipynb_checkpoints
Makefile CHANGED
@@ -6,7 +6,7 @@ build:
6
  docker build -f Dockerfile -t ${REPO}/${NAME}:${VERSION} -t ${REPO}/${NAME}:latest .
7
 
8
  run: build
9
- docker run --rm -it -p 8888:8888 --mount type=bind,source=${PWD},target=/home/jovyan/work --name ${NAME} --workdir=/home/jovyan/work ${REPO}/${NAME}:${VERSION} && make -s clean
10
 
11
  push: build
12
  docker push ${REPO}/${NAME}:${VERSION} && docker push ${REPO}/${NAME}:latest
 
6
  docker build -f Dockerfile -t ${REPO}/${NAME}:${VERSION} -t ${REPO}/${NAME}:latest .
7
 
8
  run: build
9
+ docker run --rm -it -p 8888:8888 --mount type=bind,source=${PWD},target=/home/jovyan/work --name ${NAME} --workdir=/home/jovyan/work ${REPO}/${NAME}:${VERSION}
10
 
11
  push: build
12
  docker push ${REPO}/${NAME}:${VERSION} && docker push ${REPO}/${NAME}:latest
facets-dive.ipynb CHANGED
@@ -27,7 +27,7 @@
27
  },
28
  {
29
  "cell_type": "code",
30
- "execution_count": 8,
31
  "id": "403c4b8a",
32
  "metadata": {},
33
  "outputs": [],
@@ -50,37 +50,46 @@
50
  },
51
  {
52
  "cell_type": "code",
53
- "execution_count": 6,
54
- "id": "c000f04d",
55
  "metadata": {},
56
  "outputs": [
57
  {
58
- "data": {
59
- "text/plain": [
60
- "Private 22696\n",
61
- "Self-emp-not-inc 2541\n",
62
- "Local-gov 2093\n",
63
- "? 1836\n",
64
- "State-gov 1298\n",
65
- "Self-emp-inc 1116\n",
66
- "Federal-gov 960\n",
67
- "Without-pay 14\n",
68
- "Never-worked 7\n",
69
- "Name: workclass, dtype: int64"
70
- ]
71
- },
72
- "execution_count": 6,
73
- "metadata": {},
74
- "output_type": "execute_result"
 
 
 
 
 
 
 
 
 
75
  }
76
  ],
77
  "source": [
78
- "df['workclass'].value_counts()"
79
  ]
80
  },
81
  {
82
  "cell_type": "code",
83
- "execution_count": 10,
84
  "id": "85b71af5",
85
  "metadata": {},
86
  "outputs": [],
@@ -91,7 +100,7 @@
91
  "HTML_TEMPLATE = \"\"\"\n",
92
  " <script src=\"https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/1.3.3/webcomponents-lite.js\"></script>\n",
93
  " <link rel=\"import\" href=\"https://raw.githubusercontent.com/PAIR-code/facets/1.0.0/facets-dist/facets-jupyter.html\">\n",
94
- " <facets-dive sprite-image-width=\"{sprite_size}\" sprite-image-height=\"{sprite_size}\" id=\"elem\" height=\"1200\"></facets-dive>\n",
95
  " <script>\n",
96
  " document.querySelector(\"#elem\").data = {jsonstr};\n",
97
  " </script>\"\"\"\n",
 
27
  },
28
  {
29
  "cell_type": "code",
30
+ "execution_count": 2,
31
  "id": "403c4b8a",
32
  "metadata": {},
33
  "outputs": [],
 
50
  },
51
  {
52
  "cell_type": "code",
53
+ "execution_count": 5,
54
+ "id": "b512f166",
55
  "metadata": {},
56
  "outputs": [
57
  {
58
+ "name": "stdout",
59
+ "output_type": "stream",
60
+ "text": [
61
+ "<class 'pandas.core.frame.DataFrame'>\n",
62
+ "RangeIndex: 32561 entries, 0 to 32560\n",
63
+ "Data columns (total 15 columns):\n",
64
+ " # Column Non-Null Count Dtype \n",
65
+ "--- ------ -------------- ----- \n",
66
+ " 0 age 32561 non-null int64 \n",
67
+ " 1 workclass 32561 non-null object\n",
68
+ " 2 fnlwgt 32561 non-null int64 \n",
69
+ " 3 education 32561 non-null object\n",
70
+ " 4 education.num 32561 non-null int64 \n",
71
+ " 5 marital.status 32561 non-null object\n",
72
+ " 6 occupation 32561 non-null object\n",
73
+ " 7 relationship 32561 non-null object\n",
74
+ " 8 race 32561 non-null object\n",
75
+ " 9 sex 32561 non-null object\n",
76
+ " 10 capital.gain 32561 non-null int64 \n",
77
+ " 11 capital.loss 32561 non-null int64 \n",
78
+ " 12 hours.per.week 32561 non-null int64 \n",
79
+ " 13 native.country 32561 non-null object\n",
80
+ " 14 income 32561 non-null object\n",
81
+ "dtypes: int64(6), object(9)\n",
82
+ "memory usage: 3.7+ MB\n"
83
+ ]
84
  }
85
  ],
86
  "source": [
87
+ "df.info()"
88
  ]
89
  },
90
  {
91
  "cell_type": "code",
92
+ "execution_count": 4,
93
  "id": "85b71af5",
94
  "metadata": {},
95
  "outputs": [],
 
100
  "HTML_TEMPLATE = \"\"\"\n",
101
  " <script src=\"https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/1.3.3/webcomponents-lite.js\"></script>\n",
102
  " <link rel=\"import\" href=\"https://raw.githubusercontent.com/PAIR-code/facets/1.0.0/facets-dist/facets-jupyter.html\">\n",
103
+ " <facets-dive sprite-image-width=\"{sprite_size}\" sprite-image-height=\"{sprite_size}\" id=\"elem\" height=\"800\"></facets-dive>\n",
104
  " <script>\n",
105
  " document.querySelector(\"#elem\").data = {jsonstr};\n",
106
  " </script>\"\"\"\n",