Skip to content

Commit

Permalink
Add exercise dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
mwaskom committed Feb 24, 2014
1 parent 799924f commit ff48445
Show file tree
Hide file tree
Showing 3 changed files with 106 additions and 0 deletions.
91 changes: 91 additions & 0 deletions exercise.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
,id,diet,pulse,time,kind
0,1,low fat,85,1 min,rest
1,1,low fat,85,15 min,rest
2,1,low fat,88,30 min,rest
3,2,low fat,90,1 min,rest
4,2,low fat,92,15 min,rest
5,2,low fat,93,30 min,rest
6,3,low fat,97,1 min,rest
7,3,low fat,97,15 min,rest
8,3,low fat,94,30 min,rest
9,4,low fat,80,1 min,rest
10,4,low fat,82,15 min,rest
11,4,low fat,83,30 min,rest
12,5,low fat,91,1 min,rest
13,5,low fat,92,15 min,rest
14,5,low fat,91,30 min,rest
15,6,no fat,83,1 min,rest
16,6,no fat,83,15 min,rest
17,6,no fat,84,30 min,rest
18,7,no fat,87,1 min,rest
19,7,no fat,88,15 min,rest
20,7,no fat,90,30 min,rest
21,8,no fat,92,1 min,rest
22,8,no fat,94,15 min,rest
23,8,no fat,95,30 min,rest
24,9,no fat,97,1 min,rest
25,9,no fat,99,15 min,rest
26,9,no fat,96,30 min,rest
27,10,no fat,100,1 min,rest
28,10,no fat,97,15 min,rest
29,10,no fat,100,30 min,rest
30,11,low fat,86,1 min,walking
31,11,low fat,86,15 min,walking
32,11,low fat,84,30 min,walking
33,12,low fat,93,1 min,walking
34,12,low fat,103,15 min,walking
35,12,low fat,104,30 min,walking
36,13,low fat,90,1 min,walking
37,13,low fat,92,15 min,walking
38,13,low fat,93,30 min,walking
39,14,low fat,95,1 min,walking
40,14,low fat,96,15 min,walking
41,14,low fat,100,30 min,walking
42,15,low fat,89,1 min,walking
43,15,low fat,96,15 min,walking
44,15,low fat,95,30 min,walking
45,16,no fat,84,1 min,walking
46,16,no fat,86,15 min,walking
47,16,no fat,89,30 min,walking
48,17,no fat,103,1 min,walking
49,17,no fat,109,15 min,walking
50,17,no fat,90,30 min,walking
51,18,no fat,92,1 min,walking
52,18,no fat,96,15 min,walking
53,18,no fat,101,30 min,walking
54,19,no fat,97,1 min,walking
55,19,no fat,98,15 min,walking
56,19,no fat,100,30 min,walking
57,20,no fat,102,1 min,walking
58,20,no fat,104,15 min,walking
59,20,no fat,103,30 min,walking
60,21,low fat,93,1 min,running
61,21,low fat,98,15 min,running
62,21,low fat,110,30 min,running
63,22,low fat,98,1 min,running
64,22,low fat,104,15 min,running
65,22,low fat,112,30 min,running
66,23,low fat,98,1 min,running
67,23,low fat,105,15 min,running
68,23,low fat,99,30 min,running
69,24,low fat,87,1 min,running
70,24,low fat,132,15 min,running
71,24,low fat,120,30 min,running
72,25,low fat,94,1 min,running
73,25,low fat,110,15 min,running
74,25,low fat,116,30 min,running
75,26,no fat,95,1 min,running
76,26,no fat,126,15 min,running
77,26,no fat,143,30 min,running
78,27,no fat,100,1 min,running
79,27,no fat,126,15 min,running
80,27,no fat,140,30 min,running
81,28,no fat,103,1 min,running
82,28,no fat,124,15 min,running
83,28,no fat,140,30 min,running
84,29,no fat,94,1 min,running
85,29,no fat,135,15 min,running
86,29,no fat,130,30 min,running
87,30,no fat,99,1 min,running
88,30,no fat,111,15 min,running
89,30,no fat,150,30 min,running
14 changes: 14 additions & 0 deletions process/exercise.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import pandas as pd


def main():

df = pd.read_csv("raw/exercise.csv")
df["diet"] = df.diet.map({1: "low fat", 2: "no fat"})
df["kind"] = df.exertype.map({1: "rest", 2: "walking", 3: "running"})
df["time"] = df.time.map({1: "1 min", 2: "15 min", 3: "30 min"})
df = df.drop(["exertype"], axis=1)
df.to_csv("exercise.csv")

if __name__ == "__main__":
main()
1 change: 1 addition & 0 deletions raw/exercise.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
id,diet,exertype,pulse,time1,1,1,85,11,1,1,85,21,1,1,88,32,1,1,90,12,1,1,92,22,1,1,93,33,1,1,97,13,1,1,97,23,1,1,94,34,1,1,80,14,1,1,82,24,1,1,83,35,1,1,91,15,1,1,92,25,1,1,91,36,2,1,83,16,2,1,83,26,2,1,84,37,2,1,87,17,2,1,88,27,2,1,90,38,2,1,92,18,2,1,94,28,2,1,95,39,2,1,97,19,2,1,99,29,2,1,96,310,2,1,100,110,2,1,97,210,2,1,100,311,1,2,86,111,1,2,86,211,1,2,84,312,1,2,93,112,1,2,103,212,1,2,104,313,1,2,90,113,1,2,92,213,1,2,93,314,1,2,95,114,1,2,96,214,1,2,100,315,1,2,89,115,1,2,96,215,1,2,95,316,2,2,84,116,2,2,86,216,2,2,89,317,2,2,103,117,2,2,109,217,2,2,90,318,2,2,92,118,2,2,96,218,2,2,101,319,2,2,97,119,2,2,98,219,2,2,100,320,2,2,102,120,2,2,104,220,2,2,103,321,1,3,93,121,1,3,98,221,1,3,110,322,1,3,98,122,1,3,104,222,1,3,112,323,1,3,98,123,1,3,105,223,1,3,99,324,1,3,87,124,1,3,132,224,1,3,120,325,1,3,94,125,1,3,110,225,1,3,116,326,2,3,95,126,2,3,126,226,2,3,143,327,2,3,100,127,2,3,126,227,2,3,140,328,2,3,103,128,2,3,124,228,2,3,140,329,2,3,94,129,2,3,135,229,2,3,130,330,2,3,99,130,2,3,111,230,2,3,150,3
Expand Down

0 comments on commit ff48445

Please sign in to comment.