Re: [racket-users] [OT] Cities and GPS

2019-09-08 Thread Laurent
This DB is even better: http://download.geonames.org/export/ On Sun, Sep 8, 2019 at 8:34 AM Laurent wrote: > Nice :) > > > On Sat, Sep 7, 2019 at 2:00 AM Alex Harsanyi > wrote: > >> In fact, I updated the data frame package to be able to read the CSV file >> directly, without having to

Re: [racket-users] [OT] Cities and GPS

2019-09-08 Thread Laurent
Nice :) On Sat, Sep 7, 2019 at 2:00 AM Alex Harsanyi wrote: > In fact, I updated the data frame package to be able to read the CSV file > directly, without having to process it, so the example now becomes: > > #lang racket > (require data-frame) > > (define df (df-read/csv "worldcities.csv"

Re: [racket-users] [OT] Cities and GPS

2019-09-06 Thread Alex Harsanyi
In fact, I updated the data frame package to be able to read the CSV file directly, without having to process it, so the example now becomes: #lang racket (require data-frame) (define df (df-read/csv "worldcities.csv" #:quoted-numbers? #t)) (define ((is-city? name) v) (equal? (vector-ref v

Re: [racket-users] [OT] Cities and GPS

2019-09-06 Thread Alex Harsanyi
That database is simple enough to use directly, not sure if it needs a separate package: #lang racket (require data-frame) ;; The worldcities.csv file has all values quoted, so df-read/csv reads them ;; all as strings. Convert a series to numbers. (define (->numeric df series)

Re: [racket-users] [OT] Cities and GPS

2019-09-06 Thread Laurent
There's a small free database here too: https://simplemaps.com/data/world-cities I started writing a simple query system for it this morning (csv->rktd, then just list of assoc operations). On Fri, Sep 6, 2019 at 1:35 PM Sage Gerard wrote: > Would geonames help? > http://www.geonames.org/ > >

Re: [racket-users] [OT] Cities and GPS

2019-09-06 Thread Sage Gerard
Would geonames help? http://www.geonames.org/ Original Message On Sep 6, 2019, 8:28 AM, Hendrik Boom wrote: > On Thu, Sep 05, 2019 at 10:42:01PM -0700, Alex Harsanyi wrote: > ... >> >> > >> > A package containing a database of the positions of the major cities and >> >

[racket-users] [OT] Cities and GPS

2019-09-06 Thread Hendrik Boom
On Thu, Sep 05, 2019 at 10:42:01PM -0700, Alex Harsanyi wrote: ... > > > > > A package containing a database of the positions of the major cities and > > countries would be nice too :) > > > > > A general facility able to resolve location names to GPS coordinates would > be a lot of work, and