大数据时代,数据分析如火如荼,计算机行业的前景如何?对工作经验有什么要求?个人优势在哪里?是否可以拿到期望薪资?本次将对广东省计算机相关领域的职业进行分析。
项目目的
- 了解计算机领域的公司类型
- 了解相关公司的主要行业类型
- 了解学历与薪资间的关系
- 了解工作经验对薪资的影响
- 了解目前掌握数据下广东省哪个市级的工资更高
- 了解计算机行业热门职位及技术
- 了解公司提供的福利待遇如何
环境
- 工具:PyCharm
- 数据清洗分析:pandas
- 数据可视化:pyechart,python-matplotlib
数据来源
- 数据来源:51job(https://search.51job.com)
- 采集时间:2021.11.17
- 数据采集工具:python-requests,random,time,json
- 有效数据样本:10102条
爬取过程
一、爬取有关数据
def handledata_kw(supername,secondname,citycode):
print(supername,secondname,citycode)
time.sleep(1)
golols = {"index":1}
while True:
time.sleep(random.uniform(1,6))
golols["index"] += 1
try:
url = f'https://search.51job.com/list/{citycode},000000,0000,00,9,99,{golol_key},2,{golols["index"]}.html'
print(url)
res = requests.get(url,headers=headers, timeout=(50)).json()
except Exception as e:
print(e, "捕获第%d页异常" % golols["index"])
continue
alllist = res.get("engine_jds")
if alllist == None:
print("当前分类无数据!")
continue
for idit in alllist:
print(f"总页码:{res.get('total_page')}\t当前页码{res.get('curr_page')}",idit)
try:
newitem = {}
newitem["id"] = str(idit.get('jobid')).replace(',', '')
newitem["title"] = str(idit.get('job_name')).replace(',', '')
newitem["public_t"] = str(idit.get('issuedate')).replace(',', '')
newitem["prov"] = str(supername).replace(