Code Monkey home page Code Monkey logo

jobsvisualization's Introduction

jobsVisualization

可视化筛选你中意的工作。

Inspired by bokeh example app movies

该项目的的可视化和交互部分由bokeh驱动,近期@DonaldDai同学在做bokeh文档的翻译工作,欢迎大家参与。项目地址为:Bokeh-CN

Usage(local/dev)

demo

jobs.just4fun.site/jobsVisualization (建议用chrome打开,数据比较多,可能要加载一会儿,这是个待优化地方)

demo

开发环境

mac OSX python2.7

依赖

浏览器兼容性

  • 在max osx下dev状态的应用兼容对html5友好的浏览器:chrome/firefox/safiri
  • 在ubuntu14.04下部署的应用,仅支持chrome,尚不清楚原因,似乎是静态文件出现了乱码(怀疑是nginx的缘故)

todo

优化

计算在server,交互在client,往返传输数据太大,响应迟钝

策略

  1. 思路1:原始数据存在浏览器端,远程用pandas做分析,只传输item_id
  2. 思路2:爬虫的爬取结果允许下载,项目跑在本地,远程响应速度太慢

生产环境/部署

收集静态文件:

cp -r `bokeh info --static` /home/wwj/jobsVisualization/static

启动进程:bokeh serve jobsVisualization --host jobs.just4fun.site --port 5100

nginx反向代理:

server {
    listen 80 ;
    server_name jobs.just4fun.site;

    access_log  /tmp/bokeh.access.log;
    error_log   /tmp/bokeh.error.log debug;

    location / {
        proxy_pass http://127.0.0.1:5100;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_http_version 1.1;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $host:$server_port;
        proxy_buffering off;
    }
    location /apps/static {
                alias /home/wwj/jobsVisualization/static;
            }

}

代码风格

采用google的yapf来统一代码风格

yapf -i filename.py

jobsvisualization's People

Contributors

wwj718 avatar

Watchers

James Cloos avatar zyy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.