shollercoaster commited on
Commit
4cd6925
·
1 Parent(s): 851afaf

Upload 4 files

Browse files
Files changed (4) hide show
  1. Pop_Data.csv +169 -0
  2. app.py +27 -0
  3. dynamic_pricing.py +114 -0
  4. requirements.txt +7 -0
Pop_Data.csv ADDED
@@ -0,0 +1,169 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ place,url,scrape_time,day_of_week,hour_of_day,popularity_percent_normal,Base_Price
2
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Monday,0,24,200
3
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Monday,1,9,200
4
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Monday,2,1,200
5
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Monday,3,1,200
6
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Monday,4,2,200
7
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Monday,5,2,200
8
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Monday,6,5,200
9
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Monday,7,8,200
10
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Monday,8,12,200
11
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Monday,9,15,200
12
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Monday,10,17,200
13
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Monday,11,21,200
14
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Monday,12,26,200
15
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Monday,13,33,200
16
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Monday,14,42,210
17
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Monday,15,50,250
18
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Monday,16,54,270
19
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Monday,17,51,255
20
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Monday,18,44,220
21
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Monday,19,36,200
22
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Monday,20,32,200
23
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Monday,21,31,200
24
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Monday,22,31,200
25
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Monday,23,29,200
26
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Tuesday,0,23,200
27
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Tuesday,1,15,200
28
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Tuesday,2,8,200
29
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Tuesday,3,3,200
30
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Tuesday,4,1,200
31
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Tuesday,5,1,200
32
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Tuesday,6,2,200
33
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Tuesday,7,5,200
34
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Tuesday,8,7,200
35
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Tuesday,9,10,200
36
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Tuesday,10,15,200
37
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Tuesday,11,20,200
38
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Tuesday,12,27,200
39
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Tuesday,13,35,200
40
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Tuesday,14,42,210
41
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Tuesday,15,47,235
42
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Tuesday,16,48,240
43
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Tuesday,17,46,230
44
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Tuesday,18,40,200
45
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Tuesday,19,31,200
46
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Tuesday,20,22,200
47
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Tuesday,21,14,200
48
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Tuesday,22,8,200
49
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Tuesday,23,3,200
50
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Wednesday,0,1,200
51
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Wednesday,1,1,200
52
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Wednesday,2,1,200
53
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Wednesday,3,1,200
54
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Wednesday,4,1,200
55
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Wednesday,5,3,200
56
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Wednesday,6,30,200
57
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Wednesday,7,64,320
58
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Wednesday,8,48,240
59
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Wednesday,9,23,200
60
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Wednesday,10,25,200
61
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Wednesday,11,31,200
62
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Wednesday,12,31,200
63
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Wednesday,13,34,200
64
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Wednesday,14,48,240
65
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Wednesday,15,70,350
66
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Wednesday,16,90,400
67
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Wednesday,17,99,400
68
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Wednesday,18,93,400
69
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Wednesday,19,73,365
70
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Wednesday,20,49,245
71
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Wednesday,21,27,200
72
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Wednesday,22,12,200
73
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Wednesday,23,3,200
74
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Thursday,0,1,200
75
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Thursday,1,1,200
76
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Thursday,2,1,200
77
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Thursday,3,1,200
78
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Thursday,4,1,200
79
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Thursday,5,4,200
80
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Thursday,6,33,200
81
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Thursday,7,65,325
82
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Thursday,8,47,235
83
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Thursday,9,26,200
84
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Thursday,10,27,200
85
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Thursday,11,31,200
86
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Thursday,12,35,200
87
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Thursday,13,43,215
88
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Thursday,14,55,275
89
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Thursday,15,68,340
90
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Thursday,16,79,395
91
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Thursday,17,84,400
92
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Thursday,18,82,400
93
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Thursday,19,74,370
94
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Thursday,20,61,305
95
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Thursday,21,47,235
96
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Thursday,22,32,200
97
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Thursday,23,20,200
98
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Friday,0,11,200
99
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Friday,1,5,200
100
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Friday,2,1,200
101
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Friday,3,1,200
102
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Friday,4,1,200
103
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Friday,5,6,200
104
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Friday,6,30,200
105
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Friday,7,57,285
106
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Friday,8,48,240
107
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Friday,9,24,200
108
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Friday,10,23,200
109
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Friday,11,35,200
110
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Friday,12,39,200
111
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Friday,13,38,200
112
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Friday,14,45,225
113
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Friday,15,61,305
114
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Friday,16,79,395
115
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Friday,17,90,400
116
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Friday,18,88,400
117
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Friday,19,76,380
118
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Friday,20,57,285
119
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Friday,21,36,200
120
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Friday,22,20,200
121
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Friday,23,9,200
122
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Saturday,0,2,250
123
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Saturday,1,1,250
124
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Saturday,2,1,250
125
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Saturday,3,1,250
126
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Saturday,4,1,250
127
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Saturday,5,5,250
128
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Saturday,6,30,250
129
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Saturday,7,60,370
130
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Saturday,8,57,352
131
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Saturday,9,29,250
132
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Saturday,10,15,250
133
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Saturday,11,19,250
134
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Saturday,12,32,250
135
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Saturday,13,48,298
136
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Saturday,14,65,400
137
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Saturday,15,79,484
138
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Saturday,16,86,500
139
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Saturday,17,85,500
140
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Saturday,18,77,472
141
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Saturday,19,62,382
142
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Saturday,20,46,286
143
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Saturday,21,37,250
144
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Saturday,22,37,250
145
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Saturday,23,24,250
146
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Sunday,0,6,250
147
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Sunday,1,,250
148
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Sunday,2,1,250
149
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Sunday,3,1,250
150
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Sunday,4,5,250
151
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Sunday,5,13,250
152
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Sunday,6,23,250
153
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Sunday,7,33,250
154
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Sunday,8,41,256
155
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Sunday,9,43,268
156
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Sunday,10,38,250
157
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Sunday,11,31,250
158
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Sunday,12,27,250
159
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Sunday,13,33,250
160
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Sunday,14,51,316
161
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Sunday,15,77,472
162
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Sunday,16,97,500
163
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Sunday,17,100,500
164
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Sunday,18,82,500
165
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Sunday,19,56,346
166
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Sunday,20,38,250
167
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Sunday,21,36,250
168
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Sunday,22,42,262
169
+ AnRYn1F8NfSGLexf7.20200318_161636,https://goo.gl/maps/AnRYn1F8NfSGLexf7,20200318_161636,Sunday,23,39,250
app.py ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from flask import Flask, request, jsonify
2
+ import dynamic_pricing
3
+ import joblib
4
+
5
+ app = Flask(__name__)
6
+
7
+ loaded_rf_model = joblib.load("random_forest_model.pkl")
8
+
9
+ @app.route('/', methods=['POST'])
10
+ def predict_amt():
11
+ try:
12
+ # Get data from the request
13
+ data = request.get_json()
14
+
15
+ # Use your machine learning model to make predictions
16
+ prediction = loaded_rf_model.predict(data) # Replace with your model code
17
+
18
+ # Return the prediction as a JSON response
19
+ return jsonify({'prediction': prediction})
20
+
21
+ except Exception as e:
22
+ return jsonify({'error': str(e)}), 400
23
+
24
+
25
+ if __name__ == "__main__":
26
+ app.run(debug=True)
27
+
dynamic_pricing.py ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # -*- coding: utf-8 -*-
2
+ """dynamic pricing.ipynb
3
+
4
+ Automatically generated by Colaboratory.
5
+
6
+ Original file is located at
7
+ https://colab.research.google.com/drive/1pMuvzwELNm1DsTdL5dfBdA2HCjB6uwgh
8
+ """
9
+
10
+ # Commented out IPython magic to ensure Python compatibility.
11
+ import datetime
12
+ import joblib
13
+ import numpy as np
14
+ import pandas as pd
15
+
16
+ import matplotlib.pyplot as plt
17
+ import seaborn as sns
18
+ # %matplotlib inline
19
+
20
+ from sklearn.model_selection import train_test_split
21
+ from sklearn.linear_model import LinearRegression
22
+ from sklearn.ensemble import RandomForestRegressor
23
+ from sklearn.preprocessing import LabelEncoder
24
+ from sklearn.preprocessing import StandardScaler
25
+ from sklearn.metrics import r2_score
26
+
27
+ dataset = pd.read_csv("Pop_Data.csv")
28
+ dataset.head(5)
29
+
30
+ label_encoder = LabelEncoder()
31
+ dataset['day_of_week'] = label_encoder.fit_transform(dataset['day_of_week'])
32
+
33
+ X_train, X_test, y_train, y_test = train_test_split(dataset.iloc[:, :-1],
34
+ dataset.iloc[:, -1],
35
+ test_size = 0.3,
36
+ random_state = 42)
37
+
38
+ X_train.info()
39
+
40
+ """# EDA"""
41
+
42
+ X_train = X_train.iloc[:, 3:]
43
+ X_test = X_test.iloc[:, 3:]
44
+
45
+ X_train.info
46
+
47
+ plt.figure(figsize = (12, 8))
48
+ plot = sns.countplot(x = 'day_of_week', data = X_train)
49
+ plt.xticks(rotation = 90)
50
+ for p in plot.patches:
51
+ plot.annotate(p.get_height(),
52
+ (p.get_x() + p.get_width() / 2.0,
53
+ p.get_height()),
54
+ ha = 'center',
55
+ va = 'center',
56
+ xytext = (0, 5),
57
+ textcoords = 'offset points')
58
+
59
+ plt.title("Price changes based on day")
60
+ plt.xlabel("Day")
61
+ plt.ylabel("Price")
62
+
63
+ print(sum(X_train["day_of_week"].isnull()))
64
+ print(sum(X_test["day_of_week"].isnull()))
65
+
66
+ print(sum(X_train["hour_of_day"].isnull()))
67
+ print(sum(X_test["hour_of_day"].isnull()))
68
+
69
+ print(sum(X_train["popularity_percent_normal"].isnull()))
70
+ print(sum(X_test["popularity_percent_normal"].isnull()))
71
+
72
+ X_train["popularity_percent_normal"].fillna(X_train["popularity_percent_normal"].astype("float64").mean(), inplace = True)
73
+
74
+ # X_train = pd.get_dummies(X_train,
75
+ # columns = ["day_of_week"],
76
+ # drop_first = True)
77
+
78
+ # X_test = pd.get_dummies(X_test,
79
+ # columns = ["day_of_week"],
80
+ # drop_first = True)
81
+
82
+ # missing_cols = set(X_train.columns) - set(X_test.columns)
83
+ # for col in missing_cols:
84
+ # X_test[col] = 0
85
+ # X_test = X_test[X_train.columns]
86
+
87
+ standardScaler = StandardScaler()
88
+ standardScaler.fit(X_train)
89
+ X_train = standardScaler.transform(X_train)
90
+ X_test = standardScaler.transform(X_test)
91
+
92
+ linearRegression = LinearRegression()
93
+ linearRegression.fit(X_train, y_train)
94
+ y_pred = linearRegression.predict(X_test)
95
+ r2_score(y_test, y_pred)
96
+
97
+ rf = RandomForestRegressor(n_estimators = 100)
98
+ rf.fit(X_train, y_train)
99
+ y_pred = rf.predict(X_test)
100
+ r2_score(y_test, y_pred)
101
+
102
+ def save_model(model, filename):
103
+ joblib.dump(model, filename)
104
+
105
+ # Save the model
106
+ save_model(rf, "random_forest_model.pkl")
107
+
108
+ def predict(data):
109
+ dataArr = list(data)
110
+ day_of_week_encoded = label_encoder.fit_transform([dataArr[0]])[0]
111
+ datapoint = [day_of_week_encoded, dataArr[1], dataArr[2]]
112
+ npArr = np.asarray(datapoint).reshape(1,-1)
113
+ x_test = standardScaler.fit_transform(npArr)
114
+ return rf.predict(x_test)
requirements.txt ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ pip==23.2.1
2
+ pandas==1.3.3
3
+ matplotlib==3.4.3
4
+ numpy==1.21.2
5
+ seaborn==0.11.2
6
+ scikit-learn==0.24.2
7
+ Flask==2.1.1