Integration of NetLogo into a notebook environment?

34 views
Skip to first unread message

Brady, Corey

unread,
Feb 6, 2024, 12:08:28 PMFeb 6
to netlog...@googlegroups.com

Hello All –

A quick question – I am hoping to be able to integrate NetLogo models into a notebook like a python or R notebook (python preferable, but both of interest). 

Has such a thing been done?  Would it be hard?

Best,

-Corey

 

Corey Brady

Director, SMU Cluster for Technology-Enhanced Immersive Learning (TEIL)

Associate Professor, Mathematics Education and the Learning Sciences

 

corey...@smu.edu

Department of Teaching and Learning

Simmons School of Education and Human Development

A blue and red logo

Description automatically generated

John Chen

unread,
Feb 6, 2024, 12:29:52 PMFeb 6
to Brady, Corey, netlog...@googlegroups.com
Umit Aslam made some efforts to use NetLogo in Jupyter Notebook. 

Do you have specific hardware limitations, e.g. need to use it on Web? Chromebook? 

--
You received this message because you are subscribed to the Google Groups "netlogo-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netlogo-deve...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netlogo-devel/BB047B1F-99D1-4EAA-B7C0-613E643D9B1A%40smu.edu.

Brady, Corey

unread,
Feb 6, 2024, 12:49:32 PMFeb 6
to John Chen, netlog...@googlegroups.com

Hi. – I am exploring options, so no ‘hard’ constraints yet.

Web-based (e.g., Google Colab) is ideal, but I could probably do some contortions to get the basic functionality in a robust way. 
I want to use this in the context of a fairly large course in the fall.

-Corey

 

Corey Brady

Director, SMU Cluster for Technology-Enhanced Immersive Learning (TEIL)

Associate Professor, Mathematics Education and the Learning Sciences

 

corey...@smu.edu

Department of Teaching and Learning

Simmons School of Education and Human Development

A blue and red logo

Description automatically generated

 

From: John Chen <yuehanc...@u.northwestern.edu>
Date: Tuesday, February 6, 2024 at 11:29 AM
To: "Brady, Corey" <corey...@mail.smu.edu>
Cc: "netlog...@googlegroups.com" <netlog...@googlegroups.com>
Subject: Re: [netlogo-devel] Integration of NetLogo into a notebook environment?

 

John Chen

unread,
Feb 6, 2024, 1:10:26 PMFeb 6
to Brady, Corey, netlog...@googlegroups.com
Hi Corey,

I wonder if we should try to use the new NetLogo online forum for a more sustained discussion; I wonder, for the first part, which description matches better your needs.

1) Have a NetLogo-based computational notebook (i.e. the students write NetLogo code, or NetLogo code mixed with Python/R code);
2) Have a R/Python-based computational notebook that can call NetLogo code/models (i.e. the students write R/Python code, using pyNetLogo or NL4Py).

Best,
John Chen

John Chen

unread,
Feb 6, 2024, 1:29:05 PMFeb 6
to Brady, Corey, netlog...@googlegroups.com
If you meant the 2nd one, there is already an example here:

jeremy...@northwestern.edu

unread,
Feb 6, 2024, 1:34:57 PMFeb 6
to netlogo-devel
Hey Corey,

If you want to host the notebook on the web, and if the platforms you are looking at support embedding HTML pages (or links to pages) then NetLogo Web might be an option.  If those platforms allow interacting with the page via JavaScript, then you can use the NLW event and query systems to react to events inside the model and to get data out.  Documentation of those features is incomplete, but we have a sample repository showing the basics of wiring them up:  https://github.com/LaCuneta/netlogo-web-logging-example  I'm happy to answer questions on that if you do decide to try an implementation with it.

If you want to run a local instance with NetLogo desktop, then the PyNetLogo library that John linked might be worth a look.

-Jeremy

John Chen

unread,
Feb 6, 2024, 1:47:59 PMFeb 6
to jeremy...@northwestern.edu, netlogo-devel
Yeah, and if we are going down the NLW rabbit hole, we could consider using NetLogo's CodeMirror 6 support - part of our editor renovation project - since CodeMirror 6 is already used in JupyterLab. But then, to make notebooks really notebooks, we need to have many smaller code blocks. Well, that goes into my plans for NetLogo Chat now!

Reply all
Reply to author
Forward
0 new messages