A New Experimental Dataset for Clustering!


In [10]:
import os 
import requests 

WALKING_DATASET = (
    "https://archive.ics.uci.edu/ml/machine-learning-databases/00286/User%20Identification%20From%20Walking%20Activity.zip", 
)

def download_data(path='data', urls=WALKING_DATASET):
    if not os.path.exists(path):
        os.mkdir(path) 
    
    for url in urls:
        response = requests.get(url)
        name = os.path.basename(url) 
        with open(os.path.join(path, name), 'wb') as f: 
            f.write(response.content)

download_data()

In [11]:
import zipfile

z = zipfile.ZipFile(os.path.join('data', 'User%20Identification%20From%20Walking%20Activity.zip'))
z.extractall(os.path.join('data', 'walking'))

In [ ]:
import pandas as pd 

df = pd.

for root, dirs, files in os.walk(os.path.join('data', 'walking','User Identification From Walking Activity')):
    for file in files:
        if file.endswith(".csv"):
            print(int(os.path.splitext(file)[0]))

In [22]:



1
10
11
12
13
14
15
16
17
18
19
2
20
21
22
3
4
5
6
7
8
9

In [ ]: