Analyzing the BI Engineer Job Market on Zhaopin.com with Python and FineBI
This article demonstrates how to scrape BI engineer job listings from Zhaopin.com using Python, clean and enrich the data, and create visual analytics with FineBI to reveal salary trends, city distribution, experience levels, and education requirements in the Chinese job market.
The author, a data analyst with two years of experience, explores career prospects for BI engineers by collecting job posting data from Zhaopin.com. Using Python, the script fetches 30 pages of JSON data, extracting fields such as job name, company, salary, city, industry, education, and experience, and saves them to a CSV file.
import requests
import json
import csv
from urllib.parse import urlencode
import time
def saveHtml(file_name, file_content):
with open(file_name.replace('/', '_') + '.html', 'wb') as f:
f.write(file_content)
def GetData(url, writer):
response = requests.get(url)
data = response.content
saveHtml('zlzp', data)
jsondata = json.loads(data)
dataList = jsondata['data']['results']
for dic in dataList:
jobName = dic['jobName']
company = dic['company']['name']
salary = dic['salary']
city = dic['city']['display']
jobtype = dic['jobType']['display']
eduLevel = dic['eduLevel']['name']
workingExp = dic['workingExp']['name']
writer.writerow([jobName, company, salary, city, jobtype, eduLevel, workingExp])
param = {
'start': 0,
'pageSize': 60,
'cityId': 489,
'workExperience': -1,
'education': -1,
'companyType': -1,
'employmentType': -1,
'jobWelfareTag': -1,
'kw': 'BI工程师',
'kt': 3,
'lastUrlQuery': {"p": 1, "pageSize": "60", "jl": "681", "kw": "python", "kt": "3"}
}
pages = range(1, 31)
out_f = open('test.csv', 'w', newline='')
writer = csv.writer(out_f)
writer.writerow(['jobName','company','salary','city','jobtype','eduLevel','workingExp'])
for p in pages:
param['start'] = (p-1)*60
param['lastUrlQuery']['p'] = p
url = 'https://fe-api.zhaopin.com/c/i/sou?' + urlencode(param)
GetData(url, writer)
time.sleep(3)
print(p)
out_f.close()After obtaining 1,800 records, the data is imported into FineBI where the author performs cleaning steps: splitting salary ranges into numeric lower and upper bounds, filtering out irrelevant positions (e.g., BIM engineers), calculating average salaries, and extracting the city name from combined city‑district strings.
The cleaned dataset is then visualized in FineBI. The author creates charts showing average salary and job count per city, salary distribution by experience, and education level impact, using drag‑and‑drop field assignments and automatic chart recommendations.
Key findings include an overall average BI engineer salary of 13.46K, higher salaries in Shenzhen, Shanghai, and Beijing, senior engineers (5‑10 years) earning above 20K, and most demand concentrated in major Tier‑1 cities. The analysis concludes with a quick 15‑minute workflow to produce a comprehensive BI engineer job market report.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Python Programming Learning Circle
A global community of Chinese Python developers offering technical articles, columns, original video tutorials, and problem sets. Topics include web full‑stack development, web scraping, data analysis, natural language processing, image processing, machine learning, automated testing, DevOps automation, and big data.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
