This commit is contained in:
goodve 2024-01-18 13:53:28 +08:00
commit 6fe4365427
91 changed files with 54980 additions and 0 deletions

48674
Untitled.ipynb Normal file

File diff suppressed because one or more lines are too long

BIN
corr.xlsx Normal file

Binary file not shown.

1296
corrs.txt Normal file

File diff suppressed because it is too large Load Diff

BIN
data/201601.xls Normal file

Binary file not shown.

BIN
data/201602.xls Normal file

Binary file not shown.

BIN
data/201604.xls Normal file

Binary file not shown.

BIN
data/201605.xls Normal file

Binary file not shown.

BIN
data/201606.xls Normal file

Binary file not shown.

BIN
data/201607.xls Normal file

Binary file not shown.

BIN
data/201608.xls Normal file

Binary file not shown.

BIN
data/201609.xls Normal file

Binary file not shown.

BIN
data/201610.xls Normal file

Binary file not shown.

BIN
data/201611.xls Normal file

Binary file not shown.

BIN
data/201612.xls Normal file

Binary file not shown.

BIN
data/201701.xls Normal file

Binary file not shown.

BIN
data/201702.xls Normal file

Binary file not shown.

BIN
data/201703.xls Normal file

Binary file not shown.

BIN
data/201704.xls Normal file

Binary file not shown.

BIN
data/201705.xls Normal file

Binary file not shown.

BIN
data/201706.xls Normal file

Binary file not shown.

BIN
data/201707.xls Normal file

Binary file not shown.

BIN
data/201708.xls Normal file

Binary file not shown.

BIN
data/201709.xls Normal file

Binary file not shown.

BIN
data/201710.xls Normal file

Binary file not shown.

BIN
data/201711.xls Normal file

Binary file not shown.

BIN
data/201712.xls Normal file

Binary file not shown.

BIN
data/201801.xls Normal file

Binary file not shown.

BIN
data/201802.xls Normal file

Binary file not shown.

BIN
data/201803.xls Normal file

Binary file not shown.

BIN
data/201804.xls Normal file

Binary file not shown.

BIN
data/201805.xls Normal file

Binary file not shown.

BIN
data/201806.xls Normal file

Binary file not shown.

BIN
data/201807.xls Normal file

Binary file not shown.

BIN
data/201808.xls Normal file

Binary file not shown.

BIN
data/201809.xls Normal file

Binary file not shown.

BIN
data/201810.xls Normal file

Binary file not shown.

BIN
data/201811.xls Normal file

Binary file not shown.

BIN
data/201812.xls Normal file

Binary file not shown.

BIN
data/201901.xls Normal file

Binary file not shown.

BIN
data/201902.xls Normal file

Binary file not shown.

BIN
data/201903.xls Normal file

Binary file not shown.

BIN
data/201904.xls Normal file

Binary file not shown.

BIN
data/201905.xls Normal file

Binary file not shown.

BIN
data/201906.xls Normal file

Binary file not shown.

BIN
data/201907.xls Normal file

Binary file not shown.

BIN
data/201908.xls Normal file

Binary file not shown.

BIN
data/201909.xls Normal file

Binary file not shown.

BIN
data/201910.xls Normal file

Binary file not shown.

BIN
data/201911.xls Normal file

Binary file not shown.

BIN
data/201912.xls Normal file

Binary file not shown.

BIN
data/202001.xls Normal file

Binary file not shown.

BIN
data/202002.xls Normal file

Binary file not shown.

BIN
data/202003.xls Normal file

Binary file not shown.

BIN
data/202004.xls Normal file

Binary file not shown.

BIN
data/202005.xls Normal file

Binary file not shown.

BIN
data/202006.xls Normal file

Binary file not shown.

BIN
data/202007.xls Normal file

Binary file not shown.

BIN
data/202008.xls Normal file

Binary file not shown.

BIN
data/202009.xls Normal file

Binary file not shown.

BIN
data/202010.xls Normal file

Binary file not shown.

BIN
data/202011.xls Normal file

Binary file not shown.

BIN
data/202012.xls Normal file

Binary file not shown.

BIN
data/202101.xls Normal file

Binary file not shown.

BIN
data/202102.xls Normal file

Binary file not shown.

BIN
data/202103.xls Normal file

Binary file not shown.

BIN
data/202104.xls Normal file

Binary file not shown.

BIN
data/202105.xls Normal file

Binary file not shown.

BIN
data/202106.xls Normal file

Binary file not shown.

BIN
data/202107.xls Normal file

Binary file not shown.

BIN
data/202108.xls Normal file

Binary file not shown.

BIN
data/202109.xls Normal file

Binary file not shown.

BIN
data/202110.xls Normal file

Binary file not shown.

BIN
data/202111.xls Normal file

Binary file not shown.

BIN
data/202112.xls Normal file

Binary file not shown.

BIN
data/202201.xls Normal file

Binary file not shown.

BIN
data/202202.xls Normal file

Binary file not shown.

BIN
data/202203.xls Normal file

Binary file not shown.

BIN
data/25-01 (1).xls Normal file

Binary file not shown.

BIN
data/25-01.xls Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

55
data/走势.csv Normal file
View File

