程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Python Matplotlib data visualization case - generate histogram, pie chart (sector chart) and word cloud.

編輯:Python

at present python,spark,scala Very hot , So I used the crawler to get the recruitment information on Liepin , By contrast , There are still a lot of positions on Liepin ,3 Technology type in “python,spark,scala” As a key word , More than 10000 pieces of information have been crawled , The main information of crawling is : Corporate name , Job title , Salary , Address , Position information . Finally, the crawled data , A simple process was carried out , Visualizing .

Data acquisition

The writing method of crawler can be viewed https://blog.csdn.net/qq_36389249/article/details/87275723, Data crawling mainly uses selenium, Data is stored in a database

Data presentation

above 3 The figures represent ,python,Scala,saprk The number of jobs in the city is ' Beijing ', ' Shanghai ', ' Guangzhou ', ' Shenzhen ', ' nanjing ', ' Hangzhou ', ' Xi'an ', ' tianjin ', ' zhengzhou ', ' Chengdu ', ' Suzhou ' The proportion of , It can be seen intuitively in the sector , Most of them are concentrated in Beijing and Shanghai , All watchmen looking for jobs , If you want to have more opportunities , Think about .

This picture is in ' Beijing ', ' Shanghai ', ' Guangzhou ', ' Shenzhen ', ' nanjing ', ' Hangzhou ', ' Xi'an ', ' tianjin ', ' zhengzhou ', ' Chengdu ', ' Suzhou ' In these cities , The number of positions published on Liepin , A lot of them , As for the largest number of cities, Shanghai and Beijing .

And I did python,spark,scala The salary analysis of the three , First of all, yes python Analysis of salary ,

