Saturday, January 30, 2016

Agents on Campus: A NetLogo Example

In the past I have blogged on how one can use Repast Simphony to get agents to move around a network, which also inspired a similar model in  GeoMason (see here for the movie). Keeping with this theme Yang has recently finished a NetLogo model whereby agents use an A-star algorithm to find the shortest path between two locations. The movie below shows the basic model functionality.

For more information and code click here.

Tuesday, January 26, 2016

“Space, the Final Frontier”: How Good are Agent-Based Models at Simulating Individuals and Space in Cities?

Recently, Alison Heppenstall, Nick Malleson  and myself have just had a paper accepted in Systems entitled: “Space, the Final Frontier”: How Good are Agent-Based Models at Simulating Individuals and Space in Cities?" In the paper we critically examine how well agent-based models have  simulated a variety of urban processes. We discus what considerations are needed when choosing the appropriate level of spatial analysis and time frame to model urban phenomena and what role Big Data can play in agent-based modeling. Below you can read the abstract of the paper and see a number of example applications discussed.
Abstract: Cities are complex systems, comprising of many interacting parts. How we simulate and understand causality in urban systems is continually evolving. Over the last decade the agent-based modeling (ABM) paradigm has provided a new lens for understanding the effects of interactions of individuals and how through such interactions macro structures emerge, both in the social and physical environment of cities. However, such a paradigm has been hindered due to computational power and a lack of large fine scale datasets. Within the last few years we have witnessed a massive increase in computational processing power and storage, combined with the onset of Big Data. Today geographers find themselves in a data rich era. We now have access to a variety of data sources (e.g., social media, mobile phone data, etc.) that tells us how, and when, individuals are using urban spaces. These data raise several questions: can we effectively use them to understand and model cities as complex entities? How well have ABM approaches lent themselves to simulating the dynamics of urban processes? What has been, or will be, the influence of Big Data on increasing our ability to understand and simulate cities? What is the appropriate level of spatial analysis and time frame to model urban phenomena? Within this paper we discuss these questions using several examples of ABM applied to urban geography to begin a dialogue about the utility of ABM for urban modeling. The arguments that the paper raises are applicable across the wider research environment where researchers are considering using this approach.
Keywords: cities; agent-based modeling; big data; crime; retail; space; simulation

Figure 1. (A) System structure; (B) System hierarchy; and (C) Related subsystems/processes (adapted from Batty, 2013).

Reference cited:
Batty, M. (2013).  The New Science of Cities; MIT Press: Cambridge, MA, USA.

Full reference to the open access paper:
Heppenstall, A., Malleson, N. and Crooks A.T. (2016). “Space, the Final Frontier”: How Good are Agent-based Models at Simulating Individuals and Space in Cities?, Systems, 4(1), 9; doi: 10.3390/systems4010009 (pdf)

Monday, January 04, 2016

Measles Vaccination Narrative in Twitter

A summary of our approach

Continuing our work with respects to GeoSocial analysis we have recently published a paper in JMIR Public Health and Surveillance entitled "The Measles Vaccination Narrative in Twitter: A Quantitative Analysis". In this paper we explore how social media can be quantitatively studied to explore the narrative behind measles vaccinations. Below you can read the abstract to the paper which includes the background to why we chose to study this topic, the study objective, our methodology, a summary of our results and conclusions. 

Background: The emergence of social media is providing an alternative avenue for information exchange and opinion formation on health-related issues. Collective discourse in such media leads to the formation of a complex narrative, conveying public views and perceptions.

Objective: This paper presents a study of Twitter narrative regarding vaccination in the aftermath of the 2015 measles outbreak, both in terms of its cyber and physical characteristics. The contributions of this work are the analysis of the data for this particular study, as well as presenting a quantitative interdisciplinary approach to analyze such open-source data in the context of health narratives.

