aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-06-18Put in special cases to correct slightly misnamed stations.HEADmainArun Isaac
* rent.scm (lines-at-station): Handle misnamed Paddington and Hammersmith stations.
2023-10-14Use list-transduce.Arun Isaac
list-transduce allows us to see desired house listings as soon as they are found. We don't have to wait until all desired house listings are processed. * rent.scm (main): Use list-transduce.
2023-10-14Abstract JSON requests.Arun Isaac
* rent.scm (json-get): New function. (cycling-distances, lines-at-station): Use json-get.
2023-10-14Query OSRM API for multiple destinations at once.Arun Isaac
Batching OSRM queries so that distances to multiple points are queried at once is more efficient. * rent.scm (cycling-distance): Delete function. (cycling-distances): New function. (%wembley-stadium): New variable. (list-house): Use cycling-distances with multiple destinations.
2023-10-14Directly query TfL API to find tube lines at station.Arun Isaac
Earlier, we were laboriously building a lookup table mapping all tube lines to the stations they serve, and inverting that lookup table. * rent.scm (all-tube-lines, stations-on-line): Delete functions. (lines-at-station): Rewrite to directly query TfL API.
2023-10-13Show hours live in more human-readable units.Arun Isaac
* rent.scm (list-house): Show hours live in hours or days as appropriate.
2023-10-07Never use exponential notation for latitudes and longitudes.Arun Isaac
* rent.scm (cycling-distance): Use ~f instead of ~a while formatting latitudes and longitudes.
2023-10-07Construct OSRM URL using format.Arun Isaac
format is simpler and more readable, in this case. * rent.scm (cycling-distance): Construct OSRM URL using format.
2023-09-26Add date constructor.Arun Isaac
* rent.scm (date): New function.
2023-09-26Add date comparison predicates.Arun Isaac
* rent.scm (make-date-comparer, date<=?, date>=?): New functions.
2023-09-26Re-indent main expression.Arun Isaac
* rent.scm (main): Re-indent.
2023-09-26Print "available from" date in house listing.Arun Isaac
* rent.scm (list-house): Print "available from" date.
2023-09-26Specify points explicitly in distance computation.Arun Isaac
Previously, work coordinates were implicit in cycling distance computation. Pass it explicitly as an argument. * rent.scm (house-cycling-distance): Rename to ... (cycling-distance): ... this. Pass start and end points explicitly. (list-house): Use cycling-distance instead of house-cycling-distance.
2023-09-26Convert "available from" to date object.Arun Isaac
* rent.scm (date+): New function. (all-houses): Use date+. (http-get*): Use current-time from (srfi srfi-19).
2023-09-26Add docstrings.Arun Isaac
* rent.scm: Add docstrings for functions that don't have them.
2023-09-26Adapt maximum tenants extraction to latest HTML.Arun Isaac
The HTML specifying the maximum tenants has changed slightly. Adapt. * rent.scm (house-maximum-tenants): Adapt to latest HTML.
2023-09-25Ensure atomic writes to cache.Arun Isaac
* rent.scm (call-with-atomic-output-file): New function. (http-get*): Use call-with-atomic-output-file instead of call-with-output-file.
2022-12-11Mention OpenStreetMap in README.Arun Isaac
* README.org: Mention OpenStreetMap.
2022-12-11Initial commitArun Isaac