[jupyter] Re: Magic to embed maps in notebooks

2017-12-12 Thread Tony Hirst
Okay - added layering - pass a map in as a variable name  pointing to a map 
in the -b argument:

x = %folium_map -m 52.0250,-0.7084,"My marker"
%folium_map -b x -m 52.02,-0.708,"My other marker"



On Tuesday, 12 December 2017 13:46:13 UTC, Tony Hirst wrote:
>
> @Lawrence
>
> Yeah, I was wondering that... I guess it could return the map object to 
> let you play with it, or pass a map object into it, which would let you 
> build up layers/
> Re: cell magic, I wasn't clear in my own mind how that would work any 
> simpler than just writing py/folium statements?
>
> @Tim
>
> I keep forgetting to look to nteract... thx for reminder
>
> --tony
>
> On Monday, 11 December 2017 04:37:47 UTC, Lawrence D’Oliveiro wrote:
>>
>> On Monday, December 11, 2017 at 7:19:28 AM UTC+13, Tony Hirst wrote:
>>>
>>> Whilst trying to show folk how easy it was to embed interactive maps in 
>>> notebooks using things like folium, I kept getting the response that it 
>>> still required code familiarity which would be a blocker to some. So I 
>>> wondered whether magic might be a way to try to simplify it.
>>>
>>> Example magic here: https://github.com/psychemedia/ipython_magic_folium
>>>
>>>
>> Cool. Can you have other stuff in the same cell? E.g.
>>
>> ... stuff before ...
>> %folium ...
>>... stuff after ...
>>
>> If not, let me suggest making it a cell magic rather than a line magic. 
>> Then you can also use the rest of the cell contents for purposes such as 
>> adding overlays.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/0ca08c7d-fb4b-4ef9-8172-e67e61ec0276%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[jupyter] Re: Magic to embed maps in notebooks

2017-12-12 Thread Tony Hirst
@Lawrence

Yeah, I was wondering that... I guess it could return the map object to let 
you play with it, or pass a map object into it, which would let you build 
up layers/
Re: cell magic, I wasn't clear in my own mind how that would work any 
simpler than just writing py/folium statements?

@Tim

I keep forgetting to look to nteract... thx for reminder

--tony

On Monday, 11 December 2017 04:37:47 UTC, Lawrence D’Oliveiro wrote:
>
> On Monday, December 11, 2017 at 7:19:28 AM UTC+13, Tony Hirst wrote:
>>
>> Whilst trying to show folk how easy it was to embed interactive maps in 
>> notebooks using things like folium, I kept getting the response that it 
>> still required code familiarity which would be a blocker to some. So I 
>> wondered whether magic might be a way to try to simplify it.
>>
>> Example magic here: https://github.com/psychemedia/ipython_magic_folium
>>
>>
> Cool. Can you have other stuff in the same cell? E.g.
>
> ... stuff before ...
> %folium ...
>... stuff after ...
>
> If not, let me suggest making it a cell magic rather than a line magic. 
> Then you can also use the rest of the cell contents for purposes such as 
> adding overlays.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/6f39e2a4-ff17-4649-897e-484aaf705bc5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [jupyter] Re: Magic to embed maps in notebooks

2017-12-11 Thread Tim Head
On Mon, Dec 11, 2017 at 5:37 AM Lawrence D’Oliveiro 
wrote:

> On Monday, December 11, 2017 at 7:19:28 AM UTC+13, Tony Hirst wrote:
>>
>> Whilst trying to show folk how easy it was to embed interactive maps in
>> notebooks using things like folium, I kept getting the response that it
>> still required code familiarity which would be a blocker to some. So I
>> wondered whether magic might be a way to try to simplify it.
>>
>
Take a look at what nteract did with GeoJSON rendering:
https://github.com/nteract/nteract/#overview I've not used it for "real"
but it looks quite nice for "let me see what this will look like". Maybe
someone knows how well this mimetype is rendered in jupyter notebook/lab?

T

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAN3x1RaUFBQaLnHxBqoXaS1Wq4QxTLNZS84TtJVjMUPveTG40A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[jupyter] Re: Magic to embed maps in notebooks

2017-12-10 Thread Lawrence D’Oliveiro
On Monday, December 11, 2017 at 7:19:28 AM UTC+13, Tony Hirst wrote:
>
> Whilst trying to show folk how easy it was to embed interactive maps in 
> notebooks using things like folium, I kept getting the response that it 
> still required code familiarity which would be a blocker to some. So I 
> wondered whether magic might be a way to try to simplify it.
>
> Example magic here: https://github.com/psychemedia/ipython_magic_folium
>
>
Cool. Can you have other stuff in the same cell? E.g.

... stuff before ...
%folium ...
   ... stuff after ...

If not, let me suggest making it a cell magic rather than a line magic. 
Then you can also use the rest of the cell contents for purposes such as 
adding overlays.

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/03b11eef-db61-4ac4-b2f2-8edd6c860bbb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.