计算机毕业设计Hadoop+Spark+Hive知识图谱租房推荐系统 租房数据分析 租房爬虫 租房可视化 租房大数据 大数据毕业设计 大数据毕设 机器学习

毕 业 设 计(论 文)

基于大数据的租房数据爬虫与推荐分析系统

姓    名

学    院

专    业

班    级

指导教师

摘  要

本设计是一个基于爬虫技术的房地产数据采集与可视化分析应用程序。该程序首先通过爬虫采集网上所有房地产的房源数据,并对采集到的数据进行清洗;将这些房源大致分类,以对所有数据的概括总结。通过上述分析,可以了解到目前市面上房地产各项基本特征及房源分布情况,为众多的购房者进行购房决策提供了参考。

本系统主要是由大数据系统、可视化前端系统、web后台管理系统、租房推荐系统、租房小程序/APP端组成。大屏统计端使用hadoop+spark完成,数据采集使用java离线分析端、网页用户端以及后台管理使用Springboot+mybatis框架开发,在可视化阶段采用Echarts来提供可交互的直观数据可视化图表。本系统采用的数据库是MySQL数据库,其目的是用来存储利用爬虫爬取到的大量租房信息数据集和数据处理之后的分析结果,在通过Spark并行计算进行数据抽取,多维分析,查询统计等操作来完成数据分析部分。完整基于大数据的租房数据分析推荐可视化与管理一体的系统开发。

关键词: 租房数据分析、大数据开发、java开发

Abstract

This design is a real estate data acquisition and visualization analysis application based on crawler technology. Firstly, the program collects all the housing data of real estate on the Internet through crawler, and cleans the collected data. These listings are roughly categorized to provide a summary of all the data. Through the above analysis, we can understand the basic characteristics of real estate on the market and the distribution of housing supply, which provides a reference for many home buyers to make purchase decisions.

The system is mainly composed of big data system, visual front-end system, Web background management system, rental recommendation system, rental small program /APP end. The large-screen statistical end is completed by Hadoop + Spark, data collection is developed by Java offline analysis end, web client end and background management using Springboot+ Mybatis framework. In the visualization stage, Echarts is used to provide interactive intuitive data visualization charts. The database used in this system is MySQL database, which is used to store a large number of rental information data sets obtained by crawler and the analysis results after data processing. Data analysis is completed through Spark parallel computing for data extraction, multidimensional analysis, query statistics and other operations. The development of a system integrating the analysis, recommendation, visualization and management of rental data based on big data.

Keywords: rental data analysis, big data development, Java development

目录

摘  要

Abstract

1 引 言

1.1大数据的发展

1.2 系统研究背景与意义

1.3 研究内容

2 系统分析

2.1 大数据分析较传统分析的优势

2.2 可行性分析

2.2.1 技术可行性

2.2.2 经济可行性

2.2.3 操作可行性

2.4 功能需求分析

3 开发技术介绍

3.1 硬件开发平台

3.1.1 计算机配置介绍

3.2 软件开发平台

3.2.1 WebMagic爬虫技术

3.2.2 MySQL数据库

3.2.3 Spark分析介绍

3.2.4 Spring Boot介绍

3.2.5 Vue开发

4 总体设计

4.1 大数据系统的设计

4.1.1 整体模块设计

4.1.2 数据采集功能设计

4.2 数据库设计

5 系统详细实现

5.1 数据采集功能实现

5.2 系统功能的实现

5.2.1 Spark框架进行数据分析

5.2.2 租房推荐页面的实现

5.2.3 web后端与可视化的实现

租房数据分析可视化流程

前台登录访问流程

系统管理界面

租房数据分析系统可视化界面

6 系统测试

6.1 系统测试工作概要

6.2 测试的意义

6.3 测试方法

7 总 结

致 谢

参考文献

核心算法代码分享如下:

from flask import Flask, request
import json
from flask_mysqldb import MySQL

# 创建应用对象
app = Flask(__name__)
app.config['MYSQL_HOST'] = 'bigdata'
app.config['MYSQL_USER'] = 'root'
app.config['MYSQL_PASSWORD'] = '123456'
app.config['MYSQL_DB'] = 'beike_hive'
mysql = MySQL(app)  # this is the instantiation


