Movement table - GridtNetwork/gridtlib GitHub Wiki

Movements table

The movements table is the table in the database that contains the attributes linked to each separate movement. These are the attributes that are currently in the movement table

  • Movement ID
  • Movement Name
  • Short description: a ## character description of what users subscribed in the movement are doing.
  • Long description: a ### character text explaining the why, how and what of a movement and that gives a suggestion to its users on what to signal about.
  • Interval: string value ‘daily’, ‘twice daily’ or ‘weekly’ with which the front-end calculates the isLeaderDone function after requesting the last occurrence of a leader’s signal.

Future changes and expansion of the Movements table

As of 14-11-2020, the following updates and changes are proposed for the movements table in the database:

  • Change ‘Short description’ into ‘Objective’;
  • Change ‘Long description’ into ‘Description’;
  • Interval: instead of string value, should take an array of day/time format, e.g.: Monday 0:00, Thursday 0:00; or simply 0:00 that can be used at the front end to see if the leader is done. This way, the rhythm of movements can be synchronized better with people’s actual weekly rhythms and prevents movements from resetting on Monday one week and Tuesday the next week (e.g. in the case of a reset every two days, this leads to resets on weekdays that alternate between weeks).

Attributes to add to the movement table: Category: an array of integers that correspond to the category a movement belongs to, e.g.: 0 - health and fitness, 1 - mind and learning, 3 - sustainable planet, 4 - strong community, 5 - miscellaneous. Movements can belong to multiple categories. Epicenter: an array of doublets that correspond to locations that are epicenters of the movement. The doublets contain two floats that represent the latitude and longitude value of the epicenter. For translating these data to locations, we can make use of the OpenStreetMap database. By allowing movements to have multiple epicenters, we can make a distinction between local sponsors, while still allowing users near different epicenters to connect to each other if they are doing the same thing. Image: an image file that is used to decorate the movement page

A new database table: User-movement-stats

The new table user-movement-stats contains the information attributes that are specific for a user in a single movement. Every row in the table corresponds to a user in a movement.

  • ID: ID of the user-movement-stat
  • Leader ID
  • Movement ID
  • Streak: number of consecutive signals sent by the leader in this movement;
  • Location: a user who joins a public movement will be marked with the location of their nearest epicenter, allowing users that are close by to follow each other and for sponsors to be visible to local users.
  • SponsorTag: A user will be able to join a movement under a sponsor’s tag.
  • Badge: A decoration of the user profile that can be shown to followers and sponsored by businesses.
  • LeaderValue: an integer value determining the likelihood of a user to be selected as a leader for a follower.