Giter VIP home page Giter VIP logo

icanibbdata's Introduction

Python 爬取数据并进行分析

本项目仅作学习之用,如有侵权,请联系作者删除。谢谢。

0x 01 数据库创建

代码参见:DataBaseCreater.py

因Demo写得比较简单,所以只需要执行一次创建就OK了。 数据库创建了两个文件: i_can_i_bb.db --- 存储原始数据, deal_data.db --- 存储处理过的数据

获取爱奇�艺评论接口数据并存储

代码参见:GetICanIBBData.py

代码没有处理重复数据合并,且没有处理更新逻辑,如果你有兴趣完善,欢迎提交Pull Request

将原始数据清洗并存储

将原始数据中需要的字段拿出来存储到 deal_data中 代码参见: ConvertData.py

性别比数据并输出餅图

代码参见: UserSex.py

每一期评论数量

将movieId更新到 deal_data.bd中 代码参见: ConvertMovieId.py

显示评论柱状图: 代码参见: UserCommentCount.py

周评论数据

  1. 将日期数据转换成周并存储在 deal_data.db 中 代码参见: ConvertWeek.py
  2. 展示周评论数据 代码参见: UserCommentDate.py

用户评论“字数长度”

  1. 更新长度范围并存储在 deal_data.db 中 代码参见: ConvertCommentLength.py
  2. 显示评论字数长度 代码参见: UserCommentLength.py

词云

使用 jieba 进行分词,并使用 wordcloud 来生成词云图 代码参见:UserCommentJieba.py

传送门

欢迎关注我的公众号,一起交流技术事。

公众号

icanibbdata's People

Contributors

wangshi-code avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.