{' Face to face discussion ': 879, '18-36 ten thousand ': 140, '12-24 ten thousand ': 135, '12-18 ten thousand ': 128, '18-30 ten thousand ': 123, '24-48 ten thousand ': 80, '18-24 ten thousand ': 76, '10-18 ten thousand ': 66, '24-36 ten thousand ': 53, '20-39 ten thousand ': 37, '13-20 ten thousand ': 28, '18-54 ten thousand ': 28, '24-42 ten thousand ': 26, '36-60 ten thousand ': 26, '30-60 ten thousand ': 24, '21-35 ten thousand ': 23, '21-42 ten thousand ': 23, '20-33 ten thousand ': 22, '24-30 ten thousand ': 22, '26-52 ten thousand ': 22, '10-14 ten thousand ': 21, '14-24 ten thousand ': 20, '13-26 ten thousand ': 20, '7-10 ten thousand ': 18, '10-19 ten thousand ': 17, '30-42 ten thousand ': 17, '7-12 ten thousand ': 17, '21-28 ten thousand ': 16, '12-22 ten thousand ': 16, '10-12 ten thousand ': 16, '23-38 ten thousand ': 15, '14-29 ten thousand ': 15, '10-24 ten thousand ': 15, '5-7 ten thousand ': 15, '7-14 ten thousand ': 14, '14-21 ten thousand ': 14, '30-45 ten thousand ': 13, '14-22 ten thousand ': 13, '30-36 ten thousand ': 13, '30-53 ten thousand ': 12, '14-28 ten thousand ': 12, '20-26 ten thousand ': 12, '8-18 ten thousand ': 12, '28-56 ten thousand ': 12, '16-30 ten thousand ': 11, '8-17 ten thousand ': 10, '11-18 ten thousand ': 10, '22-36 ten thousand ': 10, '26-39 ten thousand ': 10, '36-48 ten thousand ': 10, '28-42 ten thousand ': 10, '12-19 ten thousand ': 10, '16-26 ten thousand ': 9, '13-39 ten thousand ': 9, '12-36 ten thousand ': 9, '30-48 ten thousand ': 9, '14-18 ten thousand ': 8, '10-17 ten thousand ': 8, '14-30 ten thousand ': 8, '42-78 ten thousand ': 8, '23-45 ten thousand ': 8, '36-72 ten thousand ': 8, '11-22 ten thousand ': 8, '22-58 ten thousand ': 8, '12-30 ten thousand ': 8, '7-18 ten thousand ': 7, '6-12 ten thousand ': 7, '6-10 ten thousand ': 7, '10-20 ten thousand ': 7, '35-70 ten thousand ': 7, '13-33 ten thousand ': 7, '33-65 ten thousand ': 7, '11-21 ten thousand ': 6, '19-24 ten thousand ': 6, '10-16 ten thousand ': 6, '7-11 ten thousand ': 6, '22-30 ten thousand ': 6, '14-19 ten thousand ': 6, '12-14 ten thousand ': 6, '24-40 ten thousand ': 6, '30-54 ten thousand ': 5, '5-10 ten thousand ': 5, '24-38 ten thousand ': 5, '12-17 ten thousand ': 5, '35-49 ten thousand ': 5, '8-24 ten thousand ': 5, '18-27 ten thousand ': 5, '39-65 ten thousand ': 5, '27-45 ten thousand ': 5, '48-84 ten thousand ': 5, '18-42 ten thousand ': 4, '42-54 ten thousand ': 4, '2-5 ten thousand ': 4, '16-24 ten thousand ': 4, '16-31 ten thousand ': 4, '18-34 ten thousand ': 4, '35-56 ten thousand ': 4, '33-52 ten thousand ': 4, '16-32 ten thousand ': 4, '11-17 ten thousand ': 4, '28-49 ten thousand ': 4, '18-26 ten thousand ': 4, '17-34 ten thousand ': 4, '4-5 ten thousand ': 4, '15-30 ten thousand ': 4, '21-29 ten thousand ': 4, '14-20 ten thousand ': 4, '16-20 ten thousand ': 4, '12-20 ten thousand ': 4, '17-28 ten thousand ': 4, '23-30 ten thousand ': 4, '19-40 ten thousand ': 4, '12-21 ten thousand ': 4, '10-22 ten thousand ': 4, '36-54 ten thousand ': 4, '45-60 ten thousand ': 4, '19-29 ten thousand ': 4, '16-23 ten thousand ': 3, '13-19 ten thousand ': 3, '26-46 ten thousand ': 3, '18-19 ten thousand ': 3, '19-38 ten thousand ': 3, '23-33 ten thousand ': 3, '10-13 ten thousand ': 3, '8-13 ten thousand ': 3, '8-14 ten thousand ': 3, '6-7 ten thousand ': 3, '8-11 ten thousand ': 3, '18-28 ten thousand ': 3, '13-21 ten thousand ': 3, '14-25 ten thousand ': 3, '45-90 ten thousand ': 3, '8-12 ten thousand ': 3, '16-22 ten thousand ': 3, '13-23 ten thousand ': 3, '8-16 ten thousand ': 3, '7-13 ten thousand ': 3, '14-26 ten thousand ': 3, '26-43 ten thousand ': 3, '48-72 ten thousand ': 3, '33-46 ten thousand ': 3, '29-38 ten thousand ': 3, '18-23 ten thousand ': 3, '11-13 ten thousand ': 3, '20-30 ten thousand ': 3, '27-40 ten thousand ': 3, '20-40 ten thousand ': 3, '13-14 ten thousand ': 3, '24-34 ten thousand ': 2, '12-16 ten thousand ': 2, '14-23 ten thousand ': 2, '33-59 ten thousand ': 2, '25-39 ten thousand ': 2, '34-48 ten thousand ': 2, '20-23 ten thousand ': 2, '48-80 ten thousand ': 2, '20-36 ten thousand ': 2, '11-16 ten thousand ': 2, '19-36 ten thousand ': 2, '14-17 ten thousand ': 2, '18-22 ten thousand ': 2, '17-25 ten thousand ': 2, '20-27 ten thousand ': 2, '26-59 ten thousand ': 2, '17-39 ten thousand ': 2, '32-48 ten thousand ': 2, '26-51 ten thousand ': 2, '22-28 ten thousand ': 2, '45-75 ten thousand ': 2, '12-25 ten thousand ': 2, '10-23 ten thousand ': 2, '21-39 ten thousand ': 2, '18-18 ten thousand ': 2, '65-104 ten thousand ': 2, '11-19 ten thousand ': 2, '4-6 ten thousand ': 2, '18-25 ten thousand ': 2, '9-16 ten thousand ': 2, '40-76 ten thousand ': 2, '39-52 ten thousand ': 2, '16-29 ten thousand ': 2, '22-32 ten thousand ': 2, '30-38 ten thousand ': 2, '42-48 ten thousand ': 2, '35-63 ten thousand ': 2, '41-60 ten thousand ': 2, '51-68 ten thousand ': 2, '5-8 ten thousand ': 2, '24-50 ten thousand ': 2, '20-50 ten thousand ': 2, '44-65 ten thousand ': 2, '19-26 ten thousand ': 2, '60-96 ten thousand ': 2, '24-35 ten thousand ': 2, '21-24 ten thousand ': 2, '15-23 ten thousand ': 2, '11-28 ten thousand ': 2, '27-54 ten thousand ': 2, '22-43 ten thousand ': 2, '27-42 ten thousand ': 2, '38-68 ten thousand ': 2, '20-60 ten thousand ': 2, '35-42 ten thousand ': 2, '28-39 ten thousand ': 1, '22-34 ten thousand ': 1, '17-33 ten thousand ': 1, '10-10 ten thousand ': 1, '25-42 ten thousand ': 1, '21-30 ten thousand ': 1, '38-75 ten thousand ': 1, '13-16 ten thousand ': 1, '2-3 ten thousand ': 1, '17-22 ten thousand ': 1, '17-24 ten thousand ': 1, '16-34 ten thousand ': 1, '16-18 ten thousand ': 1, '9-13 ten thousand ': 1, '21-33 ten thousand ': 1, '17-29 ten thousand ': 1, '23-53 ten thousand ': 1, '22-39 ten thousand ': 1, '14-35 ten thousand ': 1, '15-28 ten thousand ': 1, '42-63 ten thousand ': 1, '20-46 ten thousand ': 1, '22-24 ten thousand ': 1, '7-8 ten thousand ': 1, '54-108 ten thousand ': 1, '10-21 ten thousand ': 1, '25-49 ten thousand ': 1, '27-60 ten thousand ': 1, '11-14 ten thousand ': 1, '26-54 ten thousand ': 1, '10-11 ten thousand ': 1, '16-21 ten thousand ': 1, '27-63 ten thousand ': 1, '27-53 ten thousand ': 1, '18-29 ten thousand ': 1, '40-80 ten thousand ': 1, '20-20 ten thousand ': 1, '8-19 ten thousand ': 1, '5-11 ten thousand ': 1, '15-31 ten thousand ': 1, '16-40 ten thousand ': 1, '23-46 ten thousand ': 1, '13-25 ten thousand ': 1, '7-20 ten thousand ': 1, '6-14 ten thousand ': 1, '30-50 ten thousand ': 1, '22-26 ten thousand ': 1, '60-84 ten thousand ': 1, '13-22 ten thousand ': 1, '15-35 ten thousand ': 1, '17-35 ten thousand ': 1, '14-31 ten thousand ': 1, '48-64 ten thousand ': 1, '240-270 ten thousand ': 1, '42-60 ten thousand ': 1, '30-46 ten thousand ': 1, '19-30 ten thousand ': 1, '84-120 ten thousand ': 1, '24-32 ten thousand ': 1, '54-90 ten thousand ': 1, '36-46 ten thousand ': 1, '26-36 ten thousand ': 1, '26-65 ten thousand ': 1, '14-36 ten thousand ': 1, '24-26 ten thousand ': 1, '22-48 ten thousand ': 1, '36-66 ten thousand ': 1, '17-36 ten thousand ': 1, '52-78 ten thousand ': 1, '27-35 ten thousand ': 1, '18-48 ten thousand ': 1, '43-60 ten thousand ': 1, '42-84 ten thousand ': 1, '11-15 ten thousand ': 1, '26-33 ten thousand ': 1, '47-92 ten thousand ': 1, '42-49 ten thousand ': 1, '29-42 ten thousand ': 1, '30-41 ten thousand ': 1, '29-41 ten thousand ': 1, '30-43 ten thousand ': 1, '24-45 ten thousand ': 1, '72-108 ten thousand ': 1, '21-31 ten thousand ': 1, '40-50 ten thousand ': 1, '38-53 ten thousand ': 1, '23-29 ten thousand ': 1, '22-42 ten thousand ': 1, '65-91 ten thousand ': 1, '17-49 ten thousand ': 1, '53-98 ten thousand ': 1, '20-35 ten thousand ': 1, '27-33 ten thousand ': 1, '25-35 ten thousand ': 1, '104-143 ten thousand ': 1, '6-11 ten thousand ': 1, '46-65 ten thousand ': 1, '66-102 ten thousand ': 1, '17-21 ten thousand ': 1, '32-64 ten thousand ': 1, '36-42 ten thousand ': 1, '33-39 ten thousand ': 1, '9-12 ten thousand ': 1, '38-60 ten thousand ': 1, '18-35 ten thousand ': 1, '1-2 ten thousand ': 1, '13-18 ten thousand ': 1, '15-25 ten thousand ': 1}

