MCPcopy Create free account

hub / github.com/DQinYuan/chinese_province_city_area_mapper / functions

Functions68 in github.com/DQinYuan/chinese_province_city_area_mapper

↓ 21 callersFunction_assert_line
(addr_df, pos_sensitive, linenum, province, city, area, addr, adcode, province_pos=-1, city_p
tests/test_cpca.py:100
↓ 9 callersMethodadd_addr_info
(self, addr_info)
cpca/matcher.py:58
↓ 7 callersFunctionad2addr
(part_adcode)
cpca/drawer.py:9
↓ 7 callersMethoditer
(self, sentence)
cpca/matcher.py:70
↓ 6 callersFunctionadcode_name
(part_adcode: str)
cpca/__init__.py:233
↓ 4 callersFunctionempty_record
(pos_sensitive: bool)
cpca/__init__.py:152
↓ 3 callersMethod_assert
(self, p_name, assert_name)
tests/test_structures.py:54
↓ 3 callersMethodappend_relational_addr
(self, key, pca_tuple, full_name_pos)
cpca/structures.py:33
↓ 3 callersMethodget_relational_addrs
(self, key)
cpca/structures.py:26
↓ 3 callersMethodis_unique_value
key所映射到的地址列表中的地址是否唯一
cpca/structures.py:19
↓ 3 callersFunctionupdate_res_by_adcode
(res: dict, adcode: str)
cpca/__init__.py:238
↓ 2 callersFunction_extract_addrs
提取出 sentence 中的所有地址
cpca/__init__.py:173
↓ 2 callersFunction_fill_adcode
(adcode)
cpca/__init__.py:229
↓ 2 callersMethod_get
(self, key)
cpca/matcher.py:67
↓ 2 callersFunctionassert_addr
(addr_df: pd.DataFrame, pos_sensitive=False)
tests/test_cpca.py:15
↓ 2 callersMethodcomplete_add
(self)
cpca/matcher.py:64
↓ 2 callersFunctionget_body
(url)
sync.py:15
↓ 2 callersMethodget_match_addr
(self, parent_addr, first_adcode=None)
cpca/matcher.py:13
↓ 2 callersMethodget_one_addr
(self)
cpca/matcher.py:25
↓ 2 callersMethodget_rank
(self)
cpca/matcher.py:22
↓ 2 callersMethodpropertys_dict
(self, pos_sensitive)
cpca/structures.py:49
↓ 2 callersFunctionset_pos
(res, rank, pos)
cpca/__init__.py:162
↓ 2 callersFunctiontidy_order
整理顺序,唯一作用是让列的顺序好看一些
cpca/__init__.py:135
↓ 1 callersMethod__init__
(self, province = '', city = '', area = '', province_pos = -1, city_pos = -1, area_pos = -1)
cpca/structures.py:41
↓ 1 callersMethod_abbr_name
(self, origin_name)
cpca/matcher.py:47
↓ 1 callersMethod_first_add_addr
(self, addr_info)
cpca/matcher.py:50
↓ 1 callersFunction_get_one_addr
(sentence, pos_sensitive, umap)
cpca/__init__.py:169
↓ 1 callersFunction_init_data
(stop_key="([省市]|特别行政区|自治区)$")
cpca/__init__.py:65
↓ 1 callersMethodbelong_to
通过 adcode 判断当前 addr 是否属于 other
cpca/__init__.py:58
↓ 1 callersMethodget_full_name
(self, key)
cpca/structures.py:16
↓ 1 callersMethodget_value
获得映射的第一个地址, 必须保证该key存在, 不然会出错
cpca/structures.py:29
↓ 1 callersFunctionpos_setter
(pos_sensitive)
cpca/__init__.py:161
Method__init__
(self, name, adcode, longitude, latitude)
cpca/__init__.py:43
Method__init__
(self, attr_infos, start_index, end_index)
cpca/__init__.py:146
Method__init__
(self, attr_infos, start_index, end_index, origin_value)
cpca/matcher.py:7
Method__init__
(self, stop_re)
cpca/matcher.py:43
Method__init__
(self)
cpca/structures.py:13
Method__repr__
(self)
cpca/matcher.py:28
Function_base_input_check
(locations)
cpca/drawer.py:13
Function_dict2addr_map
(mydict, valuedict = {}, is_unique_value = True)
tests/test_cpca.py:89
Function_geo_update
(geo, adcodes)
cpca/drawer.py:23
Functiondraw_locations
基于folium生成地域分布的热力图的html文件. :param adcodes: 地址集 :param file_path: 生成的html文件的路径.
cpca/drawer.py:35
Functionecharts_cate_draw
依据分类生成地域分布的echarts散点图的html文件. :param adcodes: 地址集 :param labels: 长度必须和locations相等, 代表每个样本所属的分类. :param file_path: 生成的html文件路径. :p
cpca/drawer.py:95
Functionecharts_draw
生成地域分布的echarts热力图的html文件. :param adcodes: 地址集 :param file_path: 生成的html文件路径. :param title: 图表的标题 :param subtitle: 图表的子标题
cpca/drawer.py:60
Functionempty
(res, rank, pos)
cpca/__init__.py:165
Methodfinalize_options
(self)
setup.py:21
Methodinitialize_options
(self)
setup.py:12
Functionmock_map
(monkeypatch, attrname, return_value, is_contain = True, is_unique_value = True)
tests/test_cpca.py:80
Methodrun_tests
(self)
setup.py:26
Methodsetup_class
(cls)
tests/test_structures.py:15
Methodsetup_class
(cls)
tests/test_structures.py:49
Functiontest_draw_locations
使用folium绘制热力图
tests/test_drawer.py:10
Functiontest_echarts_cate_draw
使用echarts绘制分类散点图
tests/test_drawer.py:21
Functiontest_echarts_draw
使用echarts绘制热力图
tests/test_drawer.py:15
Methodtest_get_full_name
(self)
tests/test_structures.py:22
Methodtest_get_relational_addrs
(self)
tests/test_structures.py:26
Methodtest_get_value
(self)
tests/test_structures.py:38
Methodtest_in
(self)
tests/test_structures.py:30
Functiontest_init_data
()
tests/test_cpca.py:9
Methodtest_is_unique_value
(self)
tests/test_structures.py:33
Functiontest_matcher
()
tests/test_matcher.py:6
Methodtest_propertys_dict
(self)
tests/test_structures.py:67
Methodtest_province
(self)
tests/test_structures.py:62
Functiontest_transform
()
tests/test_cpca.py:30
Functiontest_transform_text_with_addrs
()
tests/test_cpca.py:56
Functiontest_umap
()
tests/test_cpca.py:49
Functiontransform
将地址描述字符串转换以"省","市","区"信息为列的DataFrame表格 Args: locations:地址描述字符集合,可以是list, Series等任意可以进行for in循环的集合 比如:["徐汇区虹漕
cpca/__init__.py:90
Functiontransform_text_with_addrs
将含有多个地址的长文本中的地址全部提取出来 Args: text_with_addrs: 一个字符串,里面可能含有多个地址 index:可以通过这个参数指定输出的DataFrame的index,默认情况下是range(len(da
cpca/__init__.py:119