🎓 作者:计算机毕设小月哥 | 软件开发专家
🖥️ 简介:8年计算机软件程序开发经验。精通Java、Python、微信小程序、安卓、大数据、PHP、.NET|C#、Golang等技术栈。
🛠️ 专业服务 🛠️
需求定制化开发
源码提供与讲解
技术文档撰写(指导计算机毕设选题【新颖+创新】、任务书、开题报告、文献综述、外文翻译等)
项目答辩演示PPT制作
🌟 欢迎:点赞 👍 收藏 ⭐ 评论 📝
👇🏻 精选专栏推荐 👇🏻 欢迎订阅关注!
🍅 ↓↓主页获取源码联系↓↓🍅
基于大数据的抖音珠宝饰品类店铺分析可视化系统-功能介绍
本系统是一套基于Python大数据技术栈构建的红斑鳞状疾病数据可视化分析平台,采用Hadoop+Spark作为核心大数据处理框架,后端使用Django进行业务逻辑开发,前端通过Vue+ElementUI+Echarts实现交互式可视化展示。系统围绕包含35个特征字段和6类疾病分类的红斑鳞状疾病数据集,设计并实现了14项深度数据分析功能,涵盖疾病样本分布统计、患者年龄分布分析、家族遗传史影响评估、临床症状强度对比、组织病理学特征分析、年龄段核心症状分析、瘙痒程度关联分析、关键症状疾病关联度分析、病理特征鉴别诊断价值分析、症状与病理特征热力图分析、炎症模式分析、皮肤结构变化分析、基于临床表现的患者聚类分析以及疾病诊断特征重要性分析等。系统利用HDFS进行分布式存储,通过Spark SQL和Pandas、NumPy完成数据清洗预处理与特征工程,运用K-Means聚类算法挖掘患者亚群特征,借助Echarts图表库生成柱状图、饼图、热力图、雷达图等多维度可视化结果,为医疗研究人员提供从数据上传、预处理、分析到可视化展示的完整解决方案。
基于大数据的抖音珠宝饰品类店铺分析可视化系统-选题背景意义
选题背景 红斑鳞状疾病是皮肤科临床工作中常见的一大类疾病,主要包括牛皮癣、脂溢性皮炎、扁平苔藓、玫瑰糠疹、慢性皮炎和毛发红糠疹等多个病种。这些疾病在临床表现上往往存在一定的相似性,比如都会出现红斑、脱屑、瘙痒等症状,给医生的准确诊断带来不小的挑战。传统的诊断方式主要依赖医生的临床经验和组织病理学检查,但面对症状表现相近的病例时,仅凭人工判断难免会出现误诊或漏诊的情况。随着医疗信息化建设的推进,医院积累了大量的电子病历和检查数据,这些数据中蕴含着丰富的疾病特征信息和诊断规律。怎么利用计算机技术特别是大数据分析手段,从海量的医疗数据中挖掘出有价值的诊断线索,辅助医生做出更准确的判断,已经成为医疗信息化领域一个值得探索的方向。本课题正是在这样的背景下,尝试运用Hadoop和Spark等大数据技术,对红斑鳞状疾病的临床症状和组织病理学特征数据进行深度分析和可视化展示。 选题意义 本课题的开展对于推动医疗数据的智能化应用有一定的实践价值。通过对35个疾病特征字段的系统性分析,可以帮助梳理出不同疾病类型在临床症状和病理表现上的差异规律,比如哪些症状组合更倾向于指向某种特定疾病,哪些病理特征在鉴别诊断中起到关键作用,这些分析结果能为临床医生提供一定的数据参考。利用大数据技术处理医疗数据集,相比传统的人工统计方式,在处理速度和分析维度上都有明显优势,特别是在面对多特征、多分类的复杂数据时,Spark的分布式计算能力能够快速完成各类统计分析任务。从技术实现角度看,本系统整合了Hadoop分布式存储、Spark数据处理、Django后端开发和Echarts可视化展示等多个技术组件,对于学习和掌握大数据技术栈的实际应用有比较好的练习价值。虽然本系统作为一个毕业设计项目,在数据规模和功能复杂度上还比较有限,但它提供了一个将大数据技术应用于医疗数据分析的基础框架,为后续开展更深入的研究和功能扩展留下了空间。
基于大数据的抖音珠宝饰品类店铺分析可视化系统-技术选型
大数据框架:Hadoop+Spark(本次没用Hive,支持定制) 开发语言:Python+Java(两个版本都支持) 后端框架:Django+Spring Boot(Spring+SpringMVC+Mybatis)(两个版本都支持) 前端:Vue+ElementUI+Echarts+HTML+CSS+JavaScript+jQuery 详细技术点:Hadoop、HDFS、Spark、Spark SQL、Pandas、NumPy 数据库:MySQL
基于大数据的抖音珠宝饰品类店铺分析可视化系统-视频展示
基于大数据的抖音珠宝饰品类店铺分析可视化系统-图片展示
基于大数据的抖音珠宝饰品类店铺分析可视化系统-代码展示
from pyspark.sql import SparkSession
from pyspark.sql.functions import col, when, regexp_replace, split, avg, sum, count, desc, asc
from pyspark.ml.feature import VectorAssembler, StandardScaler
from pyspark.ml.clustering import KMeans
import pandas as pd
import numpy as np
spark = SparkSession.builder.appName("DouYinJewelryAnalysis").config("spark.sql.adaptive.enabled", "true").config("spark.sql.adaptive.coalescePartitions.enabled", "true").getOrCreate()
def data_preprocessing_analysis():
df = spark.read.csv("hdfs://localhost:9000/douyin_jewelry/30天销量top5000小店.csv", header=True, inferSchema=True)
df_cleaned = df.withColumn("shop_name", regexp_replace(col("抖音小店"), r"\n.*", ""))
df_cleaned = df_cleaned.withColumn("product_count_clean", regexp_replace(col("动销商品数"), ",", ""))
df_cleaned = df_cleaned.withColumn("product_count_clean", when(col("product_count_clean").rlike(r"(\d+\.?\d*)w"), regexp_replace(col("product_count_clean"), r"(\d+\.?\d*)w", col("product_count_clean").substr(1, col("product_count_clean").length()-1).cast("double") * 10000).cast("int")).otherwise(col("product_count_clean").cast("int")))
df_cleaned = df_cleaned.withColumn("unit_price_clean", regexp_replace(col("客单价"), ",", "").cast("double"))
sales_volume_split = split(col("销量"), "~")
df_cleaned = df_cleaned.withColumn("sales_volume_min", when(sales_volume_split[0].rlike(r"(\d+\.?\d*)w"), regexp_replace(sales_volume_split[0], r"(\d+\.?\d*)w", sales_volume_split[0].substr(1, sales_volume_split[0].length()-1).cast("double") * 10000).cast("int")).otherwise(sales_volume_split[0].cast("int")))
df_cleaned = df_cleaned.withColumn("sales_volume_max", when(sales_volume_split[1].rlike(r"(\d+\.?\d*)w"), regexp_replace(sales_volume_split[1], r"(\d+\.?\d*)w", sales_volume_split[1].substr(1, sales_volume_split[1].length()-1).cast("double") * 10000).cast("int")).otherwise(sales_volume_split[1].cast("int")))
df_cleaned = df_cleaned.withColumn("sales_volume_avg", (col("sales_volume_min") + col("sales_volume_max")) / 2)
sales_amount_split = split(col("销售额"), "~")
df_cleaned = df_cleaned.withColumn("sales_amount_min", when(sales_amount_split[0].rlike(r"(\d+\.?\d*)亿"), regexp_replace(sales_amount_split[0], r"(\d+\.?\d*)亿", sales_amount_split[0].substr(1, sales_amount_split[0].length()-1).cast("double") * 100000000).cast("long")).when(sales_amount_split[0].rlike(r"(\d+\.?\d*)w"), regexp_replace(sales_amount_split[0], r"(\d+\.?\d*)w", sales_amount_split[0].substr(1, sales_amount_split[0].length()-1).cast("double") * 10000).cast("long")).otherwise(sales_amount_split[0].cast("long")))
df_cleaned = df_cleaned.withColumn("sales_amount_max", when(sales_amount_split[1].rlike(r"(\d+\.?\d*)亿"), regexp_replace(sales_amount_split[1], r"(\d+\.?\d*)亿", sales_amount_split[1].substr(1, sales_amount_split[1].length()-1).cast("double") * 100000000).cast("long")).when(sales_amount_split[1].rlike(r"(\d+\.?\d*)w"), regexp_replace(sales_amount_split[1], r"(\d+\.?\d*)w", sales_amount_split[1].substr(1, sales_amount_split[1].length()-1).cast("double") * 10000).cast("long")).otherwise(sales_amount_split[1].cast("long")))
df_cleaned = df_cleaned.withColumn("sales_amount_avg", (col("sales_amount_min") + col("sales_amount_max")) / 2)
df_cleaned = df_cleaned.fillna({"商家体验分": 0, "product_count_clean": 0, "unit_price_clean": 0, "关联达人": 0, "关联直播": 0, "关联视频": 0})
df_final = df_cleaned.select("shop_name", col("商家体验分").alias("experience_score"), col("product_count_clean").alias("product_count"), col("unit_price_clean").alias("unit_price"), col("sales_volume_avg").alias("sales_volume"), col("sales_amount_avg").alias("sales_amount"), col("关联达人").alias("related_influencers"), col("关联直播").alias("related_lives"), col("关联视频").alias("related_videos"))
df_final.write.mode("overwrite").csv("hdfs://localhost:9000/douyin_jewelry/processed_data", header=True)
result_pandas = df_final.toPandas()
result_pandas.to_csv("/app/data/shop_data_preprocessing_analysis.csv", index=False, encoding='utf-8')
return result_pandas
def sales_amount_level_analysis():
df = spark.read.csv("hdfs://localhost:9000/douyin_jewelry/processed_data", header=True, inferSchema=True)
df_with_level = df.withColumn("sales_amount_level", when(col("sales_amount") < 1000000, "100万以下").when((col("sales_amount") >= 1000000) & (col("sales_amount") < 5000000), "100万-500万").when((col("sales_amount") >= 5000000) & (col("sales_amount") < 10000000), "500万-1000万").when((col("sales_amount") >= 10000000) & (col("sales_amount") < 50000000), "1000万-5000万").otherwise("5000万以上"))
level_stats = df_with_level.groupBy("sales_amount_level").agg(count("*").alias("shop_count"), avg("sales_amount").alias("avg_sales_amount"), sum("sales_amount").alias("total_sales_amount"))
total_shops = df.count()
total_sales = df.agg(sum("sales_amount").alias("total")).collect()[0]["total"]
level_stats_with_ratio = level_stats.withColumn("shop_ratio", col("shop_count") / total_shops * 100).withColumn("sales_ratio", col("total_sales_amount") / total_sales * 100)
level_stats_ordered = level_stats_with_ratio.orderBy(desc("avg_sales_amount"))
level_stats_ordered.write.mode("overwrite").csv("hdfs://localhost:9000/douyin_jewelry/sales_amount_level_analysis", header=True)
result_pandas = level_stats_ordered.toPandas()
result_pandas['avg_sales_amount'] = result_pandas['avg_sales_amount'].round(2)
result_pandas['shop_ratio'] = result_pandas['shop_ratio'].round(2)
result_pandas['sales_ratio'] = result_pandas['sales_ratio'].round(2)
result_pandas.to_csv("/app/data/sales_amount_level_analysis.csv", index=False, encoding='utf-8')
return result_pandas
def shop_clustering_analysis():
df = spark.read.csv("hdfs://localhost:9000/douyin_jewelry/processed_data", header=True, inferSchema=True)
feature_cols = ["experience_score", "sales_amount", "unit_price", "related_lives"]
df_features = df.select("shop_name", *feature_cols).fillna(0)
assembler = VectorAssembler(inputCols=feature_cols, outputCol="features")
df_assembled = assembler.transform(df_features)
scaler = StandardScaler(inputCol="features", outputCol="scaled_features", withStd=True, withMean=True)
scaler_model = scaler.fit(df_assembled)
df_scaled = scaler_model.transform(df_assembled)
kmeans = KMeans(k=4, seed=42, featuresCol="scaled_features", predictionCol="cluster")
kmeans_model = kmeans.fit(df_scaled)
df_clustered = kmeans_model.transform(df_scaled)
cluster_stats = df_clustered.groupBy("cluster").agg(count("*").alias("shop_count"), avg("experience_score").alias("avg_experience_score"), avg("sales_amount").alias("avg_sales_amount"), avg("unit_price").alias("avg_unit_price"), avg("related_lives").alias("avg_related_lives"))
df_with_description = df_clustered.withColumn("cluster_description", when(col("cluster") == 0, "高质高收型").when(col("cluster") == 1, "直播依赖型").when(col("cluster") == 2, "潜力增长型").otherwise("大众市场型"))
final_result = df_with_description.select("shop_name", "experience_score", "sales_amount", "unit_price", "related_lives", "cluster", "cluster_description")
final_result.write.mode("overwrite").csv("hdfs://localhost:9000/douyin_jewelry/shop_clustering_analysis", header=True)
result_pandas = final_result.toPandas()
cluster_stats_pandas = cluster_stats.toPandas()
cluster_stats_pandas['avg_experience_score'] = cluster_stats_pandas['avg_experience_score'].round(2)
cluster_stats_pandas['avg_sales_amount'] = cluster_stats_pandas['avg_sales_amount'].round(2)
cluster_stats_pandas['avg_unit_price'] = cluster_stats_pandas['avg_unit_price'].round(2)
cluster_stats_pandas['avg_related_lives'] = cluster_stats_pandas['avg_related_lives'].round(2)
result_pandas.to_csv("/app/data/shop_clustering_analysis.csv", index=False, encoding='utf-8')
cluster_stats_pandas.to_csv("/app/data/cluster_statistics_analysis.csv", index=False, encoding='utf-8')
return result_pandas
基于大数据的抖音珠宝饰品类店铺分析可视化系统-结语
🌟 欢迎:点赞 👍 收藏 ⭐ 评论 📝
👇🏻 精选专栏推荐 👇🏻 欢迎订阅关注!
🍅 ↓↓主页获取源码联系↓↓🍅