改进的SIR差分模型及三个模型的应用
目录
前言
感谢组员的共同协作,做组长的有些东西帮不上实在抱歉。
改进的SIR差分模型
|
|
logistic模型预测美国人口
|
|
药物中毒急救建模
|
|
热传导差分偏微分模型应用
|
|
python数据处理(写的很乱)
为了写第一个模型整合各种数据。。。有点乱,将就看吧。
|
|
|
|
|
|
date | location | total_vaccinations | total_distributed | people_vaccinated | people_fully_vaccinated_per_hundred | total_vaccinations_per_hundred | people_fully_vaccinated | people_vaccinated_per_hundred | distributed_per_hundred | daily_vaccinations_raw | daily_vaccinations | daily_vaccinations_per_million | share_doses_used | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 2021-01-12 | Alabama | 78134.0 | 377025.0 | 70861.0 | 0.15 | 1.59 | 7270.0 | 1.45 | 7.69 | NaN | NaN | NaN | 0.207 |
1 | 2021-01-13 | Alabama | 84040.0 | 378975.0 | 74792.0 | 0.19 | 1.71 | 9245.0 | 1.53 | 7.73 | 5906.0 | 5906.0 | 1205.0 | 0.222 |
2 | 2021-01-14 | Alabama | 92300.0 | 435350.0 | 80480.0 | NaN | 1.88 | NaN | 1.64 | 8.88 | 8260.0 | 7083.0 | 1445.0 | 0.212 |
3 | 2021-01-15 | Alabama | 100567.0 | 444650.0 | 86956.0 | 0.28 | 2.05 | 13488.0 | 1.77 | 9.07 | 8267.0 | 7478.0 | 1525.0 | 0.226 |
4 | 2021-01-16 | Alabama | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | 7557.0 | 7498.0 | 1529.0 | NaN |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
11328 | 2021-06-30 | Wyoming | 421749.0 | 516025.0 | 226911.0 | 34.38 | 72.87 | 198958.0 | 39.21 | 89.16 | 55.0 | 913.0 | 1578.0 | 0.817 |
11329 | 2021-07-01 | Wyoming | 423238.0 | 516325.0 | 227741.0 | 34.51 | 73.13 | 199743.0 | 39.35 | 89.21 | 1489.0 | 1113.0 | 1923.0 | 0.820 |
11330 | 2021-07-02 | Wyoming | 424025.0 | 516865.0 | 228162.0 | 34.59 | 73.26 | 200184.0 | 39.42 | 89.31 | 787.0 | 847.0 | 1463.0 | 0.820 |
11331 | 2021-07-03 | Wyoming | 431008.0 | 517365.0 | 230914.0 | 35.34 | 74.47 | 204522.0 | 39.90 | 89.39 | 6983.0 | 1680.0 | 2903.0 | 0.833 |
11332 | 2021-07-04 | Wyoming | 431101.0 | 517365.0 | 230993.0 | 35.35 | 74.49 | 204598.0 | 39.91 | 89.39 | 93.0 | 1682.0 | 2906.0 | 0.833 |
11333 rows × 14 columns
|
|
65
|
|
|
|
'2020-12-20'
|
|
date | location | total_vaccinations | total_distributed | people_vaccinated | people_fully_vaccinated_per_hundred | total_vaccinations_per_hundred | people_fully_vaccinated | people_vaccinated_per_hundred | distributed_per_hundred | daily_vaccinations_raw | daily_vaccinations | daily_vaccinations_per_million | share_doses_used | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 2021-01-12 | Alabama | 78134.0 | 377025.0 | 70861.0 | 0.15 | 1.59 | 7270.0 | 1.45 | 7.69 | NaN | NaN | NaN | 0.207 |
174 | 2021-01-12 | Alaska | 35838.0 | 141600.0 | 22486.0 | 0.74 | 4.90 | 5400.0 | 3.07 | 19.36 | NaN | NaN | NaN | 0.253 |
348 | 2021-01-12 | American Samoa | 2124.0 | 10650.0 | 842.0 | 0.47 | 3.81 | 260.0 | 1.51 | 19.12 | NaN | NaN | NaN | 0.199 |
522 | 2021-01-12 | Arizona | 141355.0 | 563025.0 | 95141.0 | 0.11 | 1.94 | 8343.0 | 1.31 | 7.74 | NaN | NaN | NaN | 0.251 |
696 | 2021-01-12 | Arkansas | 40879.0 | 274400.0 | 39357.0 | 0.00 | 1.35 | 8.0 | 1.30 | 9.09 | NaN | NaN | NaN | 0.149 |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
10463 | 2021-01-12 | Virginia | 190607.0 | 797150.0 | NaN | NaN | 2.23 | NaN | NaN | 9.34 | NaN | NaN | NaN | 0.239 |
10637 | 2021-01-12 | Washington | 195567.0 | 567725.0 | 162105.0 | 0.23 | 2.57 | 17689.0 | 2.13 | 7.46 | NaN | NaN | NaN | 0.344 |
10811 | 2021-01-12 | West Virginia | 103330.0 | 160975.0 | NaN | NaN | 5.77 | NaN | NaN | 8.98 | NaN | NaN | NaN | 0.642 |
10985 | 2021-01-12 | Wisconsin | 137253.0 | 429500.0 | 125895.0 | 0.19 | 2.36 | 11343.0 | 2.16 | 7.38 | NaN | NaN | NaN | 0.320 |
11159 | 2021-01-12 | Wyoming | 16467.0 | 47800.0 | 13577.0 | 0.37 | 2.85 | 2116.0 | 2.35 | 8.26 | NaN | NaN | NaN | 0.344 |
65 rows × 14 columns
|
|
15746663.0
|
|
|
|
|
|
vaccinations | |
---|---|
2020-12-20 | 0.0 |
2020-12-21 | 0.0 |
2020-12-22 | 0.0 |
2020-12-23 | 0.0 |
2020-12-24 | 0.0 |
... | ... |
2021-06-30 | 366017545.0 |
2021-07-01 | 367355455.0 |
2021-07-02 | 367983174.0 |
2021-07-03 | 368905977.0 |
2021-07-04 | 369524458.0 |
197 rows × 1 columns
|
|
vaccinations | |
---|---|
2020-12-20 | 0.0 |
2020-12-21 | 0.0 |
2020-12-22 | 0.0 |
2020-12-23 | 0.0 |
2020-12-24 | 0.0 |
... | ... |
2021-06-30 | 366017545.0 |
2021-07-01 | 367355455.0 |
2021-07-02 | 367983174.0 |
2021-07-03 | 368905977.0 |
2021-07-04 | 369524458.0 |
197 rows × 1 columns
|
|
[<matplotlib.axis.XTick at 0x208ab850c18>,
<matplotlib.axis.XTick at 0x208ab850be0>,
<matplotlib.axis.XTick at 0x208ab8426a0>,
<matplotlib.axis.XTick at 0x208ad89a588>,
<matplotlib.axis.XTick at 0x208ad89aa20>,
<matplotlib.axis.XTick at 0x208ad89aeb8>,
<matplotlib.axis.XTick at 0x208ad89a978>]
|
|
|
|
continentName | continentEnglishName | countryName | countryEnglishName | provinceName | provinceEnglishName | province_zipCode | province_confirmedCount | province_suspectedCount | province_curedCount | province_deadCount | updateTime | cityName | cityEnglishName | city_zipCode | city_confirmedCount | city_suspectedCount | city_curedCount | city_deadCount | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 北美洲 | North America | 美国 | United States of America | 美国 | United States of America | 971002 | 33718538 | 0.0 | 29096816 | 605526 | 2021-07-05 19:13:09 | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
1 | 欧洲 | Europe | 法国 | France | 法国 | France | 961002 | 5921696 | 0.0 | 353370 | 111190 | 2021-07-05 19:12:06 | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
2 | 南美洲 | South America | 巴西 | Brazil | 巴西 | Brazil | 973003 | 18769808 | 0.0 | 17082876 | 524475 | 2021-07-05 19:12:06 | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
3 | 欧洲 | Europe | 瑞典 | Sweden | 瑞典 | Sweden | 962005 | 1090880 | 0.0 | 4971 | 14631 | 2021-07-05 19:12:06 | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
4 | 欧洲 | Europe | 俄罗斯 | Russia | 俄罗斯 | Russia | 964006 | 5635294 | 0.0 | 5083441 | 138579 | 2021-07-05 19:12:06 | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
554367 | 亚洲 | Asia | 中国 | China | 辽宁省 | Liaoning | 210000 | 0 | 1.0 | 0 | 0 | 2020-01-22 03:28:10 | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
554368 | 亚洲 | Asia | 中国 | China | 台湾 | Taiwan | 710000 | 1 | 0.0 | 0 | 0 | 2020-01-22 03:28:10 | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
554369 | 亚洲 | Asia | 中国 | Hongkong | 香港 | Hongkong | 810000 | 0 | 117.0 | 0 | 0 | 2020-01-22 03:28:10 | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
554370 | 亚洲 | Asia | 中国 | China | 黑龙江省 | Heilongjiang | 230000 | 0 | 1.0 | 0 | 0 | 2020-01-22 03:28:10 | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
554371 | 亚洲 | Asia | 中国 | China | 湖南省 | Hunan | 430000 | 1 | 0.0 | 0 | 0 | 2020-01-22 03:28:10 | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
554372 rows × 19 columns
|
|
continentName | continentEnglishName | countryName | countryEnglishName | provinceName | provinceEnglishName | province_zipCode | province_confirmedCount | province_suspectedCount | province_curedCount | province_deadCount | updateTime | cityName | cityEnglishName | city_zipCode | city_confirmedCount | city_suspectedCount | city_curedCount | city_deadCount | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 北美洲 | North America | 美国 | United States of America | 美国 | United States of America | 971002 | 33718538 | 0.0 | 29096816 | 605526 | 2021-07-05 19:13:09 | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
106 | 北美洲 | North America | 美国 | United States of America | 美国 | United States of America | 971002 | 33716933 | 0.0 | 29096816 | 605526 | 2021-07-05 11:05:16 | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
308 | 北美洲 | North America | 美国 | United States of America | 美国 | United States of America | 971002 | 33716933 | 0.0 | 29096816 | 605526 | 2021-07-05 10:01:19 | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
437 | 北美洲 | North America | 美国 | United States of America | 美国 | United States of America | 971002 | 33716933 | 0.0 | 29096816 | 605526 | 2021-07-05 09:39:02 | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
728 | 北美洲 | North America | 美国 | United States of America | 美国 | United States of America | 971002 | 33714928 | 0.0 | 29087421 | 605524 | 2021-07-04 21:41:13 | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
541769 | 北美洲 | North America | 美国 | United States of America | 美国 | United States of America | 971002 | 9 | 0.0 | 0 | 0 | 2020-02-03 09:28:34 | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
543505 | 北美洲 | North America | 美国 | United States of America | 美国 | United States of America | 971002 | 8 | 0.0 | 0 | 0 | 2020-02-02 07:41:43 | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
545557 | 北美洲 | North America | 美国 | United States of America | 美国 | United States of America | 971002 | 6 | 0.0 | 0 | 0 | 2020-02-01 02:48:13 | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
547090 | NaN | NaN | 美国 | United States of America | 美国 | United States of America | 971002 | 6 | 0.0 | 0 | 0 | 2020-01-31 07:17:36 | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
550409 | NaN | NaN | 美国 | United States of America | 美国 | United States of America | 971002 | 5 | 0.0 | 0 | 0 | 2020-01-27 17:20:43 | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
3241 rows × 19 columns
|
|
province_curedCount | updateTime | |
---|---|---|
520054 | 3 | 2020-02-12 |
517924 | 3 | 2020-02-13 |
515650 | 3 | 2020-02-14 |
514566 | 3 | 2020-02-15 |
511738 | 3 | 2020-02-16 |
... | ... | ... |
3425 | 29026688 | 2021-07-01 |
2131 | 29052087 | 2021-07-02 |
1499 | 29072881 | 2021-07-03 |
728 | 29087421 | 2021-07-04 |
0 | 29096816 | 2021-07-05 |
477 rows × 2 columns
|
|
520054 3
517924 3
515650 3
514566 3
511738 3
...
3425 29026688
2131 29052087
1499 29072881
728 29087421
0 29096816
Name: province_curedCount, Length: 477, dtype: int64
|
|
province_curedCount | |
---|---|
updateTime | |
2020-02-12 | 3 |
2020-02-13 | 3 |
2020-02-14 | 3 |
2020-02-15 | 3 |
2020-02-16 | 3 |
... | ... |
2021-07-01 | 29026688 |
2021-07-02 | 29052087 |
2021-07-03 | 29072881 |
2021-07-04 | 29087421 |
2021-07-05 | 29096816 |
477 rows × 1 columns
|
|
|
|
curedCount | |
---|---|
updateTime | |
2021-03-02 | 19817532 |
2021-03-03 | 19905322 |
2021-03-04 | 19997983 |
2021-03-05 | 20093442 |
2021-03-06 | 20183329 |
... | ... |
2021-07-01 | 29026688 |
2021-07-02 | 29052087 |
2021-07-03 | 29072881 |
2021-07-04 | 29087421 |
2021-07-05 | 29096816 |
106 rows × 1 columns
|
|
vaccinations | |
---|---|
updateTime | |
2021-03-02 | 105774893.0 |
2021-03-03 | 108010927.0 |
2021-03-04 | 110417023.0 |
2021-03-05 | 113492161.0 |
2021-03-06 | 117171344.0 |
... | ... |
2021-06-30 | 366017545.0 |
2021-07-01 | 367355455.0 |
2021-07-02 | 367983174.0 |
2021-07-03 | 368905977.0 |
2021-07-04 | 369524458.0 |
125 rows × 1 columns
|
|
curedCount | vaccinations | |
---|---|---|
updateTime | ||
2021-03-02 | 19817532 | 105774893.0 |
2021-03-03 | 19905322 | 108010927.0 |
2021-03-04 | 19997983 | 110417023.0 |
2021-03-05 | 20093442 | 113492161.0 |
2021-03-06 | 20183329 | 117171344.0 |
... | ... | ... |
2021-06-30 | 29007495 | 366017545.0 |
2021-07-01 | 29026688 | 367355455.0 |
2021-07-02 | 29052087 | 367983174.0 |
2021-07-03 | 29072881 | 368905977.0 |
2021-07-04 | 29087421 | 369524458.0 |
105 rows × 2 columns
|
|
|
|
date | death | deathIncrease | inIcuCumulative | inIcuCurrently | hospitalizedIncrease | hospitalizedCurrently | hospitalizedCumulative | negative | negativeIncrease | onVentilatorCumulative | onVentilatorCurrently | positive | positiveIncrease | Unnamed: 14 | states | totalTestResults | totalTestResultsIncrease | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
419 | 2020-01-13 | NaN | 0 | NaN | NaN | 0 | NaN | NaN | NaN | 0 | NaN | NaN | NaN | 0 | NaN | 1 | 0 | 0 |
418 | 2020-01-14 | NaN | 0 | NaN | NaN | 0 | NaN | NaN | NaN | 0 | NaN | NaN | 0.0 | 0 | NaN | 1 | 0 | 0 |
417 | 2020-01-15 | NaN | 0 | NaN | NaN | 0 | NaN | NaN | NaN | 0 | NaN | NaN | 0.0 | 0 | NaN | 1 | 0 | 0 |
416 | 2020-01-16 | NaN | 0 | NaN | NaN | 0 | NaN | NaN | NaN | 0 | NaN | NaN | 0.0 | 0 | NaN | 1 | 0 | 0 |
415 | 2020-01-17 | NaN | 0 | NaN | NaN | 0 | NaN | NaN | NaN | 0 | NaN | NaN | 0.0 | 0 | NaN | 1 | 0 | 0 |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
4 | 2021-03-03 | 508665.0 | 2449 | 45214.0 | 9359.0 | 2172 | 45462.0 | 873073.0 | 73857281.0 | 267001 | 4260.0 | 3094.0 | 28520365.0 | 66836 | 0.002349 | 56 | 357888671 | 1406795 |
3 | 2021-03-04 | 510408.0 | 1743 | 45293.0 | 8970.0 | 1530 | 44172.0 | 874603.0 | 74035238.0 | 177957 | 4267.0 | 2973.0 | 28585852.0 | 65487 | 0.002296 | 56 | 359479655 | 1590984 |
2 | 2021-03-05 | 512629.0 | 2221 | 45373.0 | 8634.0 | 2781 | 42541.0 | 877384.0 | 74307155.0 | 271917 | 4275.0 | 2889.0 | 28654639.0 | 68787 | 0.002406 | 56 | 361224072 | 1744417 |
1 | 2021-03-06 | 514309.0 | 1680 | 45453.0 | 8409.0 | 503 | 41401.0 | 877887.0 | 74450990.0 | 143835 | 4280.0 | 2811.0 | 28714654.0 | 60015 | 0.002094 | 56 | 362655064 | 1430992 |
0 | 2021-03-07 | 515151.0 | 842 | 45475.0 | 8134.0 | 726 | 40199.0 | 878613.0 | 74582825.0 | 131835 | 4281.0 | 2802.0 | 28756489.0 | 41835 | 0.001457 | 56 | 363825123 | 1170059 |
420 rows × 18 columns
|
|
positive | |
---|---|
updateTime | |
2020-01-13 | NaN |
2020-01-14 | 0.0 |
2020-01-15 | 0.0 |
2020-01-16 | 0.0 |
2020-01-17 | 0.0 |
... | ... |
2021-03-03 | 28520365.0 |
2021-03-04 | 28585852.0 |
2021-03-05 | 28654639.0 |
2021-03-06 | 28714654.0 |
2021-03-07 | 28756489.0 |
420 rows × 1 columns
|
|
|
|
confirmedCount | |
---|---|
updateTime | |
2020-01-27 | 5 |
2020-01-31 | 6 |
2020-02-01 | 6 |
2020-02-02 | 8 |
2020-02-03 | 9 |
... | ... |
2021-07-01 | 33665047 |
2021-07-02 | 33679489 |
2021-07-03 | 33709176 |
2021-07-04 | 33714928 |
2021-07-05 | 33718538 |
486 rows × 1 columns
|
|
curedCount | vaccinations | confirmedCount | |
---|---|---|---|
updateTime | |||
2021-03-02 | 19817532 | 105774893.0 | 28664448 |
2021-03-03 | 19905322 | 108010927.0 | 28719624 |
2021-03-04 | 19997983 | 110417023.0 | 28771556 |
2021-03-05 | 20093442 | 113492161.0 | 28827140 |
2021-03-06 | 20183329 | 117171344.0 | 28894787 |
... | ... | ... | ... |
2021-06-30 | 29007495 | 366017545.0 | 33653426 |
2021-07-01 | 29026688 | 367355455.0 | 33665047 |
2021-07-02 | 29052087 | 367983174.0 | 33679489 |
2021-07-03 | 29072881 | 368905977.0 | 33709176 |
2021-07-04 | 29087421 | 369524458.0 | 33714928 |
105 rows × 3 columns
|
|
完整文档详见:博客相关资源-常微分偏微分建模练习