@ -0,0 +1,55 @@
地区,时间,地区生产总值,第一产业增加值,第二产业增加值,工业,第二产业增加值,人均生产总值,地区生产总值增速,第一产业增加值增速,第二产业增加值增速,工业增速,第二产业增加值增速,人均生产总值增速
贵 阳 市,2015/12/31,2891.16,129.89,1108.52,714.15,1652.75,63003,12.5,6.4,14.6,10.2,11.1,11.3
六盘水市,2015/12/31,1201.08,114.51,614.14,528.27,472.43,41618,12.1,6.9,12.1,10.9,12.9,11.8
遵 义 市,2015/12/31,2168.34,349.27,970.75,799.82,848.32,35123,13.2,6.8,13.7,12.2,14.1,12.7
安 顺 市,2015/12/31,625.41,113.10,207.62,159.66,304.69,27065,13.6,6.5,13.8,11.8,15.2,13.3
毕 节 市,2015/12/31,1461.35,324.71,566.56,453.10,570.07,22230,12.9,6.9,12.6,11.7,15.5,12.3
铜 仁 市,2015/12/31,770.89,191.10,221.21,160.55,358.59,24712,12.7,6.7,13.8,12.2,14.9,12.4
黔西南州,2015/12/31,801.65,159.97,273.29,223.92,368.39,28464,13.6,6.5,13.3,11.8,15.6,13.6
黔东南州,2015/12/31,811.55,163.48,232.38,161.66,415.69,23311,13.1,6.4,10.5,11.4,17.0,13.0
黔 南 州,2015/12/31,902.91,158.31,327.87,247.16,416.73,27888,13.3,6.5,12.5,12.3,16.4,13.2
贵 阳 市,2016/12/31,3157.70,137.14,1218.79,771.33,1801.77,67772,11.7,5.9,12.1,9.9,11.9,10.1
六盘水市,2016/12/31,1313.70,125.49,660.00,563.42,528.21,45325,12.0,6.3,10.9,9.8,14.7,11.5
遵 义 市,2016/12/31,2403.94,370.48,1063.00,867.86,970.46,38709,12.4,5.7,12.8,11.7,14.5,11.7
安 顺 市,2016/12/31,701.35,124.07,227.12,172.24,350.16,30216,12.4,6.3,12.5,11.1,14.5,11.9
毕 节 市,2016/12/31,1625.79,344.43,617.87,488.60,663.49,24544,12.1,6.0,12.0,11.1,15.2,11.2
铜 仁 市,2016/12/31,856.97,202.70,243.41,174.04,410.86,27366,11.9,5.8,13.1,11.6,14.2,11.4
黔西南州,2016/12/31,929.14,188.84,298.31,241.68,441.99,32833,13.3,6.2,12.3,11.2,17.2,12.8
黔东南州,2016/12/31,939.05,184.11,261.36,180.74,493.58,26858,13.3,6.1,12.9,11.3,16.3,12.9
黔 南 州,2016/12/31,1023.39,183.36,359.47,267.31,480.56,31472,12.5,6.4,12.7,11.4,14.6,12.0
贵 阳 市,2017/12/31,3537.96,147.33,1375.18,872.57,2015.45,74493,11.3,6.3,10.0,9.5,12.6,9.2
六盘水市,2017/12/31,1461.71,134.82,729.38,617.86,597.51,50136,11.1,6.6,10.7,10.1,12.4,10.4
遵 义 市,2017/12/31,2748.59,402.34,1241.05,1016.14,1105.20,44060,12.1,6.8,11.9,11.5,14.3,11.6
安 顺 市,2017/12/31,802.46,135.70,267.82,203.75,398.94,34345,12.3,6.7,12.1,11.6,14.2,11.5
毕 节 市,2017/12/31,1841.61,378.61,692.19,545.95,770.81,27690,11.7,6.8,10.1,9.3,15.6,11.3
铜 仁 市,2017/12/31,969.86,219.73,277.53,196.01,472.60,30801,11.5,6.6,11.8,10.6,13.6,10.9
黔西南州,2017/12/31,1067.60,204.08,340.68,273.92,522.84,37471,12.5,6.6,10.7,9.7,16.2,11.8
黔东南州,2017/12/31,972.18,195.87,224.11,141.88,552.20,27654,5.2,6.4,-0.8,1.7,8.1,4.7
黔 南 州,2017/12/31,1160.59,202.30,412.91,306.47,545.38,35481,12.1,6.6,11.5,10.7,14.5,11.4
贵 阳 市,2018/12/31,3798.45,153.10,1413.67,874.96,2231.68,78449,9.9,6.6,7.9,7.5,11.3,7.8
六盘水市,2018/12/31,1525.69,147.95,741.97,621.09,635.77,52059,8.8,6.9,8.1,7.6,10.0,8.2
遵 义 市,2018/12/31,3000.23,411.36,1374.16,1110.82,1214.71,47931,10.4,6.7,11.9,12.0,10.1,10.1
安 顺 市,2018/12/31,849.40,149.16,272.83,204.42,427.41,36164,10.3,6.9,10.4,11.1,11.4,9.8
毕 节 市,2018/12/31,1921.43,414.76,697.03,547.84,809.64,28794,10.2,6.9,9.3,10.3,12.5,9.9
铜 仁 市,2018/12/31,1066.52,242.51,301.55,204.81,522.46,33720,9.6,6.9,7.1,5.2,12.3,9.1
黔西南州,2018/12/31,1163.77,212.92,375.80,295.83,575.05,40608,12.0,6.9,11.5,11.1,14.3,11.4
黔东南州,2018/12/31,1036.62,211.31,231.59,142.48,593.72,29358,7.9,6.8,7.0,9.0,8.7,7.4
黔 南 州,2018/12/31,1313.46,216.56,468.25,343.71,628.65,39965,10.8,6.9,10.2,10.2,12.6,10.3
贵 阳 市,2019/12/31,4039.60 ,161.34 ,1495.41 ,869.00 ,2382.85 ,81995 ,7.4,5.6,8.2,6.5,7.0,5.6
六盘水市,2019/12/31,1265.97 ,154.76 ,582.43 ,512.24 ,528.78 ,43003 ,7.5,5.7,8.7,9.0,6.6,7.0
遵 义 市,2019/12/31,3483.32 ,431.87 ,1592.79 ,1417.48 ,1458.66 ,55411 ,9.7,5.5,12.3,12.4,8.0,9.2
安 顺 市,2019/12/31,923.94 ,157.19 ,292.14 ,232.12 ,474.61 ,39177 ,8.1,5.7,9.6,10.9,7.8,7.6
毕 节 市,2019/12/31,1901.36 ,439.36 ,520.67 ,403.55 ,941.33 ,28378 ,8.0,5.7,6.8,5.9,9.9,7.5
铜 仁 市,2019/12/31,1249.16 ,254.89 ,325.87 ,216.23 ,668.40 ,39298 ,8.0,5.9,7.0,5.2,9.6,7.5
黔西南州,2019/12/31,1272.80 ,226.88 ,444.58 ,330.12 ,601.34 ,44212 ,9.8,6.0,12.1,11.7,9.5,9.3
黔东南州,2019/12/31,1123.04 ,223.73 ,253.74 ,139.69 ,645.57 ,31678 ,8.4,5.7,8.1,6.2,9.5,7.9
黔 南 州,2019/12/31,1518.04 ,230.54 ,554.38 ,429.08 ,733.12 ,46048 ,7.9,5.5,10.4,10.8,6.7,7.6
贵 阳 市,2020/12/31,4311.65 ,178.31 ,1552.59 ,883.68 ,2580.75 ,72246 ,5.0 ,6.4 ,5.5 ,4.5 ,4.4 ,3.6
六盘水市,2020/12/31,1339.62 ,170.79 ,599.99 ,522.47 ,568.84 ,44224 ,4.5 ,5.9 ,4.4 ,3.6 ,4.3 ,4.2
遵 义 市,2020/12/31,3720.05 ,489.62 ,1615.60 ,1441.43 ,1614.83 ,56334 ,4.6 ,6.2 ,4.2 ,4.8 ,4.7 ,4.3
安 顺 市,2020/12/31,966.74 ,176.33 ,292.60 ,227.41 ,497.81 ,39160 ,3.1 ,6.4 ,2.8 ,1.4 ,2.1 ,2.7
毕 节 市,2020/12/31,2020.39 ,486.55 ,533.45 ,404.96 ,1000.39 ,29295 ,4.4 ,6.3 ,3.8 ,2.2 ,3.9 ,4.2
铜 仁 市,2020/12/31,1327.79 ,289.39 ,332.58 ,215.72 ,705.82 ,40269 ,4.4 ,6.7 ,3.2 ,1.5 ,4.0 ,4.0
黔西南州,2020/12/31,1353.40 ,249.35 ,462.99 ,337.70 ,641.06 ,44881 ,4.7 ,6.5 ,5.3 ,4.1 ,3.5 ,4.5
黔东南州,2020/12/31,1191.52 ,244.81 ,258.53 ,140.07 ,688.18 ,31719 ,4.5 ,6.3 ,3.3 ,2.8 ,4.4 ,4.2
黔 南 州,2020/12/31,1595.40 ,254.73 ,563.29 ,429.24 ,777.38 ,45654 ,4.0 ,6.5 ,4.3 ,3.5 ,2.9 ,3.7
1 地区 时间 地区生产总值 第一产业增加值 第二产业增加值 工业 第二产业增加值 人均生产总值 地区生产总值增速 第一产业增加值增速 第二产业增加值增速 工业增速 第二产业增加值增速 人均生产总值增速
2 贵 阳 市 2015/12/31 2891.16 129.89 1108.52 714.15 1652.75 63003 12.5 6.4 14.6 10.2 11.1 11.3
3 六盘水市 2015/12/31 1201.08 114.51 614.14 528.27 472.43 41618 12.1 6.9 12.1 10.9 12.9 11.8
4 遵 义 市 2015/12/31 2168.34 349.27 970.75 799.82 848.32 35123 13.2 6.8 13.7 12.2 14.1 12.7
5 安 顺 市 2015/12/31 625.41 113.10 207.62 159.66 304.69 27065 13.6 6.5 13.8 11.8 15.2 13.3
6 毕 节 市 2015/12/31 1461.35 324.71 566.56 453.10 570.07 22230 12.9 6.9 12.6 11.7 15.5 12.3
7 铜 仁 市 2015/12/31 770.89 191.10 221.21 160.55 358.59 24712 12.7 6.7 13.8 12.2 14.9 12.4
8 黔西南州 2015/12/31 801.65 159.97 273.29 223.92 368.39 28464 13.6 6.5 13.3 11.8 15.6 13.6
9 黔东南州 2015/12/31 811.55 163.48 232.38 161.66 415.69 23311 13.1 6.4 10.5 11.4 17.0 13.0
10 黔 南 州 2015/12/31 902.91 158.31 327.87 247.16 416.73 27888 13.3 6.5 12.5 12.3 16.4 13.2
11 贵 阳 市 2016/12/31 3157.70 137.14 1218.79 771.33 1801.77 67772 11.7 5.9 12.1 9.9 11.9 10.1
12 六盘水市 2016/12/31 1313.70 125.49 660.00 563.42 528.21 45325 12.0 6.3 10.9 9.8 14.7 11.5
13 遵 义 市 2016/12/31 2403.94 370.48 1063.00 867.86 970.46 38709 12.4 5.7 12.8 11.7 14.5 11.7
14 安 顺 市 2016/12/31 701.35 124.07 227.12 172.24 350.16 30216 12.4 6.3 12.5 11.1 14.5 11.9
15 毕 节 市 2016/12/31 1625.79 344.43 617.87 488.60 663.49 24544 12.1 6.0 12.0 11.1 15.2 11.2
16 铜 仁 市 2016/12/31 856.97 202.70 243.41 174.04 410.86 27366 11.9 5.8 13.1 11.6 14.2 11.4
17 黔西南州 2016/12/31 929.14 188.84 298.31 241.68 441.99 32833 13.3 6.2 12.3 11.2 17.2 12.8
18 黔东南州 2016/12/31 939.05 184.11 261.36 180.74 493.58 26858 13.3 6.1 12.9 11.3 16.3 12.9
19 黔 南 州 2016/12/31 1023.39 183.36 359.47 267.31 480.56 31472 12.5 6.4 12.7 11.4 14.6 12.0
20 贵 阳 市 2017/12/31 3537.96 147.33 1375.18 872.57 2015.45 74493 11.3 6.3 10.0 9.5 12.6 9.2
21 六盘水市 2017/12/31 1461.71 134.82 729.38 617.86 597.51 50136 11.1 6.6 10.7 10.1 12.4 10.4
22 遵 义 市 2017/12/31 2748.59 402.34 1241.05 1016.14 1105.20 44060 12.1 6.8 11.9 11.5 14.3 11.6
23 安 顺 市 2017/12/31 802.46 135.70 267.82 203.75 398.94 34345 12.3 6.7 12.1 11.6 14.2 11.5
24 毕 节 市 2017/12/31 1841.61 378.61 692.19 545.95 770.81 27690 11.7 6.8 10.1 9.3 15.6 11.3
25 铜 仁 市 2017/12/31 969.86 219.73 277.53 196.01 472.60 30801 11.5 6.6 11.8 10.6 13.6 10.9
26 黔西南州 2017/12/31 1067.60 204.08 340.68 273.92 522.84 37471 12.5 6.6 10.7 9.7 16.2 11.8
27 黔东南州 2017/12/31 972.18 195.87 224.11 141.88 552.20 27654 5.2 6.4 -0.8 1.7 8.1 4.7
28 黔 南 州 2017/12/31 1160.59 202.30 412.91 306.47 545.38 35481 12.1 6.6 11.5 10.7 14.5 11.4
29 贵 阳 市 2018/12/31 3798.45 153.10 1413.67 874.96 2231.68 78449 9.9 6.6 7.9 7.5 11.3 7.8
30 六盘水市 2018/12/31 1525.69 147.95 741.97 621.09 635.77 52059 8.8 6.9 8.1 7.6 10.0 8.2
31 遵 义 市 2018/12/31 3000.23 411.36 1374.16 1110.82 1214.71 47931 10.4 6.7 11.9 12.0 10.1 10.1
32 安 顺 市 2018/12/31 849.40 149.16 272.83 204.42 427.41 36164 10.3 6.9 10.4 11.1 11.4 9.8
33 毕 节 市 2018/12/31 1921.43 414.76 697.03 547.84 809.64 28794 10.2 6.9 9.3 10.3 12.5 9.9
34 铜 仁 市 2018/12/31 1066.52 242.51 301.55 204.81 522.46 33720 9.6 6.9 7.1 5.2 12.3 9.1
35 黔西南州 2018/12/31 1163.77 212.92 375.80 295.83 575.05 40608 12.0 6.9 11.5 11.1 14.3 11.4
36 黔东南州 2018/12/31 1036.62 211.31 231.59 142.48 593.72 29358 7.9 6.8 7.0 9.0 8.7 7.4
37 黔 南 州 2018/12/31 1313.46 216.56 468.25 343.71 628.65 39965 10.8 6.9 10.2 10.2 12.6 10.3
38 贵 阳 市 2019/12/31 4039.60 161.34 1495.41 869.00 2382.85 81995 7.4 5.6 8.2 6.5 7.0 5.6
39 六盘水市 2019/12/31 1265.97 154.76 582.43 512.24 528.78 43003 7.5 5.7 8.7 9.0 6.6 7.0
40 遵 义 市 2019/12/31 3483.32 431.87 1592.79 1417.48 1458.66 55411 9.7 5.5 12.3 12.4 8.0 9.2
41 安 顺 市 2019/12/31 923.94 157.19 292.14 232.12 474.61 39177 8.1 5.7 9.6 10.9 7.8 7.6
42 毕 节 市 2019/12/31 1901.36 439.36 520.67 403.55 941.33 28378 8.0 5.7 6.8 5.9 9.9 7.5
43 铜 仁 市 2019/12/31 1249.16 254.89 325.87 216.23 668.40 39298 8.0 5.9 7.0 5.2 9.6 7.5
44 黔西南州 2019/12/31 1272.80 226.88 444.58 330.12 601.34 44212 9.8 6.0 12.1 11.7 9.5 9.3
45 黔东南州 2019/12/31 1123.04 223.73 253.74 139.69 645.57 31678 8.4 5.7 8.1 6.2 9.5 7.9
46 黔 南 州 2019/12/31 1518.04 230.54 554.38 429.08 733.12 46048 7.9 5.5 10.4 10.8 6.7 7.6
47 贵 阳 市 2020/12/31 4311.65 178.31 1552.59 883.68 2580.75 72246 5.0 6.4 5.5 4.5 4.4 3.6
48 六盘水市 2020/12/31 1339.62 170.79 599.99 522.47 568.84 44224 4.5 5.9 4.4 3.6 4.3 4.2
49 遵 义 市 2020/12/31 3720.05 489.62 1615.60 1441.43 1614.83 56334 4.6 6.2 4.2 4.8 4.7 4.3
50 安 顺 市 2020/12/31 966.74 176.33 292.60 227.41 497.81 39160 3.1 6.4 2.8 1.4 2.1 2.7
51 毕 节 市 2020/12/31 2020.39 486.55 533.45 404.96 1000.39 29295 4.4 6.3 3.8 2.2 3.9 4.2
52 铜 仁 市 2020/12/31 1327.79 289.39 332.58 215.72 705.82 40269 4.4 6.7 3.2 1.5 4.0 4.0
53 黔西南州 2020/12/31 1353.40 249.35 462.99 337.70 641.06 44881 4.7 6.5 5.3 4.1 3.5 4.5
54 黔东南州 2020/12/31 1191.52 244.81 258.53 140.07 688.18 31719 4.5 6.3 3.3 2.8 4.4 4.2
55 黔 南 州 2020/12/31 1595.40 254.73 563.29 429.24 777.38 45654 4.0 6.5 4.3 3.5 2.9 3.7