Methods: 669,136 tweets were collected in the period February 1 through March 9, 2015 referring to vaccination. These tweets were analyzed to identify key terms, connections among such terms, retweet patterns, the structure of the narrative, and connections to the geographical space.

Results: The data analysis captures the anatomy of the themes and relations that make up the discussion about vaccination in Twitter. The results highlight the higher impact of stories contributed by news organizations compared to direct tweets by health organizations in communicating health-related information. They also capture the structure of the anti-vaccination narrative and its terms of reference. Analysis also revealed the relationship between community engagement in Twitter and state policies regarding child vaccination. Residents of Vermont and Oregon, the two states with the highest rates of non-medical exemption from school-entry vaccines nationwide, are leading the social media discussion in terms of participation.

Conclusions: The interdisciplinary study of health-related debates in social media across the cyber-physical debate nexus leads to a greater understanding of public concerns, views, and responses to health-related issues. Further coalescing such capabilities shows promise towards advancing health communication, supporting the design of more effective strategies that take into account the complex and evolving public views of health issues.

Global distribution of tweets in our data corpus

The paper is open access and can be viewed and downloaded from here.

Full reference:
Radzikowski, J., Stefanidis, A., Jacobsen K.H., Croitoru, A., Crooks, A.T. and Delamater, P.L. (2016). “The Measles Vaccination Narrative in Twitter: A Quantitative Analysis”, JMIR Public Health and Surveillance, 2(1):e1. 

Hashtag associations: clustering based on co-occurrences of hashtags in individual tweets

Monday, December 21, 2015

A semester of CSS

For the last few years one of the classes that I have given is the Introduction to Computational Social Science (CSS). This is often the first class many students take within our program and as such its objectives are:
  1. To understand the motivation for the use of computational models in social science theory and research, including some historical aspects (Why conduct computational research in the social sciences?).
  2. To learn about the variety of CSS research programs across the social science disciplines, through a survey of social simulation models (What has CSS accomplished thus far?).
  3. To understand the distinct contribution that CSS can make by providing specific insights about society, social phenomena at multiple scales, and the nature of social complexity (What is the relation between computational social science.
  4. To provide foundations for more advanced work in subsequent courses or projects for those students who already have or will develop a long-term interest in computational social science.
The course surveys computational approaches such as system dynamics, social network analysis, machine learning, cellular automata, discrete event simulation, agent-based modeling, and microsimulation to study social phenomena with emphasis on complexity theory. 

On thing that all the students need to do during the semester is create a computational model investigating a social science research question. This exercise is often their first model that many students ever create. Below you can see some of this years models. Most of the models where created in NetLogo.  

Thursday, November 19, 2015

Using Shapefiles in NetLogo

Carrying on with the theme of linking GIS to NetLogo for creating agent-based models. We would like to showcase two simple models. Both are based on using a shapefile to create Schelling-inspired segregation model.

In the first model (as shown in the movie below) we use the polygons to be individual agents. In this example, we import a shapefile where each polygon is either a red or blue agent; or unoccupied (grey). The agent evaluates its neighborhood (i.e. surrounding polygons) and if dissatisfied with its neighborhood moves to an unoccupied polygon. More information  about the model and simple tutorial can be found here and the code and data can be downloaded from here.

In the second example (as shown in the movie below), we use attributes from the shapefile to add a specific number of agents to each polygon and again, the agents move if they are dissatisfied  with their current location. This is calculated by the agents examining both their geometrical neighboring polygons; and their 8-connected neighbors. The underlying color of the polygon is based on the which agent group is in the majority (i.e. a red polygon has more red agents than blue agents).

In addition to showing how to work with shapefiles within NetLogo we have also added some statics which you might find useful. The ability to calculate  Moran's I and a segregation index. Further  information  about the model can be found here and the code and data can be downloaded from here.

If you are interested in learning more about GIS and agent-based modeling in NetLogo it is worth checking out Yang Zhou's website Geospatial Computational Social Science.