-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnotes.txt
More file actions
72 lines (58 loc) · 2.18 KB
/
notes.txt
File metadata and controls
72 lines (58 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
todo:
- cache results for site in local storage so it persists when extension is closded
- feature for meta analysis
- check if last search was google search
- use google api to google their google search (mb cache when they are already there, check best on patter best/top restauraunts sf/ny/chi)
- make tallys and statistics of top x results
- use descriptions of restaurants to create search/feeback data for chat gpt or just parsing
- use multple sources of data, this is where caching gets crucial, reddit api is freehttps://www.reddit.com/search.json?q=mysearchterm
- remove results that are x miles away from average center
- if mapbox results are < thershold of scrapes, use google
- sql cache results (table for main record)
api providfer pricing:
TomTom:0.55$/1000 requests = (0.00055 * 100) requests / session query = 0.05 = 5cents/session query
GoogleMaps: 0.0024$ per request = 0.0025 * 100 = 25cents/session query
ArcGIS: $0.5/1000 == 0.0005 * 100 = 0.05 = 5cents/session query **** winner winner
Mapbox: $0.60/1000 ? most pricy and most innacurated
quite expensive, need to cache results to offset costs. would make sense if we start it out as a trial for ny or sf only.
need to see what kind of results we can gather.
- are the results useful?
- how do the results compre to google Maps /
chache data:
CREATE TABLE Sites (
Url VARCHAR(300) NOT NULL,
City TEXT(100) NOT NULL,
PRIMARY KEY (Url)
);
CREATE TABLE Headers (
Id INTEGER() NOT NULL AUTO_INCREMENT,
Url TEXT(100) NOT NULL,
HeaderText VARCHAR(100) NOT_NULL,
PRIMARY KEY (Id),
FOREIGN KEY (Url) REFERENCES Sites(Url)
);
CREATE TABLE NearbyCities (
HeaderId INTEGER() NOT_NULL,
City VARCHAR(100) NOT_NULL,
PRIMARY KEY(HeaderId, City)
)
CREATE TABLE Places (
Id VARCHAR(50) NOT NULL,
Name VARCHAR(200) NOT NULL,
Address VARCHAR(100) NOT NULL,
Coords POINT(10) NOT NULL,
rating DOUBLE(20),
Service VARCHAR(50) NOT NULL,
EstablishmentWebsite TEXT(300),
PRIMARY KEY (Id),
FOREIGN KEY ()
);
PlaceFromCity (
PlaceId VARCHAR(50),
City VARCHAR(100) NOT_NULL,
)
CREATE TABLE HeadersPlaces (
PlaceId VARCHAR(50),
HeaderId INTEGER(),
PRIMARY KEY (PlaceId, HeaderId)
)