@app.route('/tables01')
def tables01():
    cur = mysql.connection.cursor()
    cur.execute('''SELECT * FROM table01''')
    #row_headers = [x[0] for x in cur.description]  # this will extract row headers
    row_headers = ['area','bads','goods']  # this will extract row headers
    rv = cur.fetchall()
    json_data = []
    #print(json_data)
    for result in rv:
        json_data.append(dict(zip(row_headers, result)))
    return json.dumps(json_data, ensure_ascii=False)

@app.route('/tables02')
def tables02():
    cur = mysql.connection.cursor()
    cur.execute('''SELECT * FROM table02''')
    #row_headers = [x[0] for x in cur.description]  # this will extract row headers
    row_headers = ['area','avg_pay']  # this will extract row headers
    rv = cur.fetchall()
    json_data = []
    #print(json_data)
    for result in rv:
        json_data.append(dict(zip(row_headers, result)))
    return json.dumps(json_data, ensure_ascii=False)

@app.route('/tables03')
def tables03():
    cur = mysql.connection.cursor()
    cur.execute('''SELECT * FROM table03 order by num desc''')
    #row_headers = [x[0] for x in cur.description]  # this will extract row headers
    row_headers = ['house_estate','num']  # this will extract row headers
    rv = cur.fetchall()
    json_data = []
    #print(json_data)
    for result in rv:
        json_data.append(dict(zip(row_headers, result)))
    return json.dumps(json_data, ensure_ascii=False)

@app.route('/tables04')
def tables04():
    cur = mysql.connection.cursor()
    cur.execute('''
    select * from (

SELECT ctime,num,CAST(replace(ctime,'小时前','') AS UNSIGNED) ctime2 FROM table04  where ctime  like '%小时前%' 
                                                      union all
SELECT ctime,num,CAST(replace(ctime,'天前','')*24 AS UNSIGNED) ctime2 FROM table04  where ctime  like '%天前%' 

)t order by t.ctime2 desc;
    ''')
    #row_headers = [x[0] for x in cur.description]  # this will extract row headers
    row_headers = ['ctime','num','ctime2']  # this will extract row headers
    rv = cur.fetchall()
    json_data = []
    #print(json_data)
    for result in rv:
        json_data.append(dict(zip(row_headers, result)))
    return json.dumps(json_data, ensure_ascii=False)

# @app.route("/getmapcountryshowdata")
# def getmapcountryshowdata():
#     filepath = r"D:\\hadoop_spark_hive_mooc2024\\server\\data\\maps\\china.json"
#     with open(filepath, "r", encoding='utf-8') as f:
#         data = json.load(f)
#         return json.dumps(data, ensure_ascii=False)


@app.route('/tables05')
def tables05():
    cur = mysql.connection.cursor()
    cur.execute('''SELECT * FROM table05''')
    #row_headers = [x[0] for x in cur.description]  # this will extract row headers
    row_headers = ['agent_name','hot']  # this will extract row headers
    rv = cur.fetchall()
    json_data = []
    #print(json_data)
    for result in rv:
        json_data.append(dict(zip(row_headers, result)))
    return json.dumps(json_data, ensure_ascii=False)

@app.route('/tables06')
def tables06():
    cur = mysql.connection.cursor()
    cur.execute('''SELECT * FROM table06''')
    #row_headers = [x[0] for x in cur.description]  # this will extract row headers
    row_headers = ['house_type','num']  # this will extract row headers
    rv = cur.fetchall()
    json_data = []
    #print(json_data)
    for result in rv:
        json_data.append(dict(zip(row_headers, result)))
    return json.dumps(json_data, ensure_ascii=False)

@app.route('/tables07')
def tables07():
    cur = mysql.connection.cursor()
    cur.execute('''SELECT * FROM table07''')
    #row_headers = [x[0] for x in cur.description]  # this will extract row headers
    row_headers = ['house_decora','num']  # this will extract row headers
    rv = cur.fetchall()
    json_data = []
    #print(json_data)
    for result in rv:
        json_data.append(dict(zip(row_headers, result)))
    return json.dumps(json_data, ensure_ascii=False)

