1.https://github.com/laurolins/nanocube (来源)

2.Linux (Ubuntu)

On a newly installed 64-bit Ubuntu 14.04 system, gcc/g++ is already 4.8.2, but you should install the following packages:

sudo apt-get install build-essential
sudo apt-get install automake
sudo apt-get install libtool
sudo apt-get install zlib1g-dev
sudo apt-get install libboost-all-dev

3.wget https://github.com/laurolins/nanocube/archive/3.2.1.zip
unzip 3.2.1.zip
cd nanocube-3.2.1
export NANOCUBE_SRC=`pwd`
./bootstrap
mkdir build
cd build
../configure --prefix=$NANOCUBE_SRC CXXFLAGS="-O3"
make
make install
cd ..

4.添加环境变量
$ sudo vi /etc/profile # add the following code to the end of the file.
export NANOCUBE_BIN=$NANOCUBE_SRC/bin
export PATH=$NANOCUBE_BIN:$PATH

5.running a nanocube
$ cat /home/jack/work/servers/nanocube-3.2.1/data/dev_from_csv.dmp | nanocube-leaf -q 29512 -f 10000 ( dev_from_csv.dmp 可以换成其他的数据)

Output

VERSION: 3.2.1
query-port: 29512
(stdin ) count: 10000 mem. res: 7MB. time(s): 0
(stdin ) count: 20000 mem. res: 12MB. time(s): 0
(stdin ) count: 30000 mem. res: 17MB. time(s): 0
(stdin ) count: 40000 mem. res: 22MB. time(s): 0
(stdin ) count: 50000 mem. res: 26MB. time(s): 0
(stdin:done) count: 50000 mem. res: 26MB. time(s): 0

6.生成配置文件(生成的配置文件的配置项和步骤5的dev_from_csv.dmp有关.....######localhost 改成对应服务器的IP,在其他电脑上就可以通过IP访问了)
ncwebviewer-config -s http://localhost:29512 -o $NANOCUBE_SRC/extra/nc_web_viewer/show-devs.json (show-devs.json 可以任意命名为 ×.json )
7.开启web服务
cd $NANOCUBE_SRC/extra/nc_web_viewer
python -m SimpleHTTPServer 8000

8.在浏览器上输入http://localhost:8000/#show-devs 查看结果

×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
**×××××××××××××××(convert *.csv to *.dmp) nanocube-binning-csv --catcol='pro,type' --latcol='lat' --loncol='lng' --timecol='ctime' devs.csv > dev_from_csv.dmp ××××××**××××××××××××××××××××

×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