sprak Salary analysis for :

{' Face to face discussion ': 624, '18-30 ten thousand ': 106, '18-36 ten thousand ': 85, '18-24 ten thousand ': 73, '24-48 ten thousand ': 69, '12-24 ten thousand ': 62, '24-36 ten thousand ': 47, '12-18 ten thousand ': 47, '36-60 ten thousand ': 38, '30-60 ten thousand ': 37, '24-42 ten thousand ': 32, '10-14 ten thousand ': 31, '14-35 ten thousand ': 29, '14-24 ten thousand ': 27, '10-18 ten thousand ': 26, '30-48 ten thousand ': 26, '20-33 ten thousand ': 24, '13-26 ten thousand ': 16, '30-42 ten thousand ': 15, '36-72 ten thousand ': 15, '36-48 ten thousand ': 15, '26-52 ten thousand ': 15, '6-10 ten thousand ': 14, '28-56 ten thousand ': 13, '21-35 ten thousand ': 13, '20-39 ten thousand ': 12, '21-42 ten thousand ': 12, '24-30 ten thousand ': 10, '42-70 ten thousand ': 10, '45-75 ten thousand ': 10, '10-19 ten thousand ': 10, '14-29 ten thousand ': 9, '26-39 ten thousand ': 9, '35-70 ten thousand ': 9, '18-35 ten thousand ': 9, '22-36 ten thousand ': 8, '52-78 ten thousand ': 8, '12-19 ten thousand ': 8, '22-30 ten thousand ': 8, '26-46 ten thousand ': 8, '28-49 ten thousand ': 8, '7-14 ten thousand ': 7, '36-54 ten thousand ': 7, '18-42 ten thousand ': 7, '30-53 ten thousand ': 7, '18-26 ten thousand ': 7, '16-31 ten thousand ': 7, '10-12 ten thousand ': 7, '39-78 ten thousand ': 6, '20-26 ten thousand ': 6, '54-90 ten thousand ': 6, '48-72 ten thousand ': 6, '84-120 ten thousand ': 6, '33-52 ten thousand ': 6, '39-65 ten thousand ': 6, '24-60 ten thousand ': 6, '13-33 ten thousand ': 6, '35-56 ten thousand ': 6, '20-31 ten thousand ': 6, '7-18 ten thousand ': 6, '23-45 ten thousand ': 5, '45-60 ten thousand ': 5, '16-26 ten thousand ': 5, '14-21 ten thousand ': 5, '10-22 ten thousand ': 5, '60-96 ten thousand ': 5, '13-21 ten thousand ': 5, '56-84 ten thousand ': 5, '45-90 ten thousand ': 5, '48-84 ten thousand ': 5, '11-18 ten thousand ': 5, '10-21 ten thousand ': 5, '1-2 ten thousand ': 5, '11-14 ten thousand ': 5, '22-42 ten thousand ': 5, '30-36 ten thousand ': 4, '33-46 ten thousand ': 4, '48-80 ten thousand ': 4, '14-22 ten thousand ': 4, '23-38 ten thousand ': 4, '30-45 ten thousand ': 4, '30-54 ten thousand ': 4, '72-108 ten thousand ': 4, '12-22 ten thousand ': 4, '60-105 ten thousand ': 4, '17-33 ten thousand ': 4, '2-4 ten thousand ': 4, '38-75 ten thousand ': 4, '42-78 ten thousand ': 4, '14-28 ten thousand ': 4, '8-17 ten thousand ': 4, '6-12 ten thousand ': 4, '30-50 ten thousand ': 4, '33-65 ten thousand ': 4, '23-52 ten thousand ': 4, '14-30 ten thousand ': 3, '36-42 ten thousand ': 3, '11-22 ten thousand ': 3, '20-42 ten thousand ': 3, '28-42 ten thousand ': 3, '12-29 ten thousand ': 3, '25-42 ten thousand ': 3, '65-104 ten thousand ': 3, '19-38 ten thousand ': 3, '20-29 ten thousand ': 3, '12-30 ten thousand ': 3, '21-29 ten thousand ': 3, '5-7 ten thousand ': 3, '14-26 ten thousand ': 3, '18-48 ten thousand ': 3, '16-24 ten thousand ': 3, '32-56 ten thousand ': 3, '42-54 ten thousand ': 3, '18-31 ten thousand ': 3, '22-43 ten thousand ': 3, '22-34 ten thousand ': 3, '34-67 ten thousand ': 3, '13-24 ten thousand ': 3, '42-72 ten thousand ': 3, '42-56 ten thousand ': 3, '23-39 ten thousand ': 3, '13-16 ten thousand ': 3, '60-72 ten thousand ': 3, '8-14 ten thousand ': 3, '33-59 ten thousand ': 3, '10-16 ten thousand ': 3, '13-23 ten thousand ': 3, '30-46 ten thousand ': 2, '19-30 ten thousand ': 2, '10-20 ten thousand ': 2, '19-26 ten thousand ': 2, '23-33 ten thousand ': 2, '22-31 ten thousand ': 2, '24-40 ten thousand ': 2, '16-23 ten thousand ': 2, '25-35 ten thousand ': 2, '60-84 ten thousand ': 2, '18-34 ten thousand ': 2, '104-143 ten thousand ': 2, '14-19 ten thousand ': 2, '12-17 ten thousand ': 2, '11-19 ten thousand ': 2, '49-70 ten thousand ': 2, '17-28 ten thousand ': 2, '19-22 ten thousand ': 2, '17-26 ten thousand ': 2, '16-30 ten thousand ': 2, '10-17 ten thousand ': 2, '11-21 ten thousand ': 2, '90-135 ten thousand ': 2, '32-64 ten thousand ': 2, '38-60 ten thousand ': 2, '13-39 ten thousand ': 2, '20-41 ten thousand ': 2, '5-10 ten thousand ': 2, '24-49 ten thousand ': 2, '23-46 ten thousand ': 2, '15-30 ten thousand ': 2, '9-18 ten thousand ': 2, '18-23 ten thousand ': 2, '15-22 ten thousand ': 2, '2-5 ten thousand ': 2, '26-38 ten thousand ': 2, '19-36 ten thousand ': 2, '5-6 ten thousand ': 2, '13-18 ten thousand ': 2, '27-53 ten thousand ': 2, '29-41 ten thousand ': 2, '6-8 ten thousand ': 2, '32-66 ten thousand ': 2, '17-32 ten thousand ': 2, '10-24 ten thousand ': 2, '7-10 ten thousand ': 2, '28-35 ten thousand ': 1, '16-21 ten thousand ': 1, '21-28 ten thousand ': 1, '7-20 ten thousand ': 1, '30-38 ten thousand ': 1, '4-6 ten thousand ': 1, '34-60 ten thousand ': 1, '38-45 ten thousand ': 1, '13-22 ten thousand ': 1, '36-46 ten thousand ': 1, '35-63 ten thousand ': 1, '39-46 ten thousand ': 1, '11-17 ten thousand ': 1, '8-10 ten thousand ': 1, '23-47 ten thousand ': 1, '23-60 ten thousand ': 1, '33-39 ten thousand ': 1, '12-20 ten thousand ': 1, '31-49 ten thousand ': 1, '34-55 ten thousand ': 1, '39-59 ten thousand ': 1, '60-90 ten thousand ': 1, '8-13 ten thousand ': 1, '120000-180000 ten thousand ': 1, '36-67 ten thousand ': 1, '26-29 ten thousand ': 1, '44-65 ten thousand ': 1, '19-50 ten thousand ': 1, '70-112 ten thousand ': 1, '52-91 ten thousand ': 1, '33-53 ten thousand ': 1, '49-91 ten thousand ': 1, '15-45 ten thousand ': 1, '29-35 ten thousand ': 1, '15-20 ten thousand ': 1, '68-113 ten thousand ': 1, '38-74 ten thousand ': 1, '10-29 ten thousand ': 1, '16-22 ten thousand ': 1, '20-30 ten thousand ': 1, '23-42 ten thousand ': 1, '17-34 ten thousand ': 1, '75-98 ten thousand ': 1, '36-52 ten thousand ': 1, '24-38 ten thousand ': 1, '20-46 ten thousand ': 1, '16-25 ten thousand ': 1, '17-35 ten thousand ': 1, '20-50 ten thousand ': 1, '16-18 ten thousand ': 1, '26-65 ten thousand ': 1, '12-36 ten thousand ': 1, '9-16 ten thousand ': 1, '42-48 ten thousand ': 1, '26-32 ten thousand ': 1, '23-30 ten thousand ': 1, '10-23 ten thousand ': 1, '39-52 ten thousand ': 1, '24-34 ten thousand ': 1, '38-53 ten thousand ': 1, '48-60 ten thousand ': 1, '17-24 ten thousand ': 1}

