Open source: Suzhou tourism strategy based on pyecharts visual analysis

TechWeb 2021-09-15 04:52:23

 

Hello everyone , I am a Peter~

The national tourist cities are finally renewed ! I have written about Xiamen before 、 Changsha 、 Chengdu 、 Xi'an 、 dalian . Today brings with it : Above there is heaven , Below there are suzhou and hangzhou : Here comes Suzhou ?? Finally, I managed to find time to finish the introduction of Suzhou's tourist attractions and delicious food .

Many years ago Peter I visited Suzhou once , So I still have some impression . I still remember several scenic spots I went to : Watch the front street 、 lingering Garden 、 Suzhou museum ……

Personally, I think Suzhou is a very good city , It is really the representative of Jiangnan City . Arrive at Suzhou station , See the Suzhou moat , River Street is next to ; Go into the city , The house has low eaves , White wall tiles , Old street gardens can be seen everywhere ; See all kinds of gardens and historic sites , It has a strong sense of history ; Hear the locals , Gentle and elegant , In a whisper .

I will visit Suzhou again sometime in the future ~

Suzhou

Suzhou is a highly developed area in China , It is the economic center of Jiangsu Province 、 Industrial, commercial and logistics center city , It is also an important financial 、 Culture 、 art 、 Education and transportation center . The following picture is from Wikipedia , You can see several county-level cities and districts that make up Suzhou . Consolidate your geography ~

Data sources

There are two data in this paper : Suzhou cuisine and Suzhou attractions . Data is obtained by crawling , At the end of the paper, there is a way to obtain the source code of data analysis .

Solemnly declare : The data in this paper is only used for data analysis and visualization , Not used for other purposes ; If there is a reprint , Please indicate the source ~

Data effects

We take the data analysis of Suzhou scenic spots as a display . The highlight of this article is that all graphics use the visualization Library :pyecharts, This is a domestic visualization Library

Suzhou scenic spots

The data analysis of Suzhou scenic spots is mainly carried out from the following aspects :

Import library import pandas as pd import re  #  Show all columns  # pd.set_option('display.max_columns', None)  #  Show all lines  # pd.set_option('display.max_rows', None)  #  Set up value The display length of is 100, The default is 50 # pd.set_option('max_colwidth',100)  #  Drawing related  import jieba import matplotlib.pyplot as plt from pyecharts.globals import CurrentConfig, OnlineHostType   #  Import in advance , To avoid not drawing  from pyecharts import options as opts  #  Configuration item  from pyecharts.charts import Bar, Pie, Line, Funnel, WordCloud, Grid, Page  #  Classes of each graph  from pyecharts.commons.utils import JsCode    from pyecharts.globals import ThemeType,SymbolType 

Omit the relevant data import and data exploration sections , The point is to look at the results of data analysis . Suzhou scenic spot data has 2000*8

Distribution of scenic spots

The number of scenic spots in Suzhou displayed here :

c = (     Pie(init_opts=opts.InitOpts(theme=ThemeType.CHALK))     .add("", [list(z) for z in zip(df2["location"].tolist(), df2["number"].tolist())])     .set_global_opts(title_opts=opts.TitleOpts(title=" The distribution of scenic spots in Suzhou "),                     legend_opts=opts.LegendOpts(pos_left="80%", orient="vertical"))     .set_series_opts(label_opts=opts.LabelOpts(formatter="{b}: {c}")) )  c.render_notebook() 

Before the introduction 10 Famous scenic spots

Many scenic spots have tourists write Raiders , We can take the number of Raiders as a reference :

Number of reviews of scenic spots

Percentage of donkey friends

The percentage of donkey friends indicates how many tourists have been to the same scenic spot :

Garden City

Suzhou is a garden city , We can see from the data : The data obtained this time include 457 And “ garden ” Related attractions . The more famous is :

Humble Administrator's garden lingering Garden Garden of the Master of Nets

Ancient city streets

Suzhou is also a city with a strong sense of history , The data shows 106 This street :

Shantang Street Pingjiang Road Historic District Watch the front street

Temple

The data also shows that Suzhou has 96 A temple : One of the most famous is Hanshan Temple

