posted an update

There has been a temporary roadblock to the progress on the Twitter data collection, which we are working to overcome. Using Tweepy has made many things simpler, but getting used to the API has been something of a challenge.

The visualization side of things has seen much more progress. My prior experience with Unity has helped a lot with getting up and running quickly, and pair programming with Heather made a breeze out of implementing an algorithm for optimal placement of graph nodes:

// Calculate the force on each vertex
float c1 = 2f;
float c2 = 1f;
float c3 = 1f;
float c4 = 0.1f;

foreach (var elem in nodes)
{
    // Calculate the force on each node
    Vector3 force = Vector3.zero;

    foreach (var other in nodes)
    {
        if (!elem.Key.Equals(other.Key))
        {
            if (connections.ContainsKey(new Pair<string, string>(elem.Key, other.Key)) || connections.ContainsKey(new Pair<string, string>(other.Key, elem.Key)))
            {
                force += (other.Value.model.transform.position - elem.Value.model.transform.position).normalized * c1 * Mathf.Log10(Vector3.Distance(elem.Value.model.transform.position, other.Value.model.transform.position) / c2);
            }
            else
            {
                force -= (other.Value.model.transform.position - elem.Value.model.transform.position).normalized * c3 / (elem.Value.model.transform.position - other.Value.model.transform.position).sqrMagnitude;
            }
        }
    }

    // move the vertex c4 * (force on vertex)
    force *= c4;
    elem.Value.model.transform.position += force;
}

// Fix edges
foreach (var edge in connections)
{
    edge.Value.GetComponent<LineRenderer>().SetPositions(new Vector3[] { nodes[edge.Key.First].model.transform.position, nodes[edge.Key.Second].model.transform.position });
}

If we can get Twitter data collection running, we can let it run through the night and simply replace the dummy data we've been using with some real data tomorrow.

Log in or sign up for Devpost to join the conversation.