@app.route('/tables08')
def tables08():
    cur = mysql.connection.cursor()
    cur.execute('''SELECT * FROM table08''')
    #row_headers = [x[0] for x in cur.description]  # this will extract row headers
    row_headers = ['house_pay_way','num']  # this will extract row headers
    rv = cur.fetchall()
    json_data = []
    #print(json_data)
    for result in rv:
        json_data.append(dict(zip(row_headers, result)))
    return json.dumps(json_data, ensure_ascii=False)

@app.route('/tables09')
def tables09():
    cur = mysql.connection.cursor()
    #cur.execute('''SELECT SUBSTRING(address) address,num FROM table09''')
    cur.execute('''SELECT SUBSTRING(address,-5) address,num FROM table09''')
    #row_headers = [x[0] for x in cur.description]  # this will extract row headers
    row_headers = ['address','num']  # this will extract row headers
    rv = cur.fetchall()
    json_data = []
    #print(json_data)
    for result in rv:
        json_data.append(dict(zip(row_headers, result)))
    return json.dumps(json_data, ensure_ascii=False)


if __name__ == "__main__":
    app.run(debug=False)

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mfbz.cn/a/673325.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

华为坤灵交换机S300, S500, S210,S220, S200, S310 如何WEB抓包

通过S系列交换机配置端口镜像实现抓包 1、应用场景 端口镜像是指将经过指定端口(源端口或者镜像端口)的报文复制一份到另一个指定端口(目的端口或者观察端口)。在网络运营与维护的过程中,为了便于业务监测和故障定位,网络管理员时常要获取设备上的业务报…

数据分析常用模型合集(二)RARRA模型、RFM模型

随着互联网的发展,前期平台的砸钱拉新、抢占市场,大家都叫AARRR小甜甜; 现在市场基本抢占得差不多,形成了一个平衡,新人基本拉不到多少,用户都知道干什么事有哪些平台,比如买东西主流淘宝、京东…

kotlin1.8.10问题导致gson报错TypeToken type argument must not contain a type variable

书接上回,https://blog.csdn.net/jzlhll123/article/details/139302991。 之前我发现gson报错后: gson在2.11.0给我的kotlin项目代码报错了。 IllegalArgumentException: TypeToken type argument must not contain a type variable 上次解释原因是因为&…

金钱的认知,你如何理解呢?

金钱的认知 建立在金钱之上的爱情是纯真的爱,朋友关系也才够纯粹,才是单纯的世界,反之没了钱的条件爱情和友情的美好关系极易破碎,也极易反目成仇。 心若美好钱就美好,心有欲望狰狞钱就是只咬人的老虎,钱…

量子加速超级计算简介

本文转载自:量子加速超级计算简介(2024年 3月 13日) By Mark Wolf https://developer.nvidia.cn/zh-cn/blog/an-introduction-to-quantum-accelerated-supercomputing/ 文章目录 一、概述二、量子计算机的构建块:QPU 和量子位三、量子计算硬件和算法四、…

3DMAX建筑生长动画插件PolyFX安装使用方法

