当前位置:   article > 正文

python招聘数据分析系统+爬虫+可视化 +Django框架+vue框架_基于python的招聘数据分析可视化系统

基于python的招聘数据分析可视化系统

[毕业设计]2023-2024年最新最全计算机专业毕设选题推荐汇总

2023年 - 2024年 最新计算机毕业设计 本科 选题大全 汇总

感兴趣的可以先收藏起来,还有大家在毕设选题,项目以及论文编写等相关问题都可以给我留言咨询,希望帮助更多的人 。

1、项目介绍

此系统是一个实时分析招聘信息系统,应用Python爬虫、Flask框架、Echarts等技术实现。系统用户分为三类,管理员,普通用户和特殊用户(特殊用户指残疾人用户),普通用户和特殊用户的招聘数据来源不同,分别展示各自的数据。

项目技术栈:
Python招聘数据 薪资预测Flask框架 Echarts可视化大屏 Vue前端 智联招聘

2、项目界面

(1)招聘数据分析可视化
在这里插入图片描述

(2)数据概览
在这里插入图片描述

(3)数据爬虫模块

在这里插入图片描述

(4)薪资预测模块

在这里插入图片描述

3、项目说明

管理员功能

1、个人信息
​ 浏览或修改个人信息
2、修改密码
​ 修改登录密码
3、51 Job 数据概览
​ 浏览正常用户招聘数据
4、残疾人招聘数据概览
​ 浏览特殊用户招聘数据
5、51job数据获取
​ 动态获取51job数据
6、数据爬取日志
​ 查看数据爬取日志
7、用户管理
​ 管理系统用户

普通用户功能

1、个人信息
​ 浏览或修改个人信息
2、修改密码
​ 修改登录密码
3、职位数据
​ 将爬取到的数据进行展示
4、数据获取
​ 动态获取51job数据
5、数据爬取日志
​ 查看数据爬取日志
6、城市招聘分布
​ 将数据通过工作城市进行分组,计算每个城市有多少条招聘信息,通过echarts柱状图进行展示
7、福利词云
​ 分析公司福利, 用词云图进行展示
8、薪资统计
​ 通过行业、学历要求和工作地点分析薪资占比
9、招聘要求
​ 经验和学历两个维度分析各个行业的招聘要求占比
10、公司信息分析
​ 对公司属性、公司性质、公司规模进行分析
11、推荐职位
​ 根据个人信息系统推荐合适的职位
12、薪资预测
​ 通过工资中位数对薪资进行预测

4、部分代码


from flask import Blueprint,request,jsonify
from data.mysqlHelper import get_a_conn
from data.data_zhilian import getZhilian
 
index_api = Blueprint('index_api', __name__)

# 51job城市字典表
@index_api.route('/getCityDict', methods=['POST'])
def getCityDict():
    try:
        mysql = get_a_conn()
        sql = "select city_code value,city_name label from tbl_city"
        res = mysql.fetchall(sql)
        return jsonify({'code': '200', 'info': res})
    except Exception as e:
        return jsonify({'code': '500', 'info': e})

# 取消收藏
@index_api.route('/delCollect', methods=['POST'])
def delCollect():
    try:
        user_id = request.json.get('user_id')
        job_id = int(request.json.get('job_id'))
        mysql = get_a_conn()
        sql = "delete from tbl_user_job where user_id = '%s' and job_id = '%s'" % (user_id, job_id)
        mysql.fetchall(sql)
        return jsonify({'code': '200', 'info': '取消成功'})
    except Exception as e:
        return jsonify({'code': '500', 'info': e})

# 收藏
@index_api.route('/collect', methods=['POST'])
def collect():
    try:
        user_id = request.json.get('user_id')
        job_id = int(request.json.get('job_id'))
        mysql = get_a_conn()
        sql = "insert into tbl_user_job (user_id,job_id) values (%s,%s) " % (user_id, job_id)
        mysql.fetchall(sql)
        return jsonify({'code': '200', 'info': '新增成功'})
    except Exception as e:
        return jsonify({'code': '500', 'info': e})

# 获取日志
@index_api.route('/getLogs', methods=['POST'])
def getLogs():
    pageno = int(request.json.get('pageNo', 1))
    pagesize = int(request.json.get('pageSize', 10))
    userRole = request.json.get('userRole')
    userName = request.json.get('userName')
    mysql = get_a_conn()
    sql = "SELECT * FROM tbl_data_log where 1=1 "
    if userRole != None and userRole != '' and userRole != '1':
        sql += "and user_name = '"  + str(userName) + "'"
    sql += "ORDER BY end_time desc limit %s,%s" % ((pageno - 1) * pagesize, pagesize)
    result = mysql.fetchall(sql)
    sql_count = 'select count(1) num from tbl_data_log where 1=1 '
    if userRole != None and userRole != '' and userRole != '1':
        sql_count += "and user_name = '"  + str(userName) + "'"
    count = mysql.fetchall(sql_count)
    total = count[0].get('num')
    return jsonify({'code': '200', 'info': result, 'pageno': pageno, 'pagesize': pagesize, 'total': total})


