--
You received this message because you are subscribed to the Google Groups "Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/fdc50657-4125-4c2f-b0a9-03bc701fe869%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/CAGHj7-JFAK_gkNRCRdb4z%3Dq%2B76ivMxz5Gfct%3DQjgXxDRuTLDiA%40mail.gmail.com.
Dr Racket is amazing. Need to a demo of this and plot side by side.
DrRacket is so close to being an electronic lab notebook it’s almost painful....Stephen
On Wed, 4 Sep 2019 at 12:20, Sage Gerard <sa...@sagegerard.com> wrote:
How cool is that! DrRacket's flexibility is pretty amazing
-------- Original Message --------
On Sep 4, 2019, 5:41 AM, Alex Harsanyi < alexha...@gmail.com> wrote:
--As part of another project, I had to update my map-widget to act as a snip% so it can be inserted into a pasteboard%. An unintended side benefit of this work is that maps can now be embedded in the DrRacket REPL -- this in itself is not very useful, but it does make for a cool demo, so I thought I would record a video of it and share it here: https://youtu.be/MrS0FG-X8DIHere is a screenshot too:For those who want to try it out, you can install the map-widget package, than type the following in the REPL:(require map-widget)(new map-snip%)Note that map tile download is not very fast, but the code does cache all downloaded data locally, this means that once tiles are downloaded, subsequent runs which show the same area will be fast. In the linked video you don't see any tiles being loaded, as I did a practice run before recording it and all map data was locally available, making it load instantly -- you can do that too if you run the code a second time.And in case you want to have a look at the code itself, it is here: https://github.com/alex-hhh/map-widgetEnjoy,Alex.
You received this message because you are subscribed to the Google Groups "Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to racket...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/fdc50657-4125-4c2f-b0a9-03bc701fe869%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to racket...@googlegroups.com.
------
This is utterly cool!If I may, I suggest to rebind up and down to page up and page down (or even the converse, as "down" means to me "go downwards towards Earth"), use the arrows to navigate NESW, and bind mouse scrolls to zooming too.
A package containing a database of the positions of the major cities and countries would be nice too :)
On Wed, Sep 4, 2019 at 12:50 PM Stephen De Gabrielle <spdega...@gmail.com> wrote:
Dr Racket is amazing. Need to a demo of this and plot side by side.DrRacket is so close to being an electronic lab notebook it’s almost painful....Stephen
On Wed, 4 Sep 2019 at 12:20, Sage Gerard <sa...@sagegerard.com> wrote:
How cool is that! DrRacket's flexibility is pretty amazing
-------- Original Message --------
On Sep 4, 2019, 5:41 AM, Alex Harsanyi < alexha...@gmail.com> wrote:
--As part of another project, I had to update my map-widget to act as a snip% so it can be inserted into a pasteboard%. An unintended side benefit of this work is that maps can now be embedded in the DrRacket REPL -- this in itself is not very useful, but it does make for a cool demo, so I thought I would record a video of it and share it here: https://youtu.be/MrS0FG-X8DIHere is a screenshot too:For those who want to try it out, you can install the map-widget package, than type the following in the REPL:(require map-widget)(new map-snip%)Note that map tile download is not very fast, but the code does cache all downloaded data locally, this means that once tiles are downloaded, subsequent runs which show the same area will be fast. In the linked video you don't see any tiles being loaded, as I did a practice run before recording it and all map data was locally available, making it load instantly -- you can do that too if you run the code a second time.And in case you want to have a look at the code itself, it is here: https://github.com/alex-hhh/map-widgetEnjoy,Alex.
You received this message because you are subscribed to the Google Groups "Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to racket...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/fdc50657-4125-4c2f-b0a9-03bc701fe869%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to racket...@googlegroups.com.
--------
You received this message because you are subscribed to the Google Groups "Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to racket...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/c23a6d78-1a59-4a77-9d0d-bcbcef1c27a9%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/20190906122801.w5yhwfbzkods2fqr%40topoi.pooq.com.
#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)
(df-add-derived df series (list series) (lambda (v) (string->number (car v)))))
(define df (df-read/csv "worldcities.csv"))
;; Convert numeric series to numbers
(for ([series '("lat" "lng" "population")])
(->numeric df series))
(define ((is-city? name) v)
(equal? (vector-ref v 0) name))
(df-select* df "city" "country" "lat" "lng" #:filter (is-city? "Perth"))
;; The above call produces:
;; '#(#("Perth" "Australia" -31.955 115.84)
;; #("Perth" "United Kingdom" 56.4003 -3.47))
There's a small free database here too: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 <sa...@sagegerard.com> wrote:
Would geonames help?
http://www.geonames.org/
-------- Original Message --------
On Sep 6, 2019, 8:28 AM, Hendrik Boom < hen...@topoi.pooq.com> 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
> > countries would be nice too :)
> >
>
>
> A general facility able to resolve location names to GPS coordinates would
> be a lot of work, and I don't have time for such a thing. Sorry.There must be a GPS database of cities available somewhere already.
-- hendrik
--
You received this message because you are subscribed to the Google Groups "Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to racket...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/20190906122801.w5yhwfbzkods2fqr%40topoi.pooq.com.
--
You received this message because you are subscribed to the Google Groups "Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to racket...@googlegroups.com.
#lang racket
(require data-frame)
(define df (df-read/csv "worldcities.csv" #:quoted-numbers? #t))
(define ((is-city? name) v)
(equal? (vector-ref v 0) name))
(df-select* df "city" "country" "lat" "lng" #:filter (is-city? "Perth"))
;; Produces:
;; '#(#("Perth" "Australia" -31.955 115.84)
;; #("Perth" "United Kingdom" 56.4003 -3.47))
To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/d4353473-061d-4651-aedc-425351833968%40googlegroups.com.