scala Salary analysis for :

{' Face to face discussion ': 649, '18-36 ten thousand ': 117, '24-48 ten thousand ': 102, '18-30 ten thousand ': 90, '12-18 ten thousand ': 55, '24-36 ten thousand ': 53, '12-24 ten thousand ': 50, '10-18 ten thousand ': 39, '18-24 ten thousand ': 37, '30-60 ten thousand ': 35, '36-60 ten thousand ': 29, '30-42 ten thousand ': 23, '24-42 ten thousand ': 22, '21-35 ten thousand ': 21, '30-48 ten thousand ': 20, '10-14 ten thousand ': 19, '23-45 ten thousand ': 17, '28-56 ten thousand ': 16, '22-36 ten thousand ': 16, '21-42 ten thousand ': 15, '16-30 ten thousand ': 15, '26-52 ten thousand ': 14, '36-72 ten thousand ': 14, '20-33 ten thousand ': 13, '20-39 ten thousand ': 13, '12-22 ten thousand ': 12, '10-12 ten thousand ': 11, '48-72 ten thousand ': 11, '36-54 ten thousand ': 11, '14-28 ten thousand ': 11, '7-14 ten thousand ': 10, '14-30 ten thousand ': 10, '30-36 ten thousand ': 10, '13-20 ten thousand ': 10, '30-54 ten thousand ': 9, '22-30 ten thousand ': 9, '24-60 ten thousand ': 9, '14-24 ten thousand ': 9, '13-26 ten thousand ': 8, '24-30 ten thousand ': 8, '28-49 ten thousand ': 8, '48-84 ten thousand ': 8, '28-42 ten thousand ': 7, '65-104 ten thousand ': 7, '33-65 ten thousand ': 7, '12-30 ten thousand ': 7, '10-19 ten thousand ': 7, '39-52 ten thousand ': 7, '19-30 ten thousand ': 7, '25-49 ten thousand ': 7, '21-49 ten thousand ': 6, '20-26 ten thousand ': 6, '14-29 ten thousand ': 6, '42-70 ten thousand ': 6, '42-84 ten thousand ': 6, '35-56 ten thousand ': 6, '17-33 ten thousand ': 5, '25-35 ten thousand ': 5, '36-48 ten thousand ': 5, '14-22 ten thousand ': 5, '38-60 ten thousand ': 5, '35-70 ten thousand ': 5, '18-48 ten thousand ': 5, '35-49 ten thousand ': 5, '39-65 ten thousand ': 4, '30-53 ten thousand ': 4, '22-34 ten thousand ': 4, '60-96 ten thousand ': 4, '12-36 ten thousand ': 4, '18-23 ten thousand ': 4, '18-35 ten thousand ': 4, '33-46 ten thousand ': 4, '14-21 ten thousand ': 4, '8-17 ten thousand ': 4, '38-75 ten thousand ': 4, '16-31 ten thousand ': 4, '10-24 ten thousand ': 4, '21-28 ten thousand ': 3, '52-78 ten thousand ': 3, '54-90 ten thousand ': 3, '19-50 ten thousand ': 3, '42-60 ten thousand ': 3, '14-35 ten thousand ': 3, '6-10 ten thousand ': 3, '45-75 ten thousand ': 3, '56-84 ten thousand ': 3, '39-78 ten thousand ': 3, '2-4 ten thousand ': 3, '16-24 ten thousand ': 3, '26-36 ten thousand ': 3, '16-26 ten thousand ': 3, '22-42 ten thousand ': 3, '26-46 ten thousand ': 3, '60-84 ten thousand ': 3, '8-12 ten thousand ': 3, '7-12 ten thousand ': 3, '56-98 ten thousand ': 3, '48-56 ten thousand ': 3, '20-36 ten thousand ': 3, '14-25 ten thousand ': 3, '38-53 ten thousand ': 3, '24-41 ten thousand ': 3, '12-19 ten thousand ': 3, '18-26 ten thousand ': 2, '42-72 ten thousand ': 2, '17-25 ten thousand ': 2, '18-25 ten thousand ': 2, '13-21 ten thousand ': 2, '42-78 ten thousand ': 2, '11-21 ten thousand ': 2, '16-32 ten thousand ': 2, '7-10 ten thousand ': 2, '72-108 ten thousand ': 2, '16-22 ten thousand ': 2, '9-16 ten thousand ': 2, '26-39 ten thousand ': 2, '42-56 ten thousand ': 2, '20-29 ten thousand ': 2, '32-64 ten thousand ': 2, '23-39 ten thousand ': 2, '23-38 ten thousand ': 2, '18-42 ten thousand ': 2, '24-34 ten thousand ': 2, '29-58 ten thousand ': 2, '8-14 ten thousand ': 2, '19-36 ten thousand ': 2, '22-43 ten thousand ': 2, '15-30 ten thousand ': 2, '19-42 ten thousand ': 2, '12-14 ten thousand ': 2, '10-17 ten thousand ': 2, '26-51 ten thousand ': 2, '60-105 ten thousand ': 2, '60-72 ten thousand ': 2, '30-38 ten thousand ': 2, '20-28 ten thousand ': 2, '45-90 ten thousand ': 2, '10-13 ten thousand ': 2, '17-24 ten thousand ': 2, '30-40 ten thousand ': 2, '28-36 ten thousand ': 2, '54-108 ten thousand ': 2, '10-16 ten thousand ': 2, '42-80 ten thousand ': 2, '27-53 ten thousand ': 2, '11-22 ten thousand ': 2, '10-20 ten thousand ': 2, '72-96 ten thousand ': 2, '48-54 ten thousand ': 2, '18-28 ten thousand ': 2, '40-80 ten thousand ': 2, '12-29 ten thousand ': 2, '60-90 ten thousand ': 2, '48-80 ten thousand ': 1, '15-22 ten thousand ': 1, '46-78 ten thousand ': 1, '108-132 ten thousand ': 1, '13-22 ten thousand ': 1, '36-66 ten thousand ': 1, '17-26 ten thousand ': 1, '26-29 ten thousand ': 1, '11-28 ten thousand ': 1, '16-23 ten thousand ': 1, '27-45 ten thousand ': 1, '25-42 ten thousand ': 1, '32-44 ten thousand ': 1, '58-72 ten thousand ': 1, '2-5 ten thousand ': 1, '5-6 ten thousand ': 1, '8-13 ten thousand ': 1, '40-64 ten thousand ': 1, '11-14 ten thousand ': 1, '16-21 ten thousand ': 1, '17-30 ten thousand ': 1, '20-52 ten thousand ': 1, '28-63 ten thousand ': 1, '30-43 ten thousand ': 1, '20-60 ten thousand ': 1, '30-68 ten thousand ': 1, '20-38 ten thousand ': 1, '84-112 ten thousand ': 1, '23-46 ten thousand ': 1, '33-52 ten thousand ': 1, '34-48 ten thousand ': 1, '29-45 ten thousand ': 1, '22-39 ten thousand ': 1, '64-112 ten thousand ': 1, '13-24 ten thousand ': 1, '17-28 ten thousand ': 1, '19-26 ten thousand ': 1, '21-29 ten thousand ': 1, '17-23 ten thousand ': 1, '48-96 ten thousand ': 1, '8-18 ten thousand ': 1, '7-13 ten thousand ': 1, '12-23 ten thousand ': 1, '6-8 ten thousand ': 1, '46-65 ten thousand ': 1, '30-45 ten thousand ': 1, '64-96 ten thousand ': 1, '42-66 ten thousand ': 1, '22-29 ten thousand ': 1, '56-88 ten thousand ': 1, '21-56 ten thousand ': 1, '18-18 ten thousand ': 1, '20-42 ten thousand ': 1, '31-48 ten thousand ': 1, '39-70 ten thousand ': 1, '45-99 ten thousand ': 1, '28-70 ten thousand ': 1, '24-32 ten thousand ': 1, '15-23 ten thousand ': 1, '29-48 ten thousand ': 1, '17-34 ten thousand ': 1, '29-63 ten thousand ': 1, '24-38 ten thousand ': 1, '17-27 ten thousand ': 1, '42-48 ten thousand ': 1, '12-20 ten thousand ': 1, '59-78 ten thousand ': 1, '14-26 ten thousand ': 1, '32-48 ten thousand ': 1, '31-50 ten thousand ': 1, '75-120 ten thousand ': 1, '13-23 ten thousand ': 1, '42-49 ten thousand ': 1, '54-78 ten thousand ': 1, '36-42 ten thousand ': 1, '4-6 ten thousand ': 1, '28-50 ten thousand ': 1, '26-65 ten thousand ': 1, '45-68 ten thousand ': 1, '49-70 ten thousand ': 1, '4-7 ten thousand ': 1, '11-18 ten thousand ': 1, '43-68 ten thousand ': 1, '5-7 ten thousand ': 1, '23-29 ten thousand ': 1, '22-56 ten thousand ': 1, '12-17 ten thousand ': 1, '10-22 ten thousand ': 1, '4-4 ten thousand ': 1, '56-75 ten thousand ': 1, '38-45 ten thousand ': 1, '4-10 ten thousand ': 1, '13-33 ten thousand ': 1, '23-33 ten thousand ': 1, '34-38 ten thousand ': 1, '18-34 ten thousand ': 1, '19-38 ten thousand ': 1, '22-32 ten thousand ': 1}

