南宁网站如何制作营销型企业网站分
2026/1/17 15:59:32 网站建设 项目流程
南宁网站如何制作,营销型企业网站分,什么叫门户网站,照片模板图片文章目录0 前言1 项目背景2 项目分析思维导图3 项目分析具体步骤3.1 读取数据3.2 数据分析3.1.1 数据预处理——每日使用量分析3.1.2 连续7天的单日使用分析结论3.1.3 数据预处理——每日不同时间段的使用量分析3.1.4 每日不同时间段使用量分析结论3.1.5 数据预处理——骑行距离…文章目录0 前言1 项目背景2 项目分析思维导图3 项目分析具体步骤3.1 读取数据3.2 数据分析3.1.1 数据预处理——每日使用量分析3.1.2 连续7天的单日使用分析结论3.1.3 数据预处理——每日不同时间段的使用量分析3.1.4 每日不同时间段使用量分析结论3.1.5 数据预处理——骑行距离的分析3.1.6 数据预处理——高峰期单车迁移情况分析3.1.7 数据预处理——用户使用频次分析4 项目总结4.1 分析明确了共享单车的使用场景4.2 改善性意见0 前言Hi大家好这里是丹成学长今天向大家介绍一个学长做的数据分析项目基于大数据的共享单车数据分析选题指导, 项目分享见文末1 项目背景公共交通工具的“最后一公里”是城市居民出行采用公共交通出行的主要障碍也是建设绿色城市、低碳城市过程中面临的主要挑战。共享单车自行车企业通过在校园、地铁站点、公交站点、居民区、商业区、公共服务区等提供服务完成交通行业最后一块“拼图”带动居民使用其他公共交通工具的热情也与其他公共交通方式产生协同效应。共享单车是一种分时租赁模式也是一种新型绿色环保共享经济。自2014年ofo首次提出共享单车概念至今已陆续产生了25个共享单车品牌与传统的有桩借还自行车相比无桩的共享单车自由度更高广受用户好评。本次分析拟取2017年5月中旬某共享单车在北京地区的车辆订单数据从时间、空间、频次三个维度进行分析对该品牌共享单车的发展方向提出改善性意见。2 项目分析思维导图3 项目分析具体步骤3.1 读取数据fromgeopy.geocodersimportBaiduV3fromgeopyimportdistanceimportgeohashasghimportpandasaspdimportnumpyasnpimportmatplotlib.pyplotaspltfrompyecharts.chartsimport*frompyechartsimportoptionsasoptsimportdatetime%matplotlib inline fpath../data/shared-bakes/train.csvdf_shared_bakespd.read_csv(fpath,encodinggbk)df_shared_bakes.head()3.2 数据分析3.1.1 数据预处理——每日使用量分析df_shared_bakes_time_sorteddf_shared_bakes.sort_values(bystarttime)df_shared_bakes_time_sorted.head()#完整数据的时间跨度为2017-5-10至2017-5-24历时15天earlydf_shared_bakes_time_sorted.iloc[0,:]lastdf_shared_bakes_time_sorted.iloc[-1,:]print(early.starttime)print(last.starttime)df_shared_bakes_time_in_rangedf_shared_bakes_time_sorted.loc[df_shared_bakes_time_sorted[starttime]2017-05-17,:]df_shared_bakes_time_in_range.iloc[-1,:]#提取连续7天数据的1%用于时间维度的分析df_shared_bakes_data_useddf_shared_bakes_time_in_range.loc[df_shared_bakes_time_in_range.index%1000,:]df_shared_bakes_data_used.info()#2017-05-10是星期三#对比7天内每天的用户总量分析工作日与周末的使用量是否存在差异df_used_by_datedf_shared_bakes_data_used adf_used_by_date[starttime].str.split( ,expandTrue)#adf_used_by_date.loc[:,startdate]a.loc[:,0]df_used_by_date.loc[:,startetime]a.loc[:,1]#df_used_by_date.head()s_used_by_datedf_used_by_date.groupby(startdate).count()[userid]s_used_by_date3.1.2 连续7天的单日使用分析结论工作日相较于周末使用量更多分别比较工作日与周末的使用量整体趋势为稳步增长趋势#工作日比周末1314日的使用量更多bar_used_by_date(Bar().add_xaxis(list(s_used_by_date.index)).add_yaxis(每日单车使用次数/100,list(s_used_by_date)).set_global_opts(title_opts{text:连续7天的单日使用量统计,subtext:取连续7天数据的1%进行统计}))bar_used_by_date.render_notebook()#工作日平均每天的使用量占比约为54.23%,周末平均每天使用量占比45.77%workday_used_means_used_by_date[s_used_by_date.index.isin([2017-05-10,2017-05-11,2017-05-12,2017-05-15,2017-05-16])].sum()/5weekend_used_means_used_by_date[s_used_by_date.index.isin([2017-05-13,2017-05-14])].sum()/2#print(workday_used_mean)#print(weekend_used_mean)weekend_pctround(weekend_used_mean*100/(weekend_used_meanworkday_used_mean),2)workday_pctround(workday_used_mean*100/(weekend_used_meanworkday_used_mean),2)pie_used_data[[workday str(workday_pct)%,workday_used_mean],[weekend str(weekend_pct)%,weekend_used_mean]]pie_used(Pie().add(,pie_used_data,center[35%,50%],radius[0,175]).set_global_opts(title_optsopts.TitleOpts(title工作日与周末平均使用量占比统计)))pie_used.render_notebook()#s_used_by_date.sum()#s_used_by_date.sum()3.1.3 数据预处理——每日不同时间段的使用量分析#提取小时信息用于每日不同时间段的使用量分析df_used_by_date.loc[:,hour]df_used_by_date[startetime].str.slice(0,2)#df_used_by_date.loc[:,startetime]df_used_by_date.head()#将数据分为7个单日分布分析每日不同时间段的使用量Wednesdaydf_used_by_date.loc[df_used_by_date.startdate2017-05-10,:]Thursdaydf_used_by_date.loc[df_used_by_date.startdate2017-05-11,:]Fridaydf_used_by_date.loc[df_used_by_date.startdate2017-05-12,:]Saturdaydf_used_by_date.loc[df_used_by_date.startdate2017-05-13,:]Sundaydf_used_by_date.loc[df_used_by_date.startdate2017-05-14,:]Mondaydf_used_by_date.loc[df_used_by_date.startdate2017-05-15,:]Tuesdaydf_used_by_date.loc[df_used_by_date.startdate2017-05-16,:]Wednesday_usedWednesday.groupby(hour).count()[userid]Thursday_usedThursday.groupby(hour).count()[userid]Friday_usedFriday.groupby(hour).count()[userid]Saturday_usedSaturday.groupby(hour).count()[userid]Sunday_usedSunday.groupby(hour).count()[userid]Monday_usedMonday.groupby(hour).count()[userid]Tuesday_usedTuesday.groupby(hour).count()[userid]#对比每一天不同时间的使用量分析是否存在有规律的使用峰值等特征#工作日与周末分布有不同的分布规律分别分析Line_used_by_time(Line().add_xaxis(list(Wednesday_used.index)).add_yaxis(Wednesday,Wednesday_used).add_yaxis(Thursday,Thursday_used).add_yaxis(Friday,Friday_used).add_yaxis(Saturday,Saturday_used).add_yaxis(Sunday,Sunday_used).add_yaxis(Monday,Monday_used).add_yaxis(Tuesday,Tuesday_used).set_series_opts(label_optsopts.LabelOpts(is_showFalse)).set_global_opts(title_optsopts.TitleOpts(title连续7天单日不同时间段使用量统计,subtitle取连续7天数据的1%进行统计),legend_optsopts.LegendOpts(pos_leftright)))Line_used_by_time.render_notebook()3.1.4 每日不同时间段使用量分析结论工作日早晚各有一个峰值中午12点有一个小峰值,说明工作日的单车使用时间符合通勤高峰时间规律工作日的使用场景以通勤为主还伴有部分午餐时间的使用周末在8点至21点区间内使用量平缓分布中午11至12点、晚5点至7点各有一个小高峰说明周末的单车使用时间与午餐、晚餐时间相关即周末的使用场景以休闲、聚餐为主结合前述单日总使用量的对比通勤需求产生的使用量更大可能产生潮汐现象后续具体分析可以选择工作日非高峰时段或周末进行单车维修、保养等工作#对比工作日与周末不同时间的使用量分析分布规律Line_used_by_time_new(Line().add_xaxis(list(Weekend_used.index)).add_yaxis(Weekend,Weekend_used,markpoint_optsopts.MarkPointOpts(data[opts.MarkPointItem(type_max)])).add_yaxis(Workday,Workday_used,markpoint_optsopts.MarkPointOpts(data[opts.MarkPointItem(type_max)])).set_series_opts(label_optsopts.LabelOpts(is_showFalse)))Line_used_by_time_new.render_notebook()3.1.5 数据预处理——骑行距离的分析df_used_by_datedf_used_by_date.reset_index(dropTrue)df_used_by_date.head()#当前位置数据采用geohash编码方式geohash编码长度为7位#解码后发现经纬度在小数点后两位时geohash编码的第7位无法有效区分#因此距离小于850m时无法明确计算出距离统一用0值填充s_seriesdf_used_by_date.loc[:,geohashed_start_loc]e_seriesdf_used_by_date.loc[:,geohashed_end_loc]foriindf_used_by_date.index:sgh.decode(s_series[i])egh.decode(e_series[i])s_locstr(float(s[0])),str(float(s[1]))e_locstr(float(e[0])),str(float(e[1]))df_used_by_date.loc[i,起始纬度]float(s[0])df_used_by_date.loc[i,起始经度]float(s[1])df_used_by_date.loc[i,结束纬度]float(e[0])df_used_by_date.loc[i,结束经度]float(e[1])df_used_by_date.loc[i,起始点距离]distance.distance(s,e).kmifi%10000:print(f{round(i*100/(df_used_by_date.index.stop-1),5)}%)elifidf_used_by_date.index.stop-1:print(100%)df_used_by_date.head(10)#工作日与周末的分布情况相似大部分用户的骑行距离都小于1.4kmdis_10round(df_used_by_date.loc[df_used_by_date.startdate2017-05-10,起始点距离],2)dis_11round(df_used_by_date.loc[df_used_by_date.startdate2017-05-11,起始点距离],2)dis_12round(df_used_by_date.loc[df_used_by_date.startdate2017-05-12,起始点距离],2)dis_13round(df_used_by_date.loc[df_used_by_date.startdate2017-05-13,起始点距离],2)dis_14round(df_used_by_date.loc[df_used_by_date.startdate2017-05-14,起始点距离],2)dis_15round(df_used_by_date.loc[df_used_by_date.startdate2017-05-15,起始点距离],2)dis_16round(df_used_by_date.loc[df_used_by_date.startdate2017-05-16,起始点距离],2)box(Boxplot().add_xaxis([2017-05-10,2017-05-11,2017-05-12,2017-05-13,2017-05-14,2017-05-15,2017-05-16]).add_yaxis(,Boxplot.prepare_data([dis_10,dis_11,dis_12,dis_13,dis_15,dis_15,dis_16])).set_global_opts(title_optsopts.TitleOpts(title用户骑行距离统计)))box.render_notebook()#骑行距离不超过1km的用户占比过半df_used_by_date[起始点int值]df_used_by_date.起始点距离.astype(int)dis_groupeddf_used_by_date.groupby(起始点int值).count()[userid]pie_dis_xlist(str(i)-str(i1) kmforiindis_grouped.index)dis_datalist(list(z)forzinzip(pie_dis_x,dis_grouped))dis_data[0][0]小于1 kmpie_dis(Pie().add(,dis_data,center[35%,60%],radius[0,175]).set_global_opts(title_optsopts.TitleOpts(title骑行距离比例分布,pos_bottom83%)))pie_dis.render_notebook()3.1.6 数据预处理——高峰期单车迁移情况分析#df_used_by_date.起始纬度.min()——26.14#df_used_by_date.起始纬度.max()——40.3#df_used_by_date.起始经度.min()——114.15#df_used_by_date.起始经度.max()——121.52#df_used_by_date.结束纬度.min()——26.13#df_used_by_date.结束纬度.max()——40.3#df_used_by_date.结束经度.min()——114.14#df_used_by_date.结束经度.max()——121.51#提取7-8点时间段内所有被使用的单车的起点位置和终点位置df_hour_7df_used_by_date.loc[df_used_by_date.hour07,:]start_point_7df_hour_7.groupby([起始经度,起始纬度]).count()[orderid]start_point_7start_point_7.reset_index(dropFalse)tzip(start_point_7[起始经度],start_point_7[起始纬度],start_point_7[orderid])start_loc_7[]forzint:#print(z)start_loc_7.append(list(z))end_point_7df_hour_7.groupby([结束经度,结束纬度]).count()[orderid]end_point_7end_point_7.reset_index(dropFalse)tzip(end_point_7[结束经度],end_point_7[结束纬度],end_point_7[orderid])end_loc_7[]forzint:#print(z)end_loc_7.append(list(z))#提取8-9点时间段内所有被使用的单车的起点位置和终点位置df_hour_8df_used_by_date.loc[df_used_by_date.hour08,:]start_point_8df_hour_8.groupby([起始经度,起始纬度]).count()[orderid]start_point_8start_point_8.reset_index(dropFalse)tzip(start_point_8[起始经度],start_point_8[起始纬度],start_point_8[orderid])start_loc_8[]forzint:#print(z)start_loc_8.append(list(z))end_point_8df_hour_8.groupby([结束经度,结束纬度]).count()[orderid]end_point_8end_point_8.reset_index(dropFalse)tzip(end_point_8[结束经度],end_point_8[结束纬度],end_point_8[orderid])end_loc_8[]forzint:#print(z)end_loc_8.append(list(z))#将7-8点时间段内的点起始位置分布绘制为两张图bar_3D_start_7(Bar3D().add(,start_loc_7).set_global_opts(title_optsopts.TitleOpts(title7-8点单车迁移情况统计,subtitle7-8点单车起始位置分布),visualmap_optsopts.VisualMapOpts(max_8,min_5,range_color[#313695,#4575b4,#74add1,#abd9e9,#e0f3f8,#ffffbf,#fee090,#fdae61,#f46d43,#d73027,#a50026,],)))bar_3D_end_7(Bar3D().add(,end_loc_7).set_global_opts(title_optsopts.TitleOpts(title,subtitle7-8点单车结束位置分布),visualmap_optsopts.VisualMapOpts(max_8,min_5,range_color[#313695,#4575b4,#74add1,#abd9e9,#e0f3f8,#ffffbf,#fee090,#fdae61,#f46d43,#d73027,#a50026,],)))3.1.7 数据预处理——用户使用频次分析user_frequencypd.DataFrame(df_shared_bakes_time_in_range.groupby(userid).count()[orderid])user_frequencyuser_frequency.reset_index()pie_user_frequency_datauser_frequency.groupby(orderid).count()[userid]more_than_10pie_user_frequency_data[pie_user_frequency_data.index10].sum()pie_user_frequency_datapie_user_frequency_data[:11]pie_user_frequency_data[11]more_than_10 pie_user_frequency_datalist(list(z)forzinzip(pie_user_frequency_data.index,pie_user_frequency_data))pie_user_frequency_data[10][0]大于10次datedf_shared_bakes_time_in_range[starttime].str.slice(0,10)df_shared_bakes_time_in_range.loc[:,startdate]date df_shared_bakes_time_in_range.head()#dateuser_frequency_weekendpd.DataFrame(df_shared_bakes_time_in_range.loc[df_shared_bakes_time_in_range.startdate.isin(weekend),:].groupby(userid).count()[orderid])user_frequency_workdaypd.DataFrame(df_shared_bakes_time_in_range.loc[df_shared_bakes_time_in_range.startdate.isin(workday),:].groupby(userid).count()[orderid])user_frequency_weekenduser_frequency_weekend.reset_index()user_frequency_workdayuser_frequency_workday.reset_index()pie_user_frequency_data_weekenduser_frequency_weekend.groupby(orderid).count()[userid]pie_user_frequency_data_workdayuser_frequency_workday.groupby(orderid).count()[userid]more_than_10_weekendpie_user_frequency_data_weekend[pie_user_frequency_data_weekend.index10].sum()more_than_10_workdaypie_user_frequency_data_workday[pie_user_frequency_data_workday.index10].sum()pie_user_frequency_data_weekendpie_user_frequency_data_weekend[:11]pie_user_frequency_data_workdaypie_user_frequency_data_workday[:11]pie_user_frequency_data_weekend[11]more_than_10_weekend pie_user_frequency_data_workday[11]more_than_10_workday pie_user_frequency_data_weekendlist(list(z)forzinzip(pie_user_frequency_data_weekend.index,pie_user_frequency_data_weekend))pie_user_frequency_data_workdaylist(list(z)forzinzip(pie_user_frequency_data_workday.index,pie_user_frequency_data_workday))pie_user_frequency_data_weekend[10][0]大于10次pie_user_frequency_data_workday[10][0]大于10次一周内用户的使用次数大量分布在10次以下50%的用户使用次数为4次及以下周末期间用户使用单车的次数普遍分布在3次及以下工作日期间用户使用共享单车的次数普遍分布在5次及以下使用3次及以下的用户占比近一半工作日期间的用户使用频次有较大提升空间通勤时段用户有大量使用需求但总体来看使用频次仍偏低考虑改进两个因素因素一 高峰时段的车辆分布情况是否因为高峰时段车辆数量不足导致用户无法使用到单车因素二 用户粘性差是否用户对本品牌的单车选择倾向性低可以考虑加大月卡等套餐的推广力度或提升本品牌单车品质*工作日期间使用单车次数6次及以上的用户为高粘性用户占比约30%4 项目总结4.1 分析明确了共享单车的使用场景工作日早晚高峰的通勤需求和午餐时间部分用户外出用餐需求周末午餐、晚餐时间外出就餐需求以及白天无明显峰值的外出需求短距离骑行1.4公里内4.2 改善性意见工作日高峰期时间段有明显的潮汐现象可以提前增加高用车需求区域的单车投放量用户使用频次有提升空间考虑到工作日的通勤需求五个工作日期间有近50%的用户使用频次不超过三次用户粘性较差可以推广月卡或优惠套餐等进一步提升用户粘性 项目分享:大家可自取用于参考学习获取方式见文末!

需要专业的网站建设服务?

联系我们获取免费的网站建设咨询和方案报价,让我们帮助您实现业务目标

立即咨询