# 爬取数据
@index_api.route('/getJobData', methods=['POST'])
def getJobs():
    username = request.json.get('username')
    search = request.json.get('search', '+')
    pagesize = int(request.json.get('pageSize', 2))
    city_id = request.json.get('city_id', 358)
    if search == '':
        search = ''
    if city_id == '':
        city_id = 358
    result = getZhilian(username,city_id, search, pagesize)
    return jsonify({'code': '200', 'info': result})


# 用户新增
@index_api.route('/addUser', methods=['POST'])
def addUser():
    try:
        account = request.json.get('account')
        name = request.json.get('name')
        email = request.json.get('email')
        phone = request.json.get('phone')
        role = request.json.get('role')
        remarks = request.json.get('remarks')
        mysql = get_a_conn()
        sql = "insert into tbl_user (name,account,pwd,email,phone,login_flag,remarks,role) values ('%s','%s','%s','%s','%s','%s','%s','%s') " % (
            name, account, '123456', email, phone, '1', remarks, role)
        mysql.fetchall(sql)

        return jsonify({'code': '200', 'info': '新增成功'})
    except Exception as e:
        return jsonify({'code': '500', 'info': e})

# 用户信息
@index_api.route('/userInfo', methods=['POST'])
def userInfo():
    account = request.form.get("account")
    mysql = get_a_conn()
    sql = "SELECT * FROM tbl_user where 1=1 "
    if account != None and account != '':
        sql += " and account = '"
        sql += account
        sql += "'"
    result = mysql.fetchall(sql)
    sql_count = 'select count(1) num from tbl_user'
    count = mysql.fetchall(sql_count)
    total = count[0].get('num')
    return jsonify({'code': '200', 'info': result})


# 用户编辑
@index_api.route('/editUser', methods=['POST'])
def editUser():
    try:
        print(request.form)

        print('=============')
        print(request.json)
        id = request.json.get('id')
        name = request.json.get('name')
        email = request.json.get('email')
        phone = request.json.get('phone')
        role = request.json.get('role')
        remarks = request.json.get('remarks')
        icon = request.json.get('img')
        location = '' if (request.json.get('location') == 'None' or request.json.get('location') == None) else request.json.get('location')
        exp = '' if request.json.get('exp') == 'None' else request.json.get('exp')
        deu = '' if request.json.get('deu') == 'None' else request.json.get('deu')
        major = '' if request.json.get('major') == 'None' else request.json.get('major')
        mysql = get_a_conn()
        sql = "update tbl_user set name = '%s',email='%s',phone='%s',role='%s',remarks='%s',location='%s',exp='%s',deu='%s',major='%s',img='%s' where id = '%s'" % (
            name, email, phone, role, remarks,location,exp,deu,major, icon,id)
        mysql.fetchall(sql)

        return jsonify({'code': '200', 'info': '修改成功'})
    except Exception as e:
        return jsonify({'code': '500', 'info': e})


# 用户停用
@index_api.route('/stopUser', methods=['POST'])
def stopUser():
    try:
        id = request.form.get('id')
        if (id == None or id == '' or id == 'undefined'):
            return jsonify({'code': '500', 'info': 'id不存在,启用失败'})
        mysql = get_a_conn()
        sql = "update tbl_user set login_flag = '0' where id = '%s'" % id
        mysql.fetchall(sql)
        return jsonify({'code': '200', 'info': '停用成功'})
    except Exception as e:
        return jsonify({'code': '500', 'info': e})


# 重置密码
@index_api.route('/chongzhi', methods=['POST'])
def chongzhi():
    try:
        id = request.form.get('id')
        if (id == None or id == '' or id == 'undefined'):
            return jsonify({'code': '500', 'info': 'id不存在,重置失败'})
        mysql = get_a_conn()
        sql = "update tbl_user set pwd = '123456' where id = '%s'" % id
        mysql.fetchall(sql)
        return jsonify({'code': '200', 'info': '重置成功,密码为 123456'})
    except Exception as e:
        return jsonify({'code': '500', 'info': e})


# 用户启用
@index_api.route('/startUser', methods=['POST'])
def startUser():
    try:
        id = request.form.get('id')
        if (id == None or id == '' or id == 'undefined'):
            return jsonify({'code': '500', 'info': 'id不存在,启用失败'})
        mysql = get_a_conn()
        sql = "update tbl_user set login_flag = '1' where id = '%s'" % id
        mysql.fetchall(sql)
        return jsonify({'code': '200', 'info': '启用成功'})
    except Exception as e:
        return jsonify({'code': '500', 'info': e})