File diff suppressed because it is too large Load Diff

1748
gdp.ipynb Normal file

File diff suppressed because one or more lines are too long

243
gdp2.ipynb Normal file
View File

@ -0,0 +1,243 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "218af1ec",
"metadata": {
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [],
"source": [
"import warnings\n",
"warnings.filterwarnings(\"ignore\")\n",
"import pandas as pd\n",
"import matplotlib.pyplot as plt\n",
"import json"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "33e62663",
"metadata": {
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [],
"source": [
"plt.rcParams['font.sans-serif'] = ['SimHei'] # 用来正常显示中文标签SimHei\n",
"plt.rcParams['axes.unicode_minus'] = False # 用来正常显示负号"
]
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"df=pd.read_excel('./input/gdphb.xlsx')\n",
"\n",
"display(df)\n",
"# df=df[df[\"地区\"].str.strip()==\"安顺市\"]\n",
"def minmax_norm(df_input):\n",
" return (df_input - df_input.min()) / (df_input.max() - df_input.min()) * 40 + 60\n",
"global_df_arr=[]; #用来装需要预测的df数组\n",
"global_corr_obj= {};#地区各指标相关数组\n",
"for s in df[\"地区\"].unique():\n",
" #print(s)\n",
" new_df=df[df[\"地区\"].str.strip()==s ]\n",
" # print(new_df.columns)\n",
" norm_df_input=new_df.drop(columns=['地区', 'ds']);\n",
" # print(norm_df_input.dtypes)\n",
" norm_df= minmax_norm(norm_df_input);\n",
"\n",
" corr= norm_df.corr()\n",
" # print(s+\"地区指标相关性\")\n",
" # display(corr)\n",
" result = corr.to_json(orient=\"index\")\n",
" # print(result)\n",
" parsed_corr = json.loads(result.replace(\":null\",\":\\\"NaN\\\"\"))\n",
" global_corr_obj[s]=parsed_corr;\n",
"\n",
" # continue\n",
" for s_index in new_df.columns:\n",
" if s_index not in ['地区', 'ds', 'y'] :\n",
" #if sindex not in ['地区', 'ds', 'y'] and \"增速\" not in sindex:\n",
" sdf=new_df.loc[:,['地区', 'ds']]\n",
" sdf['y']=df[s_index]\n",
" sdf['title-text']=s_index\n",
" sdf= sdf.reset_index(drop=True)\n",
" sdf=sdf.dropna()\n",
" #print(sdf)\n",
" global_df_arr.append(sdf)\n",
"# print(df_arr)\n",
"#global_df_arr\n",
"\n",
"# display(global_corr_obj)"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"# global_df_arr"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"# print(\"各指标的相关性\")\n",
"# df.corr()"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"# m = Prophet(changepoints=['2020-12-01']) #2020是个例外\n",
"from prophet import Prophet\n",
"from prophet.plot import plot_plotly, plot_components_plotly\n",
"def show_prophet(dfs):\n",
" json_arr=[];\n",
" for mdf in dfs:\n",
" # m = Prophet(changepoints=['2020-12-01'])\n",
" m = Prophet(changepoints=['2020-12-01'])\n",
" m.fit(mdf)\n",
" future = m.make_future_dataframe(periods=2,freq=\"Y\")\n",
" # print(future,m)\n",
" forecast = m.predict(future)\n",
" # forecast['y']=mdf.loc[:,['y']]\n",
" forecast= pd.concat([forecast,mdf.loc[:,'y']],axis=1)\n",
" # print(forecast.to_json(orient ='index'))\n",
" title= mdf[\"title-text\"][mdf.index[0]]\n",
" 地区=mdf[\"地区\"][mdf.index[0]]\n",
" print(地区+title+\"回归分析\")\n",
" fig=plot_plotly(m, forecast,xlabel=\"时间\",ylabel=title,)\n",
" fig.show()\n",
" result = forecast.to_json(orient=\"index\")\n",
" # print(result)\n",
" parsed = json.loads(result.replace(\":null\",\":\\\"NaN\\\"\"))\n",
" #data_obj=json.load(forecast.to_json(orient ='index'))\n",
"\n",
" json_obj={\"axis\":地区,\"info\":title,\"data\": parsed }\n",
" json_arr.append(json_obj)\n",
" # print(json_obj )\n",
" # print(title+\"趋势分析图\")\n",
" # fig.show()\n",
"\n",
" return json_arr\n",
"res=show_prophet(global_df_arr[:])\n",
"# print(res)\n"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"print(res)"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": null,
"id": "ca17354e",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "fdf21f14-a2e5-4ee6-94fd-10dda9900f42",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"interpreter": {
"hash": "c09ee517baf2ef8cdccf4daa50b9eecbe95ad60e1eec620e80956ae2b91f8870"
},
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.12"
}
},
"nbformat": 4,
"nbformat_minor": 5
}

