<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS_HTML"></script>
<!-- MathJax configuration -->
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
processEscapes: true,
processEnvironments: true
},
// Center justify equations in code and markdown cells. Elsewhere
// we use CSS to left justify single line equations in code cells.
displayAlign: 'center',
"HTML-CSS": {
styles: {'.MathJax_Display': {"margin": 0}},
linebreaks: { automatic: true }
}
});
</script>
<!-- End of mathjax configuration --></head>
import pandas as pd
df=pd.read_csv("dianzizhongduanshu.csv",encoding="gbk")
df
电子=list(zip(list(df.地区),list(df.y_2017.fillna(0))))
print(电子)
from pyecharts import options as opts
from pyecharts.charts import Geo
from pyecharts.globals import ChartType, SymbolType
def geo_电子() -> Geo:
c = (
Geo()
.add_schema(maptype="china")
.add("电子阅览室终端数(台)",电子)
.set_series_opts(label_opts=opts.LabelOpts(is_show=False))
.set_global_opts(
visualmap_opts=opts.VisualMapOpts(min_=976.00, max_=10928.00),
title_opts=opts.TitleOpts(title="2017年中国各省的公共图书馆电子阅览室终端"),
<span class="p">)</span>
<span class="p">)</span>
<span class="k">return</span> <span class="n">c</span>
地理图 = geo_电子()
地理图.render_notebook()
import pandas as pd
df=pd.read_csv("tushuguanshoucangliang.csv",encoding="gbk")
df
藏书=list(zip(list(df.地区),list(df.y_2017.fillna(0))))
print(藏书)
from pyecharts import options as opts
from pyecharts.charts import Map
from pyecharts.globals import ChartType, SymbolType
def map_藏书() -> Map:
c = (
Map()
.add("图书馆藏书量(万册)", 藏书, "china")
.set_global_opts(
title_opts=opts.TitleOpts(title="2017年中国各省公共图书馆总藏量"),
visualmap_opts=opts.VisualMapOpts(max_=8708.3),
)
)
return c
地理图 = map_藏书()
地理图.render_notebook()
import pandas as pd
df=pd.read_csv("tushuguanshuliang.csv",encoding="gbk")
df
书量=list(zip(list(df.地区),list(df.y_2017.fillna(0))))
print(书量)
from pyecharts import options as opts
from pyecharts.charts import Geo
from pyecharts.globals import ChartType, SymbolType
def geo_书量() -> Geo:
c = (
Geo()
.add_schema(maptype="china")
.add("机构数(个)",书量)
.set_series_opts(label_opts=opts.LabelOpts(is_show=False))
.set_global_opts(
visualmap_opts=opts.VisualMapOpts(min_=0, max_=204),
title_opts=opts.TitleOpts(title="2017年中国各省公共图书馆业机构数"),
<span class="p">)</span>
<span class="p">)</span>
<span class="k">return</span> <span class="n">c</span>
地理图 = geo_书量()
地理图.render_notebook()
from pyecharts.charts import Scatter
from pyecharts import options as opts
from pyecharts.charts import Scatter
def scatter_base()-> Scatter:
c=(
Scatter()
.add_xaxis(["广东", "江苏", "浙江", "上海","四川"])
.add_yaxis("电子阅读",[10928, 6769, 7551, 3029, 7966])
.add_yaxis("藏书量",[8708.30, 8597.62, 7812.91, 7773.08, 3792.88])
.add_yaxis("机构",[143, 115, 191, 24, 204])
.set_global_opts(title_opts=opts.TitleOpts(title="电子阅览终端-藏书量-图书馆机构最多比较"))
)
return c
scatter_base().render_notebook()
from pyecharts.charts import Line
line = (
Line()
.add_xaxis(["西藏", "青海", "宁夏", "海南"])
.add_yaxis("电子阅读", [1010, 1379, 1784, 976])
.add_yaxis("藏书量", [195.14, 458.53, 721.28, 489.85])
.add_yaxis("机构数", [107, 49, 26, 23])
.set_global_opts(title_opts=opts.TitleOpts(title="电子阅览终端-藏书量-图书馆机构最少比较"))
)
line.render_notebook()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。