At moonset cry the crows, streaking the frosty sky , Jiangfeng fishing fire to worry sleep , Hanshan Temple outside Suzhou , Midnight to the passenger ship

Scenic spot word cloud picture

The Chinese names and profiles of the scenic spots we obtained are displayed in the word cloud picture :

1、 All word clouds show

2、 Before interception 50 A high frequency word

Through the display of two word cloud pictures , We found that among the scenic spots in Suzhou :

There are many parks Various museums , such as : The museum 、 Exhibition Hall 、 Museum of art 、 Art galleries are also very rich Strong cultural atmosphere : Culture 、 Cultural relics protection 、 Architecture, etc Suzhou cuisine

Suzhou food data has 2000 strip ,6 A field .

Score distribution

The distribution of the score field . The score is 0.0 Means no score

From the above figure, we can see that many stores don't give a score . Next , Let's see the score is 5 Which stores are divided ( Take before 10 name )

Steakhouse Well known hotels The coffee shop

Average consumption price

To field “ Average price ” Statistical analysis of , Classification rules :

def price(x):     if x < 20:         return " Very cheap "     if x < 50:         return " The price is close to the people "     if x < 100:         return " Acceptable "     if x < 200:         return " Higher per capita consumption "     else:         return " Upscale restaurant " 

Use the following code to draw the pie chart :

c = (     Pie(init_opts=opts.InitOpts(theme=ThemeType.CHALK))     .add("", [list(z) for z in zip(df5[" classification "].tolist(), df5[" Number "].tolist())])     .set_global_opts(title_opts=opts.TitleOpts(title=" The proportion of the average price of food shops in Suzhou ",subtitle=" remarks : Exclude stores without average price "),                     legend_opts=opts.LegendOpts(pos_left="80%", orient="vertical"))     .set_series_opts(label_opts=opts.LabelOpts(formatter="{b}: {c}")) )  c.render_notebook() 

High consumption restaurants

Through the descending order of the average price field , Let's see where the high consumption places in Suzhou are ?

The hotel

The data shows that there are hotels in Suzhou 86 home , One of the famous hotels :

Intercontinental Suzhou Jinling Hotel Garden Hotel Suzhou Jinji Lake Xinluo Hotel

Noodle shop

in total 117 A noodle shop , If you are a pasta lover , You must not miss these places :

Old Soochow noodle restaurant ( Molly Road store ) Aozaomian Tongdexing fine noodle shop ( Guanqian Street store )

Food store Statistics

From the noodle shop 、 Barbecue 、 The hotel 、 Hot pot string, etc 8 Statistics of food stores in different aspects :

Food word cloud

Suzhou's Gourmet word cloud map is mainly to “ Recommended dishes ” This field displays the word cloud , See what local people like .

1、 All word cloud pictures

2、 front 50 A word

You can see from the cloud picture of ci , The taste of Suzhou people is still very light . Among the tourists' recommended dishes :

Beef is the main dish The way of cooking : Braised in brown sauce ( meat )、 Steamed 、 bake I love shrimp : shrimp 、 Shrimps. 、 Shrimp, etc I like seafood : Especially fish , And squid 、、 Salmon, etc

Suzhou belongs to Taihu Lake , You can't miss hairy crab .

summary

After reading the above analysis of Suzhou tourist attractions and delicious food , If you go to Suzhou, you must go :

gardens : Humble Administrator's garden 、 lingering Garden Temple : Hanshan Temple 、 Chongyuan Temple The street : Shantang Street 、 Pingjiang Road Historic District 、 Watch the front street Suzhou museum

You must not miss the delicious food :

Suzhou beef ( Beef powder 、 Beef pastry, etc ), You can taste it Shrimp and crab : There are many aquatic products in Taihu Lake area , Like shrimp 、 Hairy crab, etc Noodle & Pastries : Wonton 、 You can't miss it . Remember when Peter I had a family called “ Le Hui ” Small wonton , That's great ~ And Su style noodle soup is also worth tasting

 

版权声明
本文为[TechWeb]所创,转载请带上原文链接,感谢
https://fheadline.com/2021/09/20210909113919084V.html
相似文章