Skip to content

dominiqueplante/learning-julia

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Replicating Schelling's Dynamic Models of Segregation in Julia

This repository introduces the Julia programming language by replicating Schelling, Thomas C. "Dynamic models of segregation." Journal of mathematical sociology 1.2 (1971): 143-186..

Accompanying post

Why Julia?

From the creator's themselves:

We are greedy: we want more.

We want a language that's open source, with a liberal license. We want the speed of C with the dynamism of Ruby. We want a language that's homoiconic, with true macros like Lisp, but with obvious, familiar mathematical notation like Matlab. We want something as usable for general programming as Python, as easy for statistics as R, as natural for string processing as Perl, as powerful for linear algebra as Matlab, as good at gluing programs together as the shell. Something that is dirt simple to learn, yet keeps the most serious hackers happy. We want it interactive and we want it compiled.

Why Schelling's Model?

It's a classical paper in the social science literature with wide influence in urban studies, economics, sociology among other disciplines. The model is brilliantly simple - one could replicate it with a checkers board set, with remarkably profound conclusions.

Why another tutorial?

There are many other tutorials and introductory material out there that I recommend and have learnt from:

I take a slightly different approach. Rather than going over concepts (Types, Loops, Control Statements etc.), I take a problem-driven approach - given a particular problem, how can we solve it using Julia. This is my favourite way to learn something new, try it on an actual problem and see where we end up. The idea is that this will be an incremental learning repository where we learn something new and apply it to our problem.

Pre-requisites and Setup

Some prior experience in lanaguages like Python or R and knowledge of git would be useful.

For development, this code is written in Julia v1.4, using both the Jupyter Notebook inteface as well as the vscode plugin for editing .jl files.

Follow the instructions over here to setup Jupyter for Julia and julia-vscode plugin.

To use from Visual Studio Code

  • get Visual Studio Code Insiders

  • Install IJulia from the Julia REPL by pressing ] to enter pkg mode and entering:

    add IJulia

  • In Visual Studio Code Insiders, add the Jupyter Notebook extension

  • In Visual Studio Code Insiders, add the Julia extension

About

Learning Julia through replicating Schelling's Dynamic Models of Segregation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 100.0%