-
Notifications
You must be signed in to change notification settings - Fork 0
/
installation
73 lines (45 loc) · 2.04 KB
/
installation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Install conda (miniconda is lighter) for python 3.6+.
https://docs.conda.io/projects/conda/en/latest/user-guide/install/
# Go to the folder you manage your projects (e.g. .../repos)
cd .../repos
# Get the *sensingbee* source code from git
$ git clone https://github.com/adaj/sensingbee.git
# Also, you'll need the *geohunter* package
# to manage auxiliary data and variables from OpenStreetMap
$ git clone https://github.com/adaj/geohunter.git
# Create an environment to install the requirements there.
$ conda create -n senv
$ conda activate senv
$ conda init
# To exit your conda environment, "conda deactivate"
# Install sensingbee requirements.
$ conda install pandas==0.25.1
$ conda install scikit-learn==0.21.3
$ conda install geopandas==0.3.0
# Install pip in your env, we need some packages that are easily
# installed from pip.
$ conda install pip
$ conda init
# (Optional) If you want to use jupyter notebooks on your project,
# you'll need to install it inside your conda environment.
$ conda install jupyter
# Create a folder for your project, let's say "~/sensingbee/project1"
# and create a configuration file called "sensingbee.conf" there
# with the path to the sensingbee source code. Please change
# "~/sensingbee" to the place where you placed the folder you got.
# The FULL_PATH here refers to the absolute path (e.g. got from pwd)
$ mkdir ~/sensingbee/project1
$ echo "param,val" > FULL_PATH/repos/sensingbee/project1/sensingbee.conf
$ echo "SOURCE_PATH,FULL_PATH/repos/sensingbee" >> FULL_PATH/repos/sensingbee/project1/sensingbee.conf
$ echo "GEOHUNTER_PATH,FULL_PATH/repos/geohunter" >> FULL_PATH/repos/sensingbee/project1/sensingbee.conf
# Test *senginbee* installation
$ python3
>>> import pandas as pd
>>> conf = pd.read_csv('sensingbee.conf', index_col='param')
>>> import sys
>>> sys.path.append(conf.loc['GEOHUNTER_PATH','val'])
>>> sys.path.append(conf.loc['SOURCE_PATH','val'])
>>> import sensingbee
>>> import sensingbee.data_preparation
>>> import sensingbee.feature_engineering
>>> import sensingbee.ml_modeling