diff --git a/lib/data.q b/lib/data.q index eb044ce..9f07d19 100644 --- a/lib/data.q +++ b/lib/data.q @@ -1,6 +1,6 @@ / data processing -.cache.attended:([h:();username:()]data:()); +.cache.attended:([h:();username:()]data:()); / blank schema .cache.geocode:([h:();username:()]data:()); .data.attended:{[dict] / [params] get attended events for a user, checking for cached events; @@ -14,9 +14,9 @@ :res; }; -.data.geocode.venue:{[params] +.data.geocode.venue:{[params] / [params] return coordinates for a venue .log.o("Geocoding: {}";params`q); - res:.http.req.nominatim params; + res:.http.req.nominatim params; / request coords from nominatim if[0h=type res;:`lat`long!0n 0n]; :`lat`long!raze"F"$res`lat`lon; }; @@ -37,5 +37,5 @@ .data.markers:{[dict;data] / [inputs;venue info] vnl:distinct select city,venue,venId,state,country,lat,long from data; / select city coordinates m:value each .data.geocode.all[dict;vnl]; / geocode venues - :`markers`bounds!(m;(min;max)@\:m[;2 3]); + :`markers`bounds!(m;(min;max)[;m[;2 3]]); };