Esempio n. 1
0
    def create_map(self, city, value, name="观影地区分布"):
        """Scatter类型地图"""

        geo = Geo(name,
                  "数据来源于猫眼",
                  title_color="#fff",
                  title_pos="center",
                  width=800,
                  height=500,
                  background_color='#404a59')
        # 添加城市坐标
        geo.add_coordinate_json(CITY_JSON_FILE)
        geo.add("",
                city,
                value,
                is_label_show=True,
                is_roam=True,
                visual_range=[0, 40],
                visual_text_color="#fff",
                symbol_size=15,
                is_visualmap=True)
        geo.render(MAP_PATH)
        print("地理分布图【成功】")