3DMAX建筑生长动画插件PolyFX安装使用教程 PolyFX插件是一个功能强大的工具,它可以将对象分解为片段并根据需要设置动画。它有许多用于微调动画的选项和一些附加工具。这是制作宣传视频、游戏开发等的绝佳解决方案。 【版本要求】 3ds max 2010-2025(不…

探究MySQL中的“树”结构

1 引言 树高千丈,叶落求索 – 唐代杜牧 树结构在MySQL中常用于表示层次关系,如组织结构或分类体系。引入树结构可使数据之间建立父子关系,便于查询和管理。益处包括快速检索子节点、方便展示层次关系、支持递归查询等。 2 基础概念 2.1 名词解析 程序就像是一张有向图,你…

Pipecat: 创建语音对话agent的开源框架,支持多模态!

项目简介 pipecat 是用于构建语音(和多模态)对话代理的框架。诸如私人教练、会议助理、儿童讲故事玩具、客户支持机器人、摄入流程和尖刻的社交伙伴。 看看一些示例应用: 语音代理入门 您可以开始在本地计算机上运行 Pipecat,然…

ES6-03-模版字符串、对象的简化写法

一、模版字符串 1-1、声明 反引号。 1-2、特性 1、字符串内容可以直接换行 得用号连接 2、变量拼接 现在: 二、对象的简化写法 ES6允许在大括号里面,直接写入变量和函数,作为对象的属性和方法。 let name milk;let chage function(){con…

【pip安装】YOLOv8目标检测初步上手

说明:本篇blog是关于Ultralytics官方教程的学习笔记,环境为windowsconda 1、下载安装YOLOv8 1.1 YOLOv8介绍 Ultralytics YOLOv8 是一个尖端的、最先进的(SOTA)模型,它建立在以前 YOLO 版本的成功基础之上&#xff0…

使用System-Verilog实现FPGA基于DE2-115开发板驱动HC_SR04超声波测距模块|集成蜂鸣器,led和vga提示功能

文章目录 前言一、实验原理1.1 传感器概述:1.2 传感器引脚1.3 传感器工作原理1.4 整体测距原理及编写思路 二、System-Verilog文件2.1 时钟分频(1)clk_div.sv2.2 超声波测距(1)hc_sr_trig.sv(2)…

简单聊聊分布式系统和微服务

分布式系统是由多个独立的计算机节点通过网络相互连接协作,共同完成一项或多项任务的系统。这些节点可以是服务器、个人电脑、移动设备等,它们之间通过消息传递或共享数据来协调工作,每个节点负责系统整体功能的一部分。分布式系统的关键在于…

k8s学习--k8s集群使用容器镜像仓库Harbor

提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档 文章目录 环境 步骤一 容器镜像仓库Harbor部署二、Kubernetes集群使用harbor仓库 环境 Ip主机名cpu内存硬盘192.168.10.11master1cpu双核2G40G192.168.10.12node011cpu双核2…

网络链路层

data: 2024/5/25 14:02:20 周六 limou3434 叠甲:以下文章主要是依靠我的实际编码学习中总结出来的经验之谈,求逻辑自洽,不能百分百保证正确,有错误、未定义、不合适的内容请尽情指出! 文章目录 1.协议结构2.封装分离3.…

计算机毕业设计 | SpringBoot 房屋销售租赁平台 房屋购物网站(附源码)

1,绪论 1.1 背景调研 在房地产行业持续火热的当今环境下,房地产行业和互联网行业协同发展,互相促进融合已经成为一种趋势和潮流。本项目实现了在线房产平台的功能,多种技术的灵活运用使得项目具备很好的用户体验感。 这个项目的…

Python自动化识别与删除Excel表格空白行和列

在处理Excel数据时,经常会遇到含有空白行和空白列的情况。这些空白区域不仅占用表格显示空间,还可能导致数据分析时出现偏差,影响数据处理的效率与结果的准确性,如空白行可能干扰数据聚合操作,导致统计计数不准确&…

【嵌入式DIY实例】-OLED显示天气数据

OLED显示天气数据 文章目录 OLED显示天气数据1、硬件准备与接线2、天气数据获取准备3、代码实现在这个物联网项目中,本文将展示如何使用 ESP8266 NodeMCU (ESP-12E) Wi-Fi 开发板和 SSD1306 OLED 显示屏(12864 像素)制作一个简单的互联网气象站。 NodeMCU 从天气网站 openwe…

牛客网刷题 | BC114 圣诞树 (不理解)

目前主要分为三个专栏,后续还会添加: 专栏如下: C语言刷题解析 C语言系列文章 我的成长经历 感谢阅读! 初来乍到,如有错误请指出,感谢! 这道题没搞懂 也没找到视…

软件定义汽车,通信连接世界 | 2024汽车软件与通信大会开幕

5月28日-30日,在江苏省工业和信息化厅、智能汽车安全技术全国重点实验室指导下,由中国中检所属中国汽车工程研究院股份有限公司(下称:中国汽研)主办,中汽院(江苏)汽车工程研究院有限公司承办的2024汽车软件…

RTOS(ENV)串口DMA接收GPS数据并解析

RTOS(ENV)配置STM32串口DMA接收模式 环境: RTOS 4.0.3Keil5ENVSTm32l475 ENV配置 使能串口: 2. 使能DMA,并设置接收缓冲区大小: 创建工程 scons --targetmdk工程配置 1. 创建串口设备句柄 #define SA…