Git Product home page Git Product logo

covidmap's Introduction

疫情地图

基于 Flask 框架以及 echarts 开发的疫情可视化网页

Python Version


项目介绍

本项目基于 Python爬取疫情实战 开发。可点击 此处 预览成功部署后的页面。本项目使用Flask作为web服务框架,提供后台数据接口,利用python实现公开数据的抓取并插入数据库,前端基于jquery使用ajax异步加载数据,echarts根据填充的数据进行可视化。

安装使用

  • Linux服务器部署教程
  • 安装python3.6以上版本和mysql数据库(推荐5.7版本)
  • 按照 database.txt 中的内容配置好mysql数据库
  • 安装 Google Chrome 和 chromedriver
  • 克隆项目到本地 git clone --depth=1 https://github.com/Fitz161/covidMap.git,或者下载源码压缩包并解压
  • 切换到项目所在目录 cd covidMap/
  • 安装依赖的包 pip install -r requirements.txt -i https://pypi.douban.com/simple
  • 打开config.py文件配置数据库账号
  • 手动更新数据 python spider.py
  • 开启服务 python main.py

注意事项

  • Chrome浏览器在 此处 下载安装,在设置中查看Chrome版本,并前往 此处 下载与Chrome主版本一致的chromedriver,并复制到项目所在目录。
  • 仅需本地部署服务时(或本地运行时遇到无法访问此网站),需删去main.py最后一行的host参数
  • 项目启动前需手动更新一次数据,之后程序会每隔6小时自动更新数据(程序需持续运行),可在config.py中修改

covidmap's People

Contributors

fitz161 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.