BIN
input/gdp - 副本.xlsx Normal file

Binary file not shown.

55
input/gdp.csv Normal file
View File

@ -0,0 +1,55 @@
地区,时间,地区生产总值,第一产业增加值,第二产业增加值,工业,第二产业增加值,人均生产总值,地区生产总值增速,第一产业增加值增速,第二产业增加值增速,工业增速,第二产业增加值增速,人均生产总值增速
贵 阳 市,2015/12/31,2891.16,129.89,1108.52,714.15,1652.75,63003,12.5,6.4,14.6,10.2,11.1,11.3
六盘水市,2015/12/31,1201.08,114.51,614.14,528.27,472.43,41618,12.1,6.9,12.1,10.9,12.9,11.8
遵 义 市,2015/12/31,2168.34,349.27,970.75,799.82,848.32,35123,13.2,6.8,13.7,12.2,14.1,12.7
安 顺 市,2015/12/31,625.41,113.10,207.62,159.66,304.69,27065,13.6,6.5,13.8,11.8,15.2,13.3
毕 节 市,2015/12/31,1461.35,324.71,566.56,453.10,570.07,22230,12.9,6.9,12.6,11.7,15.5,12.3
铜 仁 市,2015/12/31,770.89,191.10,221.21,160.55,358.59,24712,12.7,6.7,13.8,12.2,14.9,12.4
黔西南州,2015/12/31,801.65,159.97,273.29,223.92,368.39,28464,13.6,6.5,13.3,11.8,15.6,13.6
黔东南州,2015/12/31,811.55,163.48,232.38,161.66,415.69,23311,13.1,6.4,10.5,11.4,17.0,13.0
黔 南 州,2015/12/31,902.91,158.31,327.87,247.16,416.73,27888,13.3,6.5,12.5,12.3,16.4,13.2
贵 阳 市,2016/12/31,3157.70,137.14,1218.79,771.33,1801.77,67772,11.7,5.9,12.1,9.9,11.9,10.1
六盘水市,2016/12/31,1313.70,125.49,660.00,563.42,528.21,45325,12.0,6.3,10.9,9.8,14.7,11.5
遵 义 市,2016/12/31,2403.94,370.48,1063.00,867.86,970.46,38709,12.4,5.7,12.8,11.7,14.5,11.7
安 顺 市,2016/12/31,701.35,124.07,227.12,172.24,350.16,30216,12.4,6.3,12.5,11.1,14.5,11.9
毕 节 市,2016/12/31,1625.79,344.43,617.87,488.60,663.49,24544,12.1,6.0,12.0,11.1,15.2,11.2
铜 仁 市,2016/12/31,856.97,202.70,243.41,174.04,410.86,27366,11.9,5.8,13.1,11.6,14.2,11.4
黔西南州,2016/12/31,929.14,188.84,298.31,241.68,441.99,32833,13.3,6.2,12.3,11.2,17.2,12.8
黔东南州,2016/12/31,939.05,184.11,261.36,180.74,493.58,26858,13.3,6.1,12.9,11.3,16.3,12.9
黔 南 州,2016/12/31,1023.39,183.36,359.47,267.31,480.56,31472,12.5,6.4,12.7,11.4,14.6,12.0
贵 阳 市,2017/12/31,3537.96,147.33,1375.18,872.57,2015.45,74493,11.3,6.3,10.0,9.5,12.6,9.2
六盘水市,2017/12/31,1461.71,134.82,729.38,617.86,597.51,50136,11.1,6.6,10.7,10.1,12.4,10.4
遵 义 市,2017/12/31,2748.59,402.34,1241.05,1016.14,1105.20,44060,12.1,6.8,11.9,11.5,14.3,11.6
安 顺 市,2017/12/31,802.46,135.70,267.82,203.75,398.94,34345,12.3,6.7,12.1,11.6,14.2,11.5
毕 节 市,2017/12/31,1841.61,378.61,692.19,545.95,770.81,27690,11.7,6.8,10.1,9.3,15.6,11.3
铜 仁 市,2017/12/31,969.86,219.73,277.53,196.01,472.60,30801,11.5,6.6,11.8,10.6,13.6,10.9
黔西南州,2017/12/31,1067.60,204.08,340.68,273.92,522.84,37471,12.5,6.6,10.7,9.7,16.2,11.8
黔东南州,2017/12/31,972.18,195.87,224.11,141.88,552.20,27654,5.2,6.4,-0.8,1.7,8.1,4.7
黔 南 州,2017/12/31,1160.59,202.30,412.91,306.47,545.38,35481,12.1,6.6,11.5,10.7,14.5,11.4
贵 阳 市,2018/12/31,3798.45,153.10,1413.67,874.96,2231.68,78449,9.9,6.6,7.9,7.5,11.3,7.8
六盘水市,2018/12/31,1525.69,147.95,741.97,621.09,635.77,52059,8.8,6.9,8.1,7.6,10.0,8.2
遵 义 市,2018/12/31,3000.23,411.36,1374.16,1110.82,1214.71,47931,10.4,6.7,11.9,12.0,10.1,10.1
安 顺 市,2018/12/31,849.40,149.16,272.83,204.42,427.41,36164,10.3,6.9,10.4,11.1,11.4,9.8
毕 节 市,2018/12/31,1921.43,414.76,697.03,547.84,809.64,28794,10.2,6.9,9.3,10.3,12.5,9.9
铜 仁 市,2018/12/31,1066.52,242.51,301.55,204.81,522.46,33720,9.6,6.9,7.1,5.2,12.3,9.1
黔西南州,2018/12/31,1163.77,212.92,375.80,295.83,575.05,40608,12.0,6.9,11.5,11.1,14.3,11.4
黔东南州,2018/12/31,1036.62,211.31,231.59,142.48,593.72,29358,7.9,6.8,7.0,9.0,8.7,7.4
黔 南 州,2018/12/31,1313.46,216.56,468.25,343.71,628.65,39965,10.8,6.9,10.2,10.2,12.6,10.3
贵 阳 市,2019/12/31,4039.60 ,161.34 ,1495.41 ,869.00 ,2382.85 ,81995 ,7.4,5.6,8.2,6.5,7.0,5.6
六盘水市,2019/12/31,1265.97 ,154.76 ,582.43 ,512.24 ,528.78 ,43003 ,7.5,5.7,8.7,9.0,6.6,7.0
遵 义 市,2019/12/31,3483.32 ,431.87 ,1592.79 ,1417.48 ,1458.66 ,55411 ,9.7,5.5,12.3,12.4,8.0,9.2
安 顺 市,2019/12/31,923.94 ,157.19 ,292.14 ,232.12 ,474.61 ,39177 ,8.1,5.7,9.6,10.9,7.8,7.6
毕 节 市,2019/12/31,1901.36 ,439.36 ,520.67 ,403.55 ,941.33 ,28378 ,8.0,5.7,6.8,5.9,9.9,7.5
铜 仁 市,2019/12/31,1249.16 ,254.89 ,325.87 ,216.23 ,668.40 ,39298 ,8.0,5.9,7.0,5.2,9.6,7.5
黔西南州,2019/12/31,1272.80 ,226.88 ,444.58 ,330.12 ,601.34 ,44212 ,9.8,6.0,12.1,11.7,9.5,9.3
黔东南州,2019/12/31,1123.04 ,223.73 ,253.74 ,139.69 ,645.57 ,31678 ,8.4,5.7,8.1,6.2,9.5,7.9
黔 南 州,2019/12/31,1518.04 ,230.54 ,554.38 ,429.08 ,733.12 ,46048 ,7.9,5.5,10.4,10.8,6.7,7.6
贵 阳 市,2020/12/31,4311.65 ,178.31 ,1552.59 ,883.68 ,2580.75 ,72246 ,5.0 ,6.4 ,5.5 ,4.5 ,4.4 ,3.6
六盘水市,2020/12/31,1339.62 ,170.79 ,599.99 ,522.47 ,568.84 ,44224 ,4.5 ,5.9 ,4.4 ,3.6 ,4.3 ,4.2
遵 义 市,2020/12/31,3720.05 ,489.62 ,1615.60 ,1441.43 ,1614.83 ,56334 ,4.6 ,6.2 ,4.2 ,4.8 ,4.7 ,4.3
安 顺 市,2020/12/31,966.74 ,176.33 ,292.60 ,227.41 ,497.81 ,39160 ,3.1 ,6.4 ,2.8 ,1.4 ,2.1 ,2.7
毕 节 市,2020/12/31,2020.39 ,486.55 ,533.45 ,404.96 ,1000.39 ,29295 ,4.4 ,6.3 ,3.8 ,2.2 ,3.9 ,4.2
铜 仁 市,2020/12/31,1327.79 ,289.39 ,332.58 ,215.72 ,705.82 ,40269 ,4.4 ,6.7 ,3.2 ,1.5 ,4.0 ,4.0
黔西南州,2020/12/31,1353.40 ,249.35 ,462.99 ,337.70 ,641.06 ,44881 ,4.7 ,6.5 ,5.3 ,4.1 ,3.5 ,4.5
黔东南州,2020/12/31,1191.52 ,244.81 ,258.53 ,140.07 ,688.18 ,31719 ,4.5 ,6.3 ,3.3 ,2.8 ,4.4 ,4.2
黔 南 州,2020/12/31,1595.40 ,254.73 ,563.29 ,429.24 ,777.38 ,45654 ,4.0 ,6.5 ,4.3 ,3.5 ,2.9 ,3.7
1 地区 时间 地区生产总值 第一产业增加值 第二产业增加值 工业 第二产业增加值 人均生产总值 地区生产总值增速 第一产业增加值增速 第二产业增加值增速 工业增速 第二产业增加值增速 人均生产总值增速
2 贵 阳 市 2015/12/31 2891.16 129.89 1108.52 714.15 1652.75 63003 12.5 6.4 14.6 10.2 11.1 11.3
3 六盘水市 2015/12/31 1201.08 114.51 614.14 528.27 472.43 41618 12.1 6.9 12.1 10.9 12.9 11.8
4 遵 义 市 2015/12/31 2168.34 349.27 970.75 799.82 848.32 35123 13.2 6.8 13.7 12.2 14.1 12.7
5 安 顺 市 2015/12/31 625.41 113.10 207.62 159.66 304.69 27065 13.6 6.5 13.8 11.8 15.2 13.3
6 毕 节 市 2015/12/31 1461.35 324.71 566.56 453.10 570.07 22230 12.9 6.9 12.6 11.7 15.5 12.3
7 铜 仁 市 2015/12/31 770.89 191.10 221.21 160.55 358.59 24712 12.7 6.7 13.8 12.2 14.9 12.4
8 黔西南州 2015/12/31 801.65 159.97 273.29 223.92 368.39 28464 13.6 6.5 13.3 11.8 15.6 13.6
9 黔东南州 2015/12/31 811.55 163.48 232.38 161.66 415.69 23311 13.1 6.4 10.5 11.4 17.0 13.0
10 黔 南 州 2015/12/31 902.91 158.31 327.87 247.16 416.73 27888 13.3 6.5 12.5 12.3 16.4 13.2
11 贵 阳 市 2016/12/31 3157.70 137.14 1218.79 771.33 1801.77 67772 11.7 5.9 12.1 9.9 11.9 10.1
12 六盘水市 2016/12/31 1313.70 125.49 660.00 563.42 528.21 45325 12.0 6.3 10.9 9.8 14.7 11.5
13 遵 义 市 2016/12/31 2403.94 370.48 1063.00 867.86 970.46 38709 12.4 5.7 12.8 11.7 14.5 11.7
14 安 顺 市 2016/12/31 701.35 124.07 227.12 172.24 350.16 30216 12.4 6.3 12.5 11.1 14.5 11.9
15 毕 节 市 2016/12/31 1625.79 344.43 617.87 488.60 663.49 24544 12.1 6.0 12.0 11.1 15.2 11.2
16 铜 仁 市 2016/12/31 856.97 202.70 243.41 174.04 410.86 27366 11.9 5.8 13.1 11.6 14.2 11.4
17 黔西南州 2016/12/31 929.14 188.84 298.31 241.68 441.99 32833 13.3 6.2 12.3 11.2 17.2 12.8
18 黔东南州 2016/12/31 939.05 184.11 261.36 180.74 493.58 26858 13.3 6.1 12.9 11.3 16.3 12.9
19 黔 南 州 2016/12/31 1023.39 183.36 359.47 267.31 480.56 31472 12.5 6.4 12.7 11.4 14.6 12.0
20 贵 阳 市 2017/12/31 3537.96 147.33 1375.18 872.57 2015.45 74493 11.3 6.3 10.0 9.5 12.6 9.2
21 六盘水市 2017/12/31 1461.71 134.82 729.38 617.86 597.51 50136 11.1 6.6 10.7 10.1 12.4 10.4
22 遵 义 市 2017/12/31 2748.59 402.34 1241.05 1016.14 1105.20 44060 12.1 6.8 11.9 11.5 14.3 11.6
23 安 顺 市 2017/12/31 802.46 135.70 267.82 203.75 398.94 34345 12.3 6.7 12.1 11.6 14.2 11.5
24 毕 节 市 2017/12/31 1841.61 378.61 692.19 545.95 770.81 27690 11.7 6.8 10.1 9.3 15.6 11.3
25 铜 仁 市 2017/12/31 969.86 219.73 277.53 196.01 472.60 30801 11.5 6.6 11.8 10.6 13.6 10.9
26 黔西南州 2017/12/31 1067.60 204.08 340.68 273.92 522.84 37471 12.5 6.6 10.7 9.7 16.2 11.8
27 黔东南州 2017/12/31 972.18 195.87 224.11 141.88 552.20 27654 5.2 6.4 -0.8 1.7 8.1 4.7
28 黔 南 州 2017/12/31 1160.59 202.30 412.91 306.47 545.38 35481 12.1 6.6 11.5 10.7 14.5 11.4
29 贵 阳 市 2018/12/31 3798.45 153.10 1413.67 874.96 2231.68 78449 9.9 6.6 7.9 7.5 11.3 7.8
30 六盘水市 2018/12/31 1525.69 147.95 741.97 621.09 635.77 52059 8.8 6.9 8.1 7.6 10.0 8.2
31 遵 义 市 2018/12/31 3000.23 411.36 1374.16 1110.82 1214.71 47931 10.4 6.7 11.9 12.0 10.1 10.1
32 安 顺 市 2018/12/31 849.40 149.16 272.83 204.42 427.41 36164 10.3 6.9 10.4 11.1 11.4 9.8
33 毕 节 市 2018/12/31 1921.43 414.76 697.03 547.84 809.64 28794 10.2 6.9 9.3 10.3 12.5 9.9
34 铜 仁 市 2018/12/31 1066.52 242.51 301.55 204.81 522.46 33720 9.6 6.9 7.1 5.2 12.3 9.1
35 黔西南州 2018/12/31 1163.77 212.92 375.80 295.83 575.05 40608 12.0 6.9 11.5 11.1 14.3 11.4
36 黔东南州 2018/12/31 1036.62 211.31 231.59 142.48 593.72 29358 7.9 6.8 7.0 9.0 8.7 7.4
37 黔 南 州 2018/12/31 1313.46 216.56 468.25 343.71 628.65 39965 10.8 6.9 10.2 10.2 12.6 10.3
38 贵 阳 市 2019/12/31 4039.60 161.34 1495.41 869.00 2382.85 81995 7.4 5.6 8.2 6.5 7.0 5.6
39 六盘水市 2019/12/31 1265.97 154.76 582.43 512.24 528.78 43003 7.5 5.7 8.7 9.0 6.6 7.0
40 遵 义 市 2019/12/31 3483.32 431.87 1592.79 1417.48 1458.66 55411 9.7 5.5 12.3 12.4 8.0 9.2
41 安 顺 市 2019/12/31 923.94 157.19 292.14 232.12 474.61 39177 8.1 5.7 9.6 10.9 7.8 7.6
42 毕 节 市 2019/12/31 1901.36 439.36 520.67 403.55 941.33 28378 8.0 5.7 6.8 5.9 9.9 7.5
43 铜 仁 市 2019/12/31 1249.16 254.89 325.87 216.23 668.40 39298 8.0 5.9 7.0 5.2 9.6 7.5
44 黔西南州 2019/12/31 1272.80 226.88 444.58 330.12 601.34 44212 9.8 6.0 12.1 11.7 9.5 9.3
45 黔东南州 2019/12/31 1123.04 223.73 253.74 139.69 645.57 31678 8.4 5.7 8.1 6.2 9.5 7.9
46 黔 南 州 2019/12/31 1518.04 230.54 554.38 429.08 733.12 46048 7.9 5.5 10.4 10.8 6.7 7.6
47 贵 阳 市 2020/12/31 4311.65 178.31 1552.59 883.68 2580.75 72246 5.0 6.4 5.5 4.5 4.4 3.6
48 六盘水市 2020/12/31 1339.62 170.79 599.99 522.47 568.84 44224 4.5 5.9 4.4 3.6 4.3 4.2
49 遵 义 市 2020/12/31 3720.05 489.62 1615.60 1441.43 1614.83 56334 4.6 6.2 4.2 4.8 4.7 4.3
50 安 顺 市 2020/12/31 966.74 176.33 292.60 227.41 497.81 39160 3.1 6.4 2.8 1.4 2.1 2.7
51 毕 节 市 2020/12/31 2020.39 486.55 533.45 404.96 1000.39 29295 4.4 6.3 3.8 2.2 3.9 4.2
52 铜 仁 市 2020/12/31 1327.79 289.39 332.58 215.72 705.82 40269 4.4 6.7 3.2 1.5 4.0 4.0
53 黔西南州 2020/12/31 1353.40 249.35 462.99 337.70 641.06 44881 4.7 6.5 5.3 4.1 3.5 4.5
54 黔东南州 2020/12/31 1191.52 244.81 258.53 140.07 688.18 31719 4.5 6.3 3.3 2.8 4.4 4.2
55 黔 南 州 2020/12/31 1595.40 254.73 563.29 429.24 777.38 45654 4.0 6.5 4.3 3.5 2.9 3.7

BIN
input/gdp.xlsx Normal file

Binary file not shown.

BIN
input/gdphb.xlsx Normal file

Binary file not shown.

1
newjosn.txt Normal file

File diff suppressed because one or more lines are too long

1
output.txt Normal file

File diff suppressed because one or more lines are too long

1
output_all.txt Normal file

File diff suppressed because one or more lines are too long