当前位置:   article > 正文

大数据毕业设计hadoop+spark+hive知识图谱租房数据分析可视化大屏 租房推荐系统 58同城租房爬虫 房源推荐系统 房价预测系统 计算机毕业设计 机器学习 深度学习 人工智能_基于spark的租房数据可视化

基于spark的租房数据可视化

核心算法代码分享如下:

  1. package com.sql
  2. import org.apache.spark.sql.SparkSession
  3. import org.apache.spark.sql.types._
  4. import org.junit.Test
  5. import java.util.Properties
  6. class Spark58_FixBug2024 {
  7. val spark = SparkSession.builder()
  8. .master("local[6]")
  9. .appName("租房数据实时计算V1.0")
  10. .getOrCreate()
  11. //课程数仓CSV 模式
  12. val ods_house_Schema = StructType(
  13. List(
  14. StructField("house_title", StringType),
  15. StructField("house_pay", StringType),
  16. StructField("house_pay_way", StringType),
  17. StructField("rent_way",StringType),
  18. StructField("house_type", StringType),
  19. StructField("house_area", StringType),
  20. StructField("house_decora",StringType),
  21. StructField("toward", StringType),
  22. StructField("floor", StringType),
  23. StructField("floor_height", StringType),
  24. StructField("house_estate", StringType),
  25. StructField("area", StringType),
  26. StructField("address", StringType),
  27. StructField("pic", StringType),
  28. StructField("time", StringType),
  29. StructField("agent_name", StringType),
  30. StructField("house_disposal", StringType),
  31. StructField("house_spot", StringType),
  32. StructField("house_desc", StringType),
  33. StructField("url", StringType),
  34. StructField("sentiments", FloatType)
  35. )
  36. )
  37. val ods_house_Df = spark.read.option("header", "false").schema(ods_house_Schema).csv("hdfs://bigdata:9000/beike/house/beike.csv")
  38. @Test
  39. def init(): Unit = {
  40. //school_province_score_Df.show()
  41. //ods_courses_Df.show()
  42. ods_house_Df.show()
  43. //school_special_score_Df.show()
  44. //school_Df.show()
  45. //ruanke_rank_Df.show()
  46. //qs_world_Df.show()
  47. }
  48. // ----剩余使用spark_sql完成
  49. // ---指标8:租金支付方式占比
  50. @Test
  51. def tables08(): Unit = {
  52. ods_house_Df.createOrReplaceTempView("ods_house")
  53. val df2 = spark.sql(
  54. """
  55. select house_pay_way,count(1) num
  56. from ods_house
  57. group by house_pay_way
  58. order by num desc
  59. limit 10
  60. """)
  61. df2
  62. // .show(50)
  63. .coalesce(1)
  64. .write
  65. .mode("overwrite")
  66. .option("driver", "com.mysql.cj.jdbc.Driver")
  67. .option("user", "root")
  68. .option("password", "123456")
  69. .jdbc(
  70. "jdbc:mysql://bigdata:3306/beike_hive?useSSL=false",
  71. "table08",
  72. new Properties()
  73. )
  74. }
  75. // ---指标9:地址词云
  76. @Test
  77. def tables09(): Unit = {
  78. ods_house_Df.createOrReplaceTempView("ods_house")
  79. val df2 = spark.sql(
  80. """
  81. select address,count(1) num
  82. from ods_house
  83. group by address
  84. order by num desc
  85. limit 10
  86. """)
  87. df2
  88. // .show(50)
  89. .coalesce(1)
  90. .write
  91. .mode("overwrite")
  92. .option("driver", "com.mysql.cj.jdbc.Driver")
  93. .option("user", "root")
  94. .option("password", "123456")
  95. .jdbc(
  96. "jdbc:mysql://bigdata:3306/beike_hive?useSSL=false",
  97. "table09",
  98. new Properties()
  99. )
  100. }
  101. }

三、进度安排、应完成的工作量:

1.2023年11月16日-2024年2月5日    完成开题报告、采集广州租房数据

2.2024年2月5日-3月31日    使用与集成 协同过滤推荐算法

3.2024年4月1日-4月15日    开发数据可视化分析大屏

4.2024年4月16日-4月30日   业务代码编写,测试程序

5.2024年5月1日-5月20日    编写论文,进行毕业设计答辩

四、主要参考文献

[1]杨俊锋.重庆市住宅价格预测模型研究[D].云南财经大学,2023.

[2]朱慧明,刘智伟.时间序列向量自回归模型的贝叶斯推断理论[J.统计与决策,2022(01):11-12.

[3]Guo J.Housing Price Forecasting based on Stochastic Time Series Model[J]. InternationalJournal of Business Management and Economic Research,2022,3(2).

[4Jane P,Browna,Haivan Song & Alan Me Gillivray.Forecasting UK House Prices:A TimeVarying Coefficient Approach[J].Econoinic Modelling,2022(04).

[5]N Nghiep,C Al.Predicting housing value:A comparison of multiple regression analysis andartificial neural networks[J].Journal of Real Estate Research,2021.

[6]Hasa Selim.Determinants of House Prices in Turkey: Hedonic Regression Versus ArtificialNeural Network[J].Dogus University Journal,2021(01).

[7]杨沐晞.基于随机森林模型的二手房价格评估研究[D].中南大学,2023.

[8]Gu J, Zhu M, Jiang L. Housing Price Forecasting Based on Genetic Algorithm and Supportvector machine[J]. Expert Systems with Applications, 2011,38(4): 3383-3386.

[9]EA Antipov,EB Pokryshevskaya.Mass appraisal of residential apartments:An application ofRandom forest for valuation and a CART-based approach for model diagnostics[J].ExpertSystems With Applications,2022.

[10]Sarip A G,Hafez M B,Daud M N.Application of Fuzzy Regression Model for Real EstatePrice Prediction.Malaysian Journal of Computer Science[J].Malaysian Journal of ComputerScience,2022,29(1): 15-27.

[11]邱启荣,于婷.基于主成分分析的BP神经网络对房价的预测研究[J].湖南文理学院学报(自然科学版),2022,23(03):24-26+36.

[12]温海珍,贾生华.住宅的特征与特征的价格——基于特征价格模型的分析[J].浙江大学学报(工学版),2022(10):101-105+112.

[13]邵飞波,张鑫.基于Hedonic模型的上海住宅价格影响因素分析[J].经济论坛,2020(23):9-13.

[14]王卓琳,秦伟伟.特征价格模型研究综述[J].经济论坛,2020(12):130-131.

[15]高玉明,张仁津.基于遗传算法和 BP神经网络的房价预测分析[J.计算机工程,2020,40(4):187-191.

[16]陈世鹏,金升平.基于随机森林模型的房价预测[J].科技创新与应用,2022(04):52.[23]陶顾宇.美国埃姆斯市房价预测回归分析[J].通讯世界,2022(09):302-304.

[17]Andy Liaw and Matthew Wiener:Classification and Regression by RandomForest.R News2022,12(2/3):18-22.

[18]刘艳丽.随机森林综述[D].南开大学,2022.

[19]励嘉豪,曾丹.房价预测机器学习之集成学习][J].电子技术与软件工程,2022(20):90-93.

[20]孙宪华,张臣曦.房屋质量及其对房地产价格指数的影响[J].统计与信息论坛,2022(9):43-47.

指导教师(签名):

       

系主任(签名):   

                                         

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Li_阴宅/article/detail/771562
推荐阅读
相关标签
  

闽ICP备14008679号