You can see that the salary level is really terrible .....(4000 I'm shivering )...

This salary is not easy to get , Take a look at the word cloud about position information .

3 The word cloud pictures are python,spark,scala Of , It can be seen that development experience is very important , It's not hard to find out , Actually 3-5 The old man is the old man . So I'd better move the bricks safely

while(1):
print(" Work requires experience ")
print(" job-hunting ")
if(" You have money "):
break
print(" I wake up ")

 

introduce , The above data visualization methods mainly use matplotlib The library of . As for the word cloud , That's simple , It is not difficult to make this chart , It is mainly the application of other people's library . It all works python Standing on the shoulders of giants , I found myself standing on my shoulder , I'm on the giant's ankle .


from collections import Counter
import pymysql
import re
from decimal import Decimal
import matplotlib.pyplot as plt
from matplotlib.gridspec import GridSpec
from matplotlib import collections, colors, transforms
from matplotlib.ticker import MultipleLocator,FormatStrFormatter
import numpy as np
import pandas as pd
import time# Because many pictures show that sleep has been added , Convenient data observation
import random
from pylab import *
global my_address
my_address = [' Beijing ', ' Shanghai ', ' Guangzhou ', ' Shenzhen ', ' nanjing ', ' Hangzhou ', ' Xi'an ', ' tianjin ', ' zhengzhou ', ' Chengdu ', ' Suzhou ']
def link_mysql():
config = {
'host':'127.0.0.1',
'user':'root',
'passwd':'1995104',
'port':8080,
'db':'lp',
'charset':'utf8',
}
# Connect to the database
conn = pymysql.connect(**config)
# To obtain the cursor
cur = conn.cursor()
# The main contents of data reading are regions .
sql = "select address from python;"
global python_address
cur.execute(sql)
python_address = cur.fetchall()
sql = "select address from spark;"
global spark_address
cur.execute(sql)
spark_address = cur.fetchall()
# print(spark_address)
sql = "select address from scala;"
global scala_address
cur.execute(sql)
scala_address = cur.fetchall()
# print(scala_address)
# Read data to get salary column data
sql = 'select salary from python;'
global python_salary
cur.execute(sql)
python_salary = cur.fetchall()
sql = 'select salary from scala;'
global scala_salary
cur.execute(sql)
scala_salary = cur.fetchall()
sql = 'select salary from spark;'
global spark_salary
cur.execute(sql)
spark_salary = cur.fetchall()
# print(python_salary)
# print(scala_salary)
# print(spark_salary)
# Get the salary status in the region , It should be that most of the city data are distributed in Beijing Shanghai Shenzhen Guangzhou Hangzhou .
global python_address_salary
# Get all the salary data
python_address_salary = {' Beijing ':[], ' Shanghai ':[], ' Guangzhou ':[], ' Shenzhen ':[],
' nanjing ':[], ' Hangzhou ':[], ' Xi'an ':[], ' tianjin ':[],
' zhengzhou ':[], ' Chengdu ':[], ' Suzhou ':[]}
sql = 'select * from python limit {},1;'
for i in range(0,len(python_address)):
cur.execute(sql.format(str(i)))
address_ = cur.fetchall()[0][3]
# Use regular expressions to get regions
address_ = re.findall('[\u4e00-\u9fa5]*',address_)
# print(address)
cur.execute(sql.format(str(i)))
salary = cur.fetchall()[0][4]
# print(salary)
# address = re.findall('[\u4e00-\u9fa5]*',address)
# Get the salary content of the corresponding region
for j in range(0,len(my_address)):
if address_[0] == my_address[j]:
python_address_salary[my_address[j]].append(salary)
# print(python_address_salary)
#scala Data content of
global scala_address_salary
scala_address_salary = {' Beijing ': [], ' Shanghai ': [], ' Guangzhou ': [], ' Shenzhen ': [],
' nanjing ': [], ' Hangzhou ': [], ' Xi'an ': [], ' tianjin ': [],
' zhengzhou ': [], ' Chengdu ': [], ' Suzhou ': []}
sql = 'select * from scala limit {},1;'
for i in range(0, len(scala_address)):
cur.execute(sql.format(str(i)))
# Get address data through regular expressions
address_ = cur.fetchall()[0][3]
address_ = re.findall('[\u4e00-\u9fa5]*', address_)
# print(address)
cur.execute(sql.format(str(i)))
salary = cur.fetchall()[0][4]
# print(salary)
# address = re.findall('[\u4e00-\u9fa5]*',address)
for j in range(0,len(my_address)):
if address_[0] == my_address[j]:
scala_address_salary[my_address[j]].append(salary)
# print(scala_address_salary)
#spark Data display of
global spark_address_salary
spark_address_salary = {' Beijing ': [], ' Shanghai ': [], ' Guangzhou ': [], ' Shenzhen ': [],
' nanjing ': [], ' Hangzhou ': [], ' Xi'an ': [], ' tianjin ': [],
' zhengzhou ': [], ' Chengdu ': [], ' Suzhou ': []}
sql = 'select * from spark limit {},1;'
for i in range(0, len(spark_address)):
cur.execute(sql.format(str(i)))
address_ = cur.fetchall()[0][3]
address_ = re.findall('[\u4e00-\u9fa5]*', address_)
# print(address)
cur.execute(sql.format(str(i)))
salary = cur.fetchall()[0][4]
# address = re.findall('[\u4e00-\u9fa5]*',address)
for j in range(0,len(my_address)):
if address_[0] == my_address[j]:
spark_address_salary[my_address[j]].append(salary)
# print(spark_address_salary)
cur.close()
conn.close()
def get_address():
global scala_add
add = []
str_my = ''
# analysis scala The principal employment address of
for scala in scala_address:
scala = re.match('[\u4e00-\u9fa5]+',scala[0])
add.append(scala)
for m_scala in add:
if m_scala is not None:
# print(m_scala.group())
str_my = str_my+m_scala.group(0)+'\n'
# print(str_my)
new_txt = re.split('\W+',str_my)
result = Counter(new_txt)
global result_scala_address
result_scala_address = result.most_common(len(scala_address))
# print(result_scala_address)
str_my_b = ''
add.clear()
# analysis python The address of
for python in python_address:
python = re.match('[\u4e00-\u9fa5]+',python[0])
add.append(python)
for m_python in add:
if m_python is not None:
str_my_b = str_my_b+m_python.group(0)+'\n'
new_txt = re.split('\W+',str_my_b)
result = Counter(new_txt)
global result_python_address
result_python_address = result.most_common(len(python_address))
# print(result_python_address)
str_my_a = ''
add.clear()
# analysis spark Main address of
for spark in spark_address:
spark = re.match('[\u4e00-\u9fa5]+',spark[0])
add.append(spark)
for m_spark in add:
if m_spark is not None:
str_my_a = str_my_a+m_spark.group(0)+'\n'
new_txt = re.split('\W+',str_my_a)
result = Counter(new_txt)
global result_spark_address
result_spark_address = result.most_common(len(spark_address))
# print(result_spark_address)
# b = 0
# for a in result_python_address:
# b = a[1]+b
# print(b)
# Get percentage Percentage has been achieved when plotting the pie chart , Note redundant programs
# global n_python,address
# n_python = []
# address = []
# for result in result_python_address:
# n_python.append(float(Decimal(result[1]/len(python_address)).quantize(Decimal('0.000'))))
# address.append(result[0])
# n_python = dict(zip(address,n_python))
# # print(n_python)
#
# address.clear()
# global n_scala
# n_scala = []
# for result in result_scala_address:
# n_scala.append(float(Decimal(result[1]/len(scala_address)).quantize(Decimal('0.000'))))
# address.append(result[0])
# n_scala = dict(zip(address,n_scala))
# # print(n_scala)
#
# address.clear()
# global n_spark
# n_spark = []
# for result in result_spark_address:
# n_spark.append(float(Decimal(result[1]/len(spark_address)).quantize(Decimal('0.000'))))
# address.append(result[0])
# n_spark = dict(zip(address,n_spark))
# print(n_spark)
# Get paid
def get_salary():
str_ = ''
global result_python_salary
for python in python_salary:
str_ = str_+python[0].replace(' ten thousand ','')+' '
str_.replace(' ten thousand ', ' ')
result_python_salary = str_
str_ = ''
global result_scala_salary
for scala in scala_salary:
str_ = str_+scala[0].replace(' ten thousand ','')+' '
str_.replace(' ten thousand ', ' ')
result_scala_salary = str_
str_ = ''
global result_spark_salary
for spark in spark_salary:
str_ = str_+spark[0].replace(' ten thousand ','')+' '
str_.replace(' Face to face discussion ','')
result_spark_salary = str_
new_txt = re.split(' ',result_python_salary)
result = Counter(new_txt)
result_python_salary = result.most_common(len(result_python_salary))
new_txt = re.split(' ', result_scala_salary)
result = Counter(new_txt)
result_scala_salary = result.most_common(len(result_scala_salary))
new_txt = re.split(' ', result_spark_salary)
result = Counter(new_txt)
result_spark_salary = result.most_common(len(result_spark_salary))
result1 = []
result2 = []
for result in result_python_salary:
if result[0] == "":
continue
else:
if (result[0] != ' Face to face discussion '):
result1.append(result[0] + ' ten thousand ')
else:
result1.append(result[0])
result2.append(result[1])
result_python_salary = dict(zip(result1,result2))
result1 = []
result2 = []
for result in result_scala_salary:
if result[0] == "":
continue
else:
if (result[0] != ' Face to face discussion '):
result1.append(result[0] + ' ten thousand ')
else:
result1.append(result[0])
result2.append(result[1])
result_scala_salary = dict(zip(result1,result2))
result1 = []
result2 = []
for result in result_spark_salary:
if result[0] == "":
continue
else:
if(result[0] != ' Face to face discussion '):
result1.append(result[0]+' ten thousand ')
else:
result1.append(result[0])
result2.append(result[1])
result_spark_salary = dict(zip(result1,result2))
# The data represents the quantity of various types of wages
print(result_python_salary)
print(result_scala_salary)
print(result_spark_salary)
# #
# print(len(result_python_salary))
# print(len(result_scala_salary))
# print(len(result_spark_salary))
def bar_show():
global x1# The number of jobs in each city
x1 = [1]*len(my_address)
plt.rcParams['font.sans-serif'] = ['SimHei'] # Used to display Chinese characters
plt.rcParams['axes.unicode_minus'] = False # Used to display a minus sign
# Draw default drawing
plt.figure(1)# Create a chart
plt.figure(2)# Create a chart
plt.figure(3)# Create a chart
plt.subplots_adjust(hspace=2)
ax1 = plt.subplot(3,1,1)
ax2 = plt.subplot(3,1,2)
ax3 = plt.subplot(3,1,3)
# Get city name and number
for result in result_python_address:
for i in range(0,len(my_address)-1):
if(result[0] == my_address[i]):
x1[i] = result[1]# Get the position data in the city
# plt.figure(figsize=(10,8))
#x,y The label setting of
plt.figure(1)
plt.sca(ax1)
ax1.spines['top'].set_visible(False)
ax1.spines['right'].set_visible(False)
plt.xlabel(' The city name ')
plt.ylabel('python Number of positions / individual ')
plt.xticks(rotation=90,)
# plt.yticks(np.random.randint(0,max(x1),800))
plt.ylim((0,max(x1)+100))
plt.yticks(np.arange(0,max(x1)+100,500))
plt.legend()
plt.bar(my_address,x1,color='Red')
# plt.plot(address, x1)
autolabe(my_address,x1)
# plt.savefig('python.jpg')
global x2
x2 = [1]*len(my_address)
plt.figure(2)
plt.sca(ax2)
ax2.spines['top'].set_visible(False)
ax2.spines['right'].set_visible(False)
for result in result_scala_address:
for i in range(0,len(my_address)-1):
if(result[0] == my_address[i]):
x2[i] = result[1]# Get the position data in the city
plt.xlabel(' The city name ')
plt.ylabel('scala Number of positions / individual ')
plt.xticks(rotation=90,)
# plt.yticks(np.random.randint(0, max(x2), 800))
plt.ylim((0,max(x2)+100))
plt.yticks(np.arange(0,max(x2)+100,200))
plt.legend()
plt.bar(my_address,x2,color='GREEN')
# plt.plot(address,x2)
autolabe(my_address,x2)
# plt.savefig('scala.jpg')
global x3
x3 = [1]*len(my_address)
plt.figure(3)
plt.sca(ax3)
ax3.spines['top'].set_visible(False)
ax3.spines['right'].set_visible(False)
for result in result_spark_address:
for i in range(0,len(my_address)-1):
if(result[0] == my_address[i]):
x3[i] = result[1]# Get the position data in the city
# x = x1+x2+x3
# x = {}.fromkeys(x).keys()
# print(len(x))
plt.xlabel(' The city name ')
plt.ylabel('spark Number of positions / individual ')
plt.xticks(rotation=90,)
# plt.yticks(np.random.randint(0, max(x3), 800))
plt.ylim((0,max(x3)+100))
plt.yticks(np.arange(0,max(x3)+100,200))
plt.legend()
plt.bar(my_address,x3,color='BLUE')
# plt.plot(address, x3)
autolabe(my_address,x3)
plt.savefig('resulte_address.jpg')
plt.show()
def pie1_show():
# grids = GridSpec(3,1)
plt.figure(1,figsize=(8,12))# Create a chart
# plt.figure(2)# Create a chart
# plt.figure(3)# Create a chart
ax = plt.subplot()
plt.subplots_adjust(hspace=2)
plt.rcParams['font.sans-serif'] = ['SimHei'] # Used to display Chinese characters
plt.rcParams['axes.unicode_minus'] = False # Used to display a minus sign
plt.pie(x=x1, # The drawing data
labels=my_address, # Add tags
autopct='%.1f%%', # Set the percentage format , I'm going to keep a decimal here
pctdistance=0.8, # Sets the distance of the percentage label from the center of the circle
labeldistance=1.15, # Set the distance between the label and the center of the circle
startangle=180, # Set the initial Angle of the pie chart
radius=80, # Set the radius of the pie chart
counterclock=False, # counterclockwise , I'm going to go clockwise here
wedgeprops={'linewidth': 1, 'edgecolor': 'black'}, # Sets the property values for the inner and outer boundaries of the pie chart
textprops={'fontsize': 15, 'color': 'w'}, # Sets the property value of the text label
center=(0, 0), # Set the origin of the pie chart
frame=1) # Whether to display the pie box , I'm going to set the display
plt.axis('equal')
plt.legend(loc='upper left')
# plt.axis('off') # One line of code to remove the coordinate axis
ax.spines['top'].set_visible(False)
ax.spines['left'].set_visible(False)
ax.spines['right'].set_visible(False)
ax.spines['bottom'].set_visible(False)
plt.xticks([])
plt.yticks([])
plt.title('Python The proportion of jobs held by each city ',fontsize=20)
plt.savefig('pie1.jpg')
plt.show()
time.sleep(4)
def pie2_show():
plt.figure(1, figsize=(8, 12)) # Create a chart
ax = plt.subplot()
plt.subplots_adjust(hspace=2)
plt.rcParams['font.sans-serif'] = ['SimHei'] # Used to display Chinese characters
plt.rcParams['axes.unicode_minus'] = False # Used to display a minus sign
# plt.pie(x2,labels=address,autopct='%1.0f%%',startangle=90,textprops={'fontsize':8,'color':'w'},
# pctdistance= 0.9,radius=0.8,center=(0.5,0.5))
# control x Axis and y The scope of the shaft
plt.pie(x=x2, # The drawing data
labels=my_address, # Add tags
autopct='%.1f%%', # Set the percentage format , I'm going to keep a decimal here
pctdistance=0.8, # Sets the distance of the percentage label from the center of the circle
labeldistance=1.15, # Set the distance between the label and the center of the circle
startangle=180, # Set the initial Angle of the pie chart
radius=80, # Set the radius of the pie chart
counterclock=False, # counterclockwise , I'm going to go clockwise here
wedgeprops={'linewidth': 1, 'edgecolor': 'black'}, # Sets the property values for the inner and outer boundaries of the pie chart
textprops={'fontsize': 15, 'color': 'w'}, # Sets the property value of the text label
center=(0, 0), # Set the origin of the pie chart
frame=1) # Whether to display the pie box , I'm going to set the display
plt.axis('equal')
plt.legend(loc='upper left')
ax.spines['top'].set_visible(False)
ax.spines['left'].set_visible(False)
ax.spines['right'].set_visible(False)
ax.spines['bottom'].set_visible(False)
plt.xticks([])
plt.yticks([])
plt.title('Scala The proportion of jobs held by each city ',fontsize=20)
plt.savefig('pie2.jpg')
plt.show()
time.sleep(4)
def pie3_show():
plt.figure(1, figsize=(8, 12)) # Create a chart
plt.subplots_adjust(hspace=2)
ax = plt.subplot()
plt.rcParams['font.sans-serif'] = ['SimHei'] # Used to display Chinese characters
plt.rcParams['axes.unicode_minus'] = False # Used to display a minus sign
plt.pie(x=x3, # The drawing data
labels=my_address, # Add tags
autopct='%.1f%%', # Set the percentage format , I'm going to keep a decimal here
pctdistance=0.8, # Sets the distance of the percentage label from the center of the circle
labeldistance=1.15, # Set the distance between the label and the center of the circle
startangle=180, # Set the initial Angle of the pie chart
radius=80, # Set the radius of the pie chart
counterclock=False, # counterclockwise , I'm going to go clockwise here
wedgeprops={'linewidth': 1, 'edgecolor': 'black'}, # Sets the property values for the inner and outer boundaries of the pie chart
textprops={'fontsize': 15, 'color': 'w'}, # Sets the property value of the text label
center=(0, 0), # Set the origin of the pie chart
frame=1) # Whether to display the pie box , I'm going to set the display
plt.axis('equal')
plt.legend(loc='upper left')
# Remove the lines around the coordinates
ax.spines['top'].set_visible(False)
ax.spines['left'].set_visible(False)
ax.spines['right'].set_visible(False)
ax.spines['bottom'].set_visible(False)
plt.xticks([])
plt.yticks([])
plt.title('Spark The proportion of jobs held by each city ',fontsize=20)
plt.savefig('pie3.jpg')
plt.show()
# Set data on display column
def autolabe(x,y):
for _x, _y in zip(x, y):
plt.text(_x, _y, '%d' % _y,
ha='center', va='bottom', size=8
)
def bar_python():
# plt.figure(figsize=(19,13))
fig,ax = plt.subplots()
plt.rcParams['font.sans-serif'] = ['SimHei'] # Used to display Chinese characters
plt.rcParams['axes.unicode_minus'] = False # Used to display a minus sign
# obtain Python Number of salaries in
salary = [salary for salary in result_python_salary.values()]
my_type = [my_type for my_type in result_python_salary.keys()]
# y_pos = np.arange(len(my_type))
# perfomance = 3+10*np.random.rand(len(my_type))
# error = np.random.rand(len(my_type))
# ax.tick_params(which=len(my_type))
ax.tick_params(axis = "y",width = (max(salary)+20),pad = 3)# Set the axis width
ax.tick_params(axis = "x",width = (len(my_type)+20),pad = 3) # Set the axis height
# ax.barh(y_pos,perfomance,xerr=error,align='center',color="BLUE",ecolor='GREEN')
# ax.set_yticks(y_pos)
# ax.set_yticklabels(my_type)
# ax.invert_yaxis()
plt.ylim(0,(max(salary)+20))
# plt.xlim(0,20)
plt.xticks(rotation=90,)
# autolabe(my_type,salary)
ax.plot(my_type,salary,'o')
for label in ax.get_xticklabels():
label.set_visible(False)
for label in ax.get_xticklabels()[::20]:
label.set_visible(True)
# plt.savefig("{}.jpg".format(date), dpi=500)
plt.savefig("python_bar.jpg",dpi=500)
plt.show()
if __name__ == '__main__':
link_mysql()
get_address()
get_salary()
bar_show()
pie1_show()
pie2_show()
pie3_show()
bar_python()

 

 


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved