import time
import pymysql
def get_time():
time_str = time.strftime("%Y{}%m{}%d{} %X")
return time_str.format("年","月","日")
def get_conn():
conn = pymysql.connect(host="127.0.0.1",
user="root",
password="wwj520hy",
db="covid-19",
charset="utf8")
cursor = conn.cursor()
return conn, cursor
def close_conn(conn, cursor):
cursor.close()
conn.close()
def query(sql,*args):
conn, cursor = get_conn()
cursor.execute(sql, args)
res = cursor.fetchall()
close_conn(conn, cursor)
return res
# 主页头部数据展示
def get_home_data():
sql = "select SUM(confirm),(SELECT SUM(suspect) FROM history ORDER BY ds DESC LIMIT 1),SUM(heal),SUM(dead) FROM details WHERE update_time=(SELECT update_time FROM details ORDER BY update_time DESC LIMIT 1)"
res = query(sql)
return res[0]
# 主页地图数据
def get_home_map():
sql="select province,SUM(confirm_now),SUM(confirm) from details WHERE update_time=(SELECT update_time FROM details ORDER BY update_time DESC LIMIT 1) GROUP BY province"
res = query(sql)
return res
# 数据图表-统计数据 数据集
def get_alldetails_data():
sql="SELECT update_time,province,city,confirm,confirm_add,confirm_now,heal,dead FROM details WHERE update_time=(SELECT update_time FROM details ORDER BY update_time DESC LIMIT 1)"
res=query(sql)
return res
# 数据图表-累计图表 table-1
def get_allconfirmed_data():
sql = "select ds,confirm,suspect,heal,dead from history"
res = query(sql)
return res
# 数据图表-累计图表 table-2
def get_maxConfirmed_data():
sql = "SELECT update_time,province,confirm FROM details WHERE province IN ('香港','湖北','台湾','上海','陕西') GROUP BY update_time,province"
res = query(sql)
return res
def get_ProvinceConfirmed1_data():
sql = "SELECT confirm FROM details WHERE province IN ('上海') GROUP BY update_time,province"
res=query(sql)
return res
def get_ProvinceConfirmed2_data():
sql = "SELECT confirm FROM details WHERE province IN ('湖北') GROUP BY update_time,province"
res=query(sql)
return res
def get_ProvinceConfirmed3_data():
sql = "SELECT confirm FROM details WHERE province IN ('陕西') GROUP BY update_time,province"
res=query(sql)
return res
def get_ProvinceConfirmed4_data():
sql = "SELECT confirm FROM details WHERE province IN ('香港') GROUP BY update_time,province"
res=query(sql)
return res
def get_ProvinceConfirmed5_data():
sql = "SELECT confirm FROM details WHERE province IN ('台湾') GROUP BY update_time,province"
res=query(sql)
return res
# 数据图表-新增图表 table-1
def get_AllAddConfirmed_data():
sql = "select ds,confirm_add,confirm_now,suspect_add,heal_add,dead_add from history"
res = query(sql)
return res
def get_r2_data():
sql = "select content from hotsearch ORDER BY id DESC LIMIT 30"
res = query(sql)
return res
def get_anhui_data():
sql="SELECT city,confirm FROM details where province='安徽' AND update_time=(SELECT update_time FROM details ORDER BY update_time DESC LIMIT 1) AND city!='境外输入'"
res = query(sql)
return res
def get_aomen_data():
sql="SELECT city,confirm FROM details where province='澳门' AND update_time=(SELECT update_time FROM details ORDER BY update_time DESC LIMIT 1) AND city!='境外输入'"
res = query(sql)
return res
def get_beijing_data():
sql="SELECT city,confirm FROM details where province='北京' AND update_time=(SELECT update_time FROM details ORDER BY update_time DESC LIMIT 1) AND city!='境外输入'"
res = query(sql)
return res
def get_chongqing_data():
sql="SELECT city,confirm FROM details where province='重庆' AND update_time=(SELECT update_time FROM details ORDER BY update_time DESC LIMIT 1) AND city!='境外输入'"
res = query(sql)
return res
def get_fujian_data():
sql="SELECT city,confirm FROM details where province='福建' AND update_time=(SELECT update_time FROM details ORDER BY update_time DESC LIMIT 1) AND city!='境外输入'"
res = query(sql)
return res
def get_gansu_data():
sql="SELECT city,confirm FROM details where province='甘肃' AND update_time=(SELECT update_time FROM details ORDER BY update_time DESC LIMIT 1) AND city!='境外输入'"
res = query(sql)
return res
def get_guangdong_data():
sql="SELECT city,confirm FROM details where province='广东' AND update_time=(SELECT update_time FROM details ORDER BY update_time DESC LIMIT 1) AND city!='境外输入'"
res = query(sql)
return res
def get_guangxi_data():
sql="SELECT city,confirm FROM details where province='广西' AND update_time=(SELECT update_time FROM details ORDER BY update_time DESC LIMIT 1) AND city!='境外输入'"
res = query(sql)
return res
def get_guizhou_data():
sql="SELECT city,confirm FROM details where province='贵州' AND update_time=(SELECT update_time FROM details ORDER BY update_time DESC LIMIT 1) AND city!='境外输入'"
res = query(sql)
return res
def get_hainan_data():
sql="SELECT city,confirm FROM details where province='海南' AND update_time=(SELECT update_time FROM details ORDER BY update_time DESC LIMIT 1) AND city!='境外输入'"
res = query(sql)
return res
def get_hebei_data():
sql="SELECT city,confirm FROM details where province='河北' AND update_time=(SELECT update_time FROM details ORDER BY update_time DESC LIMIT 1) AND city!='境外输入'"
res = query(sql)
return res
def get_heilongjiang_data():
sql="SELECT city,confirm FROM details where province='黑龙江' AND update_time=(SELECT update_time FROM details ORDER BY update_time DESC LIMIT 1) AND city!='境外输入'"
res = query(sql)
return res
def get_henan_data():
sql="SELECT city,confirm FROM details where province='河南' AND update_time=(SELECT update_time FROM details ORDER BY update_time DESC LIMIT 1) AND city!='境外输入'"
res = query(sql)
return res
def get_hubei_data():
sql="SELECT city,confirm FROM details where province='湖北' AND update_time=(SELECT update_time FROM details ORDER BY update_time DESC LIMIT 1) AND city!='境外输入'"
res = query(sql)
return res
def get_hunan_data():
sql="SELECT city,confirm FROM details where province='湖南' AND update_time=(SELECT update_time FROM details ORDER BY update_time DESC LIMIT 1) AND city!='境外输入'"
res = query(sql)
return res
def get_jiangsu_data():
sql="SELECT city,confirm FROM details where province='江苏' AND update_time=(SELECT update_time FROM details ORDER BY update_time DESC LIMIT 1) AND city!='境外输入'"
res = query(sql)
return res
def get_jiangxi_data():
sql="SELECT city,confirm FROM details where province='江西' AND update_time=(SELECT update_time FROM details ORDER BY update_time DESC LIMIT 1) AND city!='境外输入'"
res = query(sql)
return res
def get_jilin_data():
sql="SELECT city,confirm FROM details where province='吉林' AND update_time=(SELECT update_time FROM details ORDER BY update_time DESC LIMIT 1) AND city!='境外输入'"
res = query(sql)
return res
def get_liaoning_data():
sql="SELECT city,confirm FROM details where province='辽宁' AND update_time=(SELECT update_time FROM details ORDER BY update_time DESC LIMIT 1) AND city!='境外输入'"
res = query(sql)
return res
def get_neimenggu_data():
sql="SELECT city,confirm FROM details where province='内蒙古' AND update_time=(SELECT update_time FROM details ORDER BY update_time DESC LIMIT 1) AND city!='境外输入'"
res = query(sql)
return res
def get_ningxia_data():
sql="SELECT city,confirm FROM details where province='宁夏' AND update_time=(SELECT update_time FROM details ORDER BY update_time DESC LIMIT 1) AND city!='境外输入'"
res
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
【资源说明】 1、该资源包括项目的全部源码,下载可以直接使用! 2、本项目适合作为计算机、数学、电子信息等专业的课程设计、期末大作业和毕设项目,作为参考资料学习借鉴。 3、本资源作为“参考资料”如果需要实现其他功能,需要能看懂代码,并且热爱钻研,自行调试。 基于Vue+Echarts+Falsk的新冠肺炎疫情数据可视化系统(python源码)(地图、雷达图、饼图、折线图、柱状图、数据表).zip基于Vue+Echarts+Falsk的新冠肺炎疫情数据可视化系统(python源码)(地图、雷达图、饼图、折线图、柱状图、数据表).zip基于Vue+Echarts+Falsk的新冠肺炎疫情数据可视化系统(python源码)(地图、雷达图、饼图、折线图、柱状图、数据表).zip基于Vue+Echarts+Falsk的新冠肺炎疫情数据可视化系统(python源码)(地图、雷达图、饼图、折线图、柱状图、数据表).zip基于Vue+Echarts+Falsk的新冠肺炎疫情数据可视化系统(python源码)(地图、雷达图、饼图、折线图、柱状图、数据表).zip
资源推荐
资源详情
资源评论
收起资源包目录
基于Vue+Echarts+Falsk的新冠肺炎疫情数据可视化系统(python源码)(地图、雷达图、饼图、折线图、柱状图、数据表).zip (30个子文件)
code_20105
cov_front
.idea
graduation project.iml 284B
vcs.xml 190B
misc.xml 185B
inspectionProfiles
profiles_settings.xml 174B
modules.xml 288B
.gitignore 176B
yiqing
V5QRL2~_NIHOS7KC4]`OZBH.jpg 20KB
covid-19.sql 395KB
tencent_data.ipynb 488KB
start.cmd 16B
笔记.md 97B
covid-19nodata.sql 4KB
chinadata.json 85KB
疫情分析.ipynb 1.15MB
属性含义表.md 678B
chromedriver.exe 11.04MB
wc_data.ipynb 16KB
.ipynb_checkpoints
tencent_data-checkpoint.ipynb 690KB
疫情分析-checkpoint.ipynb 1.15MB
wc_data-checkpoint.ipynb 16KB
cov_Backend
utils.py 11KB
main.py 10KB
.idea
cov_Backend.iml 352B
vcs.xml 183B
misc.xml 199B
inspectionProfiles
Project_Default.xml 251B
profiles_settings.xml 174B
modules.xml 274B
.gitignore 176B
__pycache__
utils.cpython-38.pyc 14KB
共 30 条
- 1
资源评论
土豆片片
- 粉丝: 1859
- 资源: 5869
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 5 薪酬结构统计分析表(依据基本信息自动生成).xlsx
- 4 员工工资表-部门薪酬分析.xlsx
- 8 公司工程部人事薪酬分析.xlsx
- 13 公司人力资源薪酬工资统计表.xlsx
- 7 薪酬市场数据统计分析.xlsx
- 9 公司员工薪酬统计分析表.xlsx
- 10 财务分析员工薪酬统计表.xlsx
- 12 财务报表员工薪酬结算.xlsx
- 11 财务报表员工薪酬分析.xlsx
- 15 薪资情况分析表.xlsx
- 14 薪资筹划财务分析表.xlsx
- 18 财务汇报部门历年薪酬统计图表.xlsx
- 16 月度工资支出数据汇总图表.xlsx
- 17财务报告年度工资统计图表1.xlsx
- 20 工资表-部分统计-图表展示.xlsx
- 21 公司部门工资情况汇报图表模板.xlsx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功