mdbq 3.4.5__py3-none-any.whl → 3.4.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mdbq/aggregation/datashow.py +11 -11
- mdbq/aggregation/query_data.py +8 -8
- mdbq/spider/aikucun.py +1 -1
- {mdbq-3.4.5.dist-info → mdbq-3.4.6.dist-info}/METADATA +1 -1
- {mdbq-3.4.5.dist-info → mdbq-3.4.6.dist-info}/RECORD +7 -7
- {mdbq-3.4.5.dist-info → mdbq-3.4.6.dist-info}/WHEEL +0 -0
- {mdbq-3.4.5.dist-info → mdbq-3.4.6.dist-info}/top_level.txt +0 -0
mdbq/aggregation/datashow.py
CHANGED
@@ -27,17 +27,23 @@ from matplotlib import rcParams
|
|
27
27
|
from sqlalchemy.sql.functions import count
|
28
28
|
|
29
29
|
if platform.system() == 'Windows':
|
30
|
+
ip_address = '192.168.1.117'
|
30
31
|
rcParams['font.sans-serif'] = ['SimHei'] # matplotlibrc 防止中文乱码
|
31
32
|
D_PATH = os.path.join(f'C:\\Users\\{getpass.getuser()}\\Downloads')
|
32
33
|
elif platform.system() == 'Linux':
|
34
|
+
ip_address = '127.0.0.1'
|
33
35
|
rcParams['font.sans-serif'] = ['Arial Unicode MS'] # matplotlibrc 防止中文乱码
|
34
36
|
D_PATH = 'Downloads'
|
35
37
|
if not os.path.exists(D_PATH):
|
36
38
|
os.makedirs(D_PATH)
|
37
39
|
else:
|
40
|
+
ip_address = '127.0.0.1'
|
38
41
|
rcParams['font.sans-serif'] = ['Arial Unicode MS'] # matplotlibrc 防止中文乱码
|
39
42
|
D_PATH = os.path.join(f'/Users/{getpass.getuser()}/Downloads')
|
40
43
|
|
44
|
+
PORT = 5050
|
45
|
+
DIRECTORY = os.path.join(D_PATH, 'http_server')
|
46
|
+
|
41
47
|
rcParams['axes.unicode_minus'] = False # 防止负号'-'被当作减号处理
|
42
48
|
m_engine = mysql.MysqlUpload(username='', password='', host='', port=0, charset='utf8mb4')
|
43
49
|
company_engine = mysql.MysqlUpload(username='', password='', host='', port=0, charset='utf8mb4')
|
@@ -979,12 +985,6 @@ class DataShow:
|
|
979
985
|
# 应用这个函数到图片列
|
980
986
|
df['Image_HTML'] = df['白底图'].apply(convert_image_to_html)
|
981
987
|
|
982
|
-
local_file1 = os.path.join(self.path, '多店推广场景.html')
|
983
|
-
local_file2 = os.path.join(self.path, '多店推广场景.html')
|
984
|
-
local_file3 = os.path.join(self.path, '多店推广场景.html')
|
985
|
-
local_file4 = os.path.join(self.path, '多店推广场景.html')
|
986
|
-
local_file5 = os.path.join(self.path, '多店推广场景.html')
|
987
|
-
|
988
988
|
# 创建 HTML
|
989
989
|
html_template = """
|
990
990
|
<!DOCTYPE html>
|
@@ -1198,11 +1198,11 @@ class DataShow:
|
|
1198
1198
|
|
1199
1199
|
final_html = html_template.replace('{rows}', ''.join(rows))
|
1200
1200
|
final_html = final_html.replace('统计周期', f'统计周期: {min_date} ~ {max_date}')
|
1201
|
-
final_html = final_html.replace('{local_file1}',
|
1202
|
-
final_html = final_html.replace('{local_file2}',
|
1203
|
-
final_html = final_html.replace('{local_file3}',
|
1204
|
-
final_html = final_html.replace('{local_file4}',
|
1205
|
-
final_html = final_html.replace('{local_file5}',
|
1201
|
+
final_html = final_html.replace('{local_file1}', '多店推广场景.html')
|
1202
|
+
final_html = final_html.replace('{local_file2}', '店铺流量来源.html')
|
1203
|
+
final_html = final_html.replace('{local_file3}', '达摩盘人群画像.html')
|
1204
|
+
final_html = final_html.replace('{local_file4}', '商品人群画像.html')
|
1205
|
+
final_html = final_html.replace('{local_file5}', '销售地域分布.html')
|
1206
1206
|
file = os.path.join(self.path, f'{filename}.html')
|
1207
1207
|
with open(file, 'w', encoding='utf-8') as f:
|
1208
1208
|
f.write(final_html)
|
mdbq/aggregation/query_data.py
CHANGED
@@ -3887,10 +3887,10 @@ def main(days=150, months=3):
|
|
3887
3887
|
|
3888
3888
|
|
3889
3889
|
if __name__ == '__main__':
|
3890
|
-
|
3891
|
-
|
3892
|
-
|
3893
|
-
|
3890
|
+
main(
|
3891
|
+
days=30, # 清理聚合数据的日期长度
|
3892
|
+
months=2 # 生成聚合数据的长度
|
3893
|
+
)
|
3894
3894
|
|
3895
3895
|
# query_list = [query1, query2]
|
3896
3896
|
# # 使用 ThreadPoolExecutor 来并行运行
|
@@ -3914,10 +3914,10 @@ if __name__ == '__main__':
|
|
3914
3914
|
|
3915
3915
|
# query3(months=2, less_dict=[])
|
3916
3916
|
|
3917
|
-
sdq = MysqlDatasQuery() # 实例化数据处理类
|
3918
|
-
sdq.months = 1 # 设置数据周期, 1 表示近 2 个月
|
3919
|
-
sdq.update_service = True # 调试时加,true: 将数据写入 mysql 服务器
|
3920
|
-
sdq.item_up()
|
3917
|
+
# sdq = MysqlDatasQuery() # 实例化数据处理类
|
3918
|
+
# sdq.months = 1 # 设置数据周期, 1 表示近 2 个月
|
3919
|
+
# sdq.update_service = True # 调试时加,true: 将数据写入 mysql 服务器
|
3920
|
+
# sdq.item_up()
|
3921
3921
|
|
3922
3922
|
# string = '30-34岁,35-39岁,40-49岁'
|
3923
3923
|
# d = "~".join(re.findall(r'(\d+)\D.*\D(\d+)岁', string)[0])
|
mdbq/spider/aikucun.py
CHANGED
@@ -2,9 +2,9 @@ mdbq/__init__.py,sha256=Il5Q9ATdX8yXqVxtP_nYqUhExzxPC_qk_WXQ_4h0exg,16
|
|
2
2
|
mdbq/__version__.py,sha256=y9Mp_8x0BCZSHsdLT_q5tX9wZwd5QgqrSIENLrb6vXA,62
|
3
3
|
mdbq/aggregation/__init__.py,sha256=EeDqX2Aml6SPx8363J-v1lz0EcZtgwIBYyCJV6CcEDU,40
|
4
4
|
mdbq/aggregation/aggregation.py,sha256=-yzApnlqSN2L0E1YMu5ml-W827qpKQvWPCOI7jj2kzY,80264
|
5
|
-
mdbq/aggregation/datashow.py,sha256=
|
5
|
+
mdbq/aggregation/datashow.py,sha256=1AYSIDkdUx-4as1Ax2rPj0cExM9d-qFMrFYLAaPHNuk,54962
|
6
6
|
mdbq/aggregation/optimize_data.py,sha256=RXIv7cACCgYyehAxMjUYi_S7rVyjIwXKWMaM3nduGtA,3068
|
7
|
-
mdbq/aggregation/query_data.py,sha256=
|
7
|
+
mdbq/aggregation/query_data.py,sha256=CRbc4Lf-Ql3SBb9BY-0SdRQTlRDE1D4DG_3Tmx4483s,178890
|
8
8
|
mdbq/bdup/__init__.py,sha256=AkhsGk81SkG1c8FqDH5tRq-8MZmFobVbN60DTyukYTY,28
|
9
9
|
mdbq/bdup/bdup.py,sha256=LAV0TgnQpc-LB-YuJthxb0U42_VkPidzQzAagan46lU,4234
|
10
10
|
mdbq/config/__init__.py,sha256=jso1oHcy6cJEfa7udS_9uO5X6kZLoPBF8l3wCYmr5dM,18
|
@@ -33,8 +33,8 @@ mdbq/pbix/pbix_refresh.py,sha256=JUjKW3bNEyoMVfVfo77UhguvS5AWkixvVhDbw4_MHco,239
|
|
33
33
|
mdbq/pbix/refresh_all.py,sha256=OBT9EewSZ0aRS9vL_FflVn74d4l2G00wzHiikCC4TC0,5926
|
34
34
|
mdbq/pbix/refresh_all_old.py,sha256=_pq3WSQ728GPtEG5pfsZI2uTJhU8D6ra-htIk1JXYzw,7192
|
35
35
|
mdbq/spider/__init__.py,sha256=RBMFXGy_jd1HXZhngB2T2XTvJqki8P_Fr-pBcwijnew,18
|
36
|
-
mdbq/spider/aikucun.py,sha256=
|
37
|
-
mdbq-3.4.
|
38
|
-
mdbq-3.4.
|
39
|
-
mdbq-3.4.
|
40
|
-
mdbq-3.4.
|
36
|
+
mdbq/spider/aikucun.py,sha256=zOacjrJ3MvToyuugA68xB-oN6RKj8K3GxMKudnln9EA,22207
|
37
|
+
mdbq-3.4.6.dist-info/METADATA,sha256=vkPu6J2sEW1O7DV1Q4eufPEKnbTsj0v5_1plFdfGj-k,243
|
38
|
+
mdbq-3.4.6.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
|
39
|
+
mdbq-3.4.6.dist-info/top_level.txt,sha256=2FQ-uLnCSB-OwFiWntzmwosW3X2Xqsg0ewh1axsaylA,5
|
40
|
+
mdbq-3.4.6.dist-info/RECORD,,
|
File without changes
|
File without changes
|