parent
4c2fcb76c4
commit
d0e4d0b7c9
@ -0,0 +1,167 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Awesome-pyecharts</title>
|
||||
<script type="text/javascript" src="https://assets.pyecharts.org/assets/echarts.min.js"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="150dd4869de6437c862a2539d079fb42" class="chart-container" style="width:900px; height:500px;"></div>
|
||||
<script>
|
||||
var chart_150dd4869de6437c862a2539d079fb42 = echarts.init(
|
||||
document.getElementById('150dd4869de6437c862a2539d079fb42'), 'white', {renderer: 'canvas'});
|
||||
var option_150dd4869de6437c862a2539d079fb42 = {
|
||||
"animation": true,
|
||||
"animationThreshold": 2000,
|
||||
"animationDuration": 1000,
|
||||
"animationEasing": "cubicOut",
|
||||
"animationDelay": 0,
|
||||
"animationDurationUpdate": 300,
|
||||
"animationEasingUpdate": "cubicOut",
|
||||
"animationDelayUpdate": 0,
|
||||
"color": [
|
||||
"#9fe080",
|
||||
"#5c7bd9",
|
||||
"#ffdc60",
|
||||
"#ff7070",
|
||||
"#7ed3fc",
|
||||
"#8470FF"
|
||||
],
|
||||
"series": [
|
||||
{
|
||||
"type": "pie",
|
||||
"name": "\u516c\u53f8\u89c4\u6a21\u997c\u56fe",
|
||||
"clockwise": true,
|
||||
"data": [
|
||||
{
|
||||
"name": "100-499\u4eba",
|
||||
"value": 356
|
||||
},
|
||||
{
|
||||
"name": "1000-9999\u4eba",
|
||||
"value": 418
|
||||
},
|
||||
{
|
||||
"name": "10000\u4eba\u4ee5\u4e0a",
|
||||
"value": 235
|
||||
},
|
||||
{
|
||||
"name": "20-99\u4eba",
|
||||
"value": 423
|
||||
},
|
||||
{
|
||||
"name": "20\u4eba\u4ee5\u4e0b",
|
||||
"value": 81
|
||||
},
|
||||
{
|
||||
"name": "500-999\u4eba",
|
||||
"value": 212
|
||||
},
|
||||
{
|
||||
"name": "\u4e0a\u5e02\u516c\u53f8",
|
||||
"value": 4
|
||||
},
|
||||
{
|
||||
"name": "\u5176\u5b83",
|
||||
"value": 1
|
||||
},
|
||||
{
|
||||
"name": "\u5408\u8d44",
|
||||
"value": 4
|
||||
},
|
||||
{
|
||||
"name": "\u56fd\u4f01",
|
||||
"value": 5
|
||||
},
|
||||
{
|
||||
"name": "\u5916\u5546\u72ec\u8d44",
|
||||
"value": 3
|
||||
},
|
||||
{
|
||||
"name": "\u6c11\u8425",
|
||||
"value": 74
|
||||
},
|
||||
{
|
||||
"name": "\u80a1\u4efd\u5236\u4f01\u4e1a",
|
||||
"value": 6
|
||||
}
|
||||
],
|
||||
"radius": [
|
||||
0,
|
||||
"50%"
|
||||
],
|
||||
"center": [
|
||||
"50%",
|
||||
"50%"
|
||||
],
|
||||
"label": {
|
||||
"show": true,
|
||||
"position": "top",
|
||||
"margin": 8,
|
||||
"formatter": "{b}:{d}%"
|
||||
}
|
||||
}
|
||||
],
|
||||
"legend": [
|
||||
{
|
||||
"data": [
|
||||
"100-499\u4eba",
|
||||
"1000-9999\u4eba",
|
||||
"10000\u4eba\u4ee5\u4e0a",
|
||||
"20-99\u4eba",
|
||||
"20\u4eba\u4ee5\u4e0b",
|
||||
"500-999\u4eba",
|
||||
"\u4e0a\u5e02\u516c\u53f8",
|
||||
"\u5176\u5b83",
|
||||
"\u5408\u8d44",
|
||||
"\u56fd\u4f01",
|
||||
"\u5916\u5546\u72ec\u8d44",
|
||||
"\u6c11\u8425",
|
||||
"\u80a1\u4efd\u5236\u4f01\u4e1a"
|
||||
],
|
||||
"selected": {},
|
||||
"show": true,
|
||||
"left": "10%",
|
||||
"top": "18%",
|
||||
"orient": "vertical",
|
||||
"padding": 5,
|
||||
"itemGap": 10,
|
||||
"itemWidth": 25,
|
||||
"itemHeight": 14
|
||||
}
|
||||
],
|
||||
"tooltip": {
|
||||
"show": true,
|
||||
"trigger": "item",
|
||||
"triggerOn": "mousemove|click",
|
||||
"axisPointer": {
|
||||
"type": "line"
|
||||
},
|
||||
"showContent": true,
|
||||
"alwaysShowContent": false,
|
||||
"showDelay": 0,
|
||||
"hideDelay": 100,
|
||||
"textStyle": {
|
||||
"fontSize": 14
|
||||
},
|
||||
"borderWidth": 0,
|
||||
"padding": 5
|
||||
},
|
||||
"title": [
|
||||
{
|
||||
"text": "\u5404\u79cd\u516c\u53f8\u89c4\u6a21\u6240\u5360\u6bd4\u4f8b",
|
||||
"left": "35%",
|
||||
"top": "3%",
|
||||
"padding": 5,
|
||||
"itemGap": 10,
|
||||
"textStyle": {
|
||||
"fontSize": 25
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
chart_150dd4869de6437c862a2539d079fb42.setOption(option_150dd4869de6437c862a2539d079fb42);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,20 @@
|
||||
import pandas as pd
|
||||
from pyecharts.charts import Pie
|
||||
from pyecharts import options as opts
|
||||
|
||||
data = pd.read_csv("最新数据.csv")
|
||||
d2 = data[['职位名称','公司规模']]
|
||||
d3 = d2.groupby('公司规模').count()
|
||||
gm_data = [i for i in zip(d3.index.tolist(),d3['职位名称'].tolist())]
|
||||
|
||||
pie = Pie()\
|
||||
.add("公司规模饼图",gm_data,radius=[0,"50%"],
|
||||
label_opts=opts.LabelOpts(formatter='{b}:{d}%'))\
|
||||
.set_global_opts(
|
||||
title_opts=opts.TitleOpts('各种公司规模所占比例',pos_left="35%",pos_top="3%",
|
||||
title_textstyle_opts=opts.TextStyleOpts(font_size=25)),
|
||||
legend_opts=opts.LegendOpts(orient="vertical",pos_left='10%',pos_top='18%')
|
||||
)\
|
||||
.set_colors(['#9fe080','#5c7bd9','#ffdc60','#ff7070','#7ed3fc','#8470FF'])
|
||||
|
||||
pie.render("公司规模饼图.html")
|
@ -0,0 +1,27 @@
|
||||
import matplotlib.pyplot as plt
|
||||
import pandas as pd
|
||||
|
||||
data = pd.read_csv("最新数据.csv")
|
||||
# 将工作经验这一列数据提取出来
|
||||
gzjy = data[["工作经验",'职位名称']]
|
||||
# 将工作经验去重后转化为列表变成x轴数据
|
||||
x_data = gzjy['工作经验'].drop_duplicates().tolist()
|
||||
|
||||
# 将工作经验进行分组计数变为y轴数据
|
||||
y_data = gzjy.groupby('工作经验').count().reset_index()
|
||||
y_data = y_data['职位名称'].tolist()
|
||||
y_data.sort(reverse=True)
|
||||
|
||||
plt.figure()
|
||||
plt.rcParams['font.sans-serif'] = ['SimHei']
|
||||
|
||||
plt.plot(x_data,y_data,'g^--')
|
||||
plt.xlabel('年份')
|
||||
plt.ylabel('数量')
|
||||
for i in range(len(x_data)):
|
||||
plt.text(x_data[i],y_data[i],y_data[i])
|
||||
|
||||
plt.title('求职所需要的工作经验排行')
|
||||
|
||||
plt.show()
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,17 @@
|
||||
import pandas as pd
|
||||
from pyecharts.charts import WordCloud
|
||||
from pyecharts import options as opts
|
||||
|
||||
data = pd.read_csv("最新数据.csv")
|
||||
hy = data[['职位名称','行业']]
|
||||
hangye = hy.groupby('行业').count()
|
||||
x_data = hangye.index.tolist()
|
||||
y_data = hangye['职位名称'].tolist()
|
||||
hy_data = [i for i in zip(x_data,y_data)]
|
||||
|
||||
# 绘制行业词云图
|
||||
wc = WordCloud()\
|
||||
.add(series_name="行业词云图",data_pair=hy_data)\
|
||||
.set_global_opts(title_opts=opts.TitleOpts('行业类型词云图',pos_left="45%",pos_top="7%"))
|
||||
|
||||
wc.render('行业词云图.html')
|
Loading…
Reference in new issue