# 用户删除
@index_api.route('/delUser', methods=['POST'])
def delUser():
    try:
        id = request.form.get('id')
        if (id == None or id == '' or id == 'undefined'):
            return jsonify({'code': '500', 'info': 'id不存在,删除失败'})
        mysql = get_a_conn()
        sql = "delete from tbl_user where id =  '%s'" % id
        mysql.fetchall(sql)
        return jsonify({'code': '200', 'info': '删除成功'})
    except Exception as e:
        return jsonify({'code': '500', 'info': '删除失败' + e})


# 用户列表
@index_api.route('/getUsers', methods=['POST'])
def getUsers():
    pageno = int(request.form.get('pageNo', 1))
    pagesize = int(request.form.get('pageSize', 10))
    name = request.form.get("name")
    phone = request.form.get("phone")
    mysql = get_a_conn()
    sql = "SELECT * FROM tbl_user where 1=1 "
    if name != None and name != '':
        sql += " and name like '%"
        sql += name
        sql += "%'"
    if phone != None and phone != '':
        sql += " and phone = '%s'" % (phone)
    sql += " ORDER BY id asc limit %s,%s" % ((pageno - 1) * pagesize, pagesize)
    result = mysql.fetchall(sql)
    sql_count = 'select count(1) num from tbl_user'
    count = mysql.fetchall(sql_count)
    total = count[0].get('num')
    return jsonify({'code': '200', 'info': result, 'pageno': pageno, 'pagesize': pagesize, 'total': total})


# 修改密码
@index_api.route('/changePwd', methods=['POST'])
def changePwd():
    account = request.form.get('account', None)
    oldPwd = request.form.get('oldPwd', None)
    newPwd = request.form.get('newPwd', None)
    mysql = get_a_conn()
    sql = """ SELECT * FROM tbl_user t where t.account = '%s' and t.pwd = '%s' """ % (account, oldPwd)
    result = mysql.fetchall(sql)
    if (result):
        sql = "update tbl_user set pwd = '%s' WHERE account = '%s'" % (newPwd, account)
        result1 = mysql.fetchall(sql)
        print(result1)
        return jsonify({'code': '200', 'info': '修改成功'})
    else:
        return jsonify({'code': '500', 'info': '旧密码输入不正确'})


# 注册
@index_api.route('/reg', methods=['POST'])
def reg():
    try:
        account = request.form.get('account', None)
        pwd = request.form.get('pwd', None)
        name = request.form.get('name', None)
        role = request.form.get('role', None)

        # 账号是否存在校验
        mysql = get_a_conn()
        sql_username = 'select count(1) count from tbl_user t where t.account = "%s"' % (account)
        result = mysql.fetchall(sql_username)
        if (result[0].get('count') > 0):
            return jsonify({'code': '500', 'info': '该账号已注册'})
        else:
            sql = "INSERT into tbl_user (name,account,pwd,login_flag,role) values ('%s','%s','%s','%s','%s')" % (
                name, account, pwd, '1', role)
            mysql = get_a_conn()
            mysql.fetchall(sql)
        return jsonify({'code': '200', 'info': '注册成功,请登录'})
    except Exception as e:
        return jsonify({'code': '500', 'info': e})


# 登录
@index_api.route('/login', methods=['POST'])
def login():
    account = request.form.get('account', None)
    pwd = request.form.get('pwd', None)
    mysql = get_a_conn()
    sql = """ SELECT * FROM tbl_user t where t.account = '%s' and t.pwd = '%s' """ % (account, pwd)
    result = mysql.fetchall(sql)
    if (result):
        return {'code': '200', 'info': '%s登录成功' % account, 'session':result}
    else:
        return {'code': '500', 'info': '%s登录失败' % account}

  • 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
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204
  • 205
  • 206
  • 207
  • 208
  • 209
  • 210
  • 211
  • 212
  • 213
  • 214
  • 215
  • 216
  • 217
  • 218
  • 219
  • 220
  • 221
  • 222
  • 223
  • 224
  • 225
  • 226
  • 227
  • 228
  • 229
  • 230
  • 231
  • 232
  • 233
  • 234
  • 235
  • 236
  • 237
  • 238
  • 239
  • 240
  • 241
  • 242
  • 243
  • 244
  • 245
  • 246
  • 247
  • 248
  • 249
  • 250
  • 251
  • 252
  • 253
  • 254
  • 255
  • 256
  • 257
  • 258
  • 259
  • 260
  • 261
  • 262
  • 263
  • 264
  • 265
  • 266
  • 267
  • 268
  • 269
  • 270
  • 271
  • 272
  • 273
  • 274
  • 275
  • 276
  • 277
  • 278
  • 279
  • 280
  • 281
  • 282
  • 283
  • 284

源码获取:

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/煮酒与君饮/article/detail/822013

推荐阅读
相关标签