Bridges-Python-3.0.2  3.0.2
Bridges(PythonAPI)
Public Member Functions | Public Attributes | List of all members
bridges.bridges.Bridges Class Reference

Detailed Description

The bridges class is the main class that provides interfaces to datasets, maintains user and assignment information, and connects to the bridges server.

The bridges class is responsible for initializing the bridges system, specifying parameters (user id, assignment id, title, description, data structure type, etc) for the student assignment, generating the data structure representation and transmission to the bridges server. In addition, it provides interfaces to a number of real-world datasets, that makes it easy to access the data for use algorithms/data structure assignments.

Datasets. The datasets that are currently supported through the BRIDGES API include USGS Earthquake Data, IMDB Actor/Movie Data (2 versions), Gutenberg Book Collection Meta Data, a Video Game Dataset and Shakespeare Dataset. More information is found in the respective methods (below) and at

http://bridgesuncc.github.io/datasets.html

A typical bridges program includes creating the bridges object, followed by creation of the data structure by the user, assigning visual attributes to elements of the data structure, followed by specification of teh data structure type and the call to visualize the data structure (bridges::setDataStructure() and visualize() methods).

Author
Sean Gallagher, Kalpathi Subramanaian, Mihai Mehedint, David Burlinson, Matthew Mcquaigue

Public Member Functions

def window (self)
 
def window
 
def __init__ (self, assignment, username, appl_id)
 Bridges constructor. More...
 
def set_data_structure (self, ds)
 
def set_visualize_JSON (self, flag)
 
def visualize (self)
 
def set_assignment (self, assignment)
 Setter for assignment id (must be positive) More...
 
def get_assignment (self)
 Getter for the assignment id. More...
 
def set_title (self, title)
 Setter for the title of the bridges visualization. More...
 
def set_description (self, description)
 Setter for the description of the bridges visualization. More...
 
def set_map_overlay (self, flag)
 Setter for if the visualization will have a map overlay. More...
 
def set_coord_system_type (self, coord)
 Setter for the coordinate system type to use in the visualization. More...
 
def get_color_grid_from_assignment
 Reconstruct a ColorGrid from an existing ColorGrid on the bridges server. More...
 
def set_username (self, username)
 Setter for username (must be a string) More...
 
def get_username (self)
 Getter for the assignment user name (BRIDGES credentials) More...
 
def get_assignment_id (self)
 Getter for the assignment number. More...
 
def set_key (self, apikey)
 Setter for API Key (BRIDGES Credentials) More...
 
def get_key (self)
 Getter for the API key (BRIDGES credentials) More...
 

Public Attributes

 connector
 
 ds_handle
 
 vis_type
 

Constructor & Destructor Documentation

◆ __init__()

def bridges.bridges.Bridges.__init__ (   self,
  assignment,
  username,
  appl_id 
)

Bridges constructor.

(int) assignment: the number your bridges assignment will have (str) username: your bridges username (str) appl_id: your appl authentication key from bridges acc

Returns
None

Member Function Documentation

◆ get_assignment()

def bridges.bridges.Bridges.get_assignment (   self,
  str 
)

Getter for the assignment id.

Returns
str representing the full assignment id including subassignment aspect

◆ get_assignment_id()

def bridges.bridges.Bridges.get_assignment_id (   self)

Getter for the assignment number.

Returns
int assignment number

◆ get_color_grid_from_assignment()

def bridges.bridges.Bridges.get_color_grid_from_assignment (   self,
  user 
)

Reconstruct a ColorGrid from an existing ColorGrid on the bridges server.

Parameters
userthe name of the user who uploaded the assignment
assignmentthe ID of the assignment to get
subassignmentthe ID of the subassignment to get (default 0)
Returns
ColorGrid the ColorGrid stored in the bridges server

◆ get_key()

def bridges.bridges.Bridges.get_key (   self)

Getter for the API key (BRIDGES credentials)

Returns
str user's API key

◆ get_username()

def bridges.bridges.Bridges.get_username (   self)

Getter for the assignment user name (BRIDGES credentials)

Returns
str user name

◆ set_assignment()

def bridges.bridges.Bridges.set_assignment (   self,
  assignment 
)

Setter for assignment id (must be positive)

Parameters
assignmentassignment number to be set
Returns
None

◆ set_coord_system_type()

def bridges.bridges.Bridges.set_coord_system_type (   self,
  coord 
)

Setter for the coordinate system type to use in the visualization.

Parameters
coordcoordinate system type (used in map overlays (can be "cartesian", "albersusa", "equirectangular")

◆ set_data_structure()

def bridges.bridges.Bridges.set_data_structure (   self,
  ds 
)

◆ set_description()

def bridges.bridges.Bridges.set_description (   self,
  description,
  None 
)

Setter for the description of the bridges visualization.

(str) description: representing the assignment description

Returns
None

◆ set_key()

def bridges.bridges.Bridges.set_key (   self,
  apikey 
)

Setter for API Key (BRIDGES Credentials)

Parameters
apikeyapi key to be set
Returns
None

◆ set_map_overlay()

def bridges.bridges.Bridges.set_map_overlay (   self,
  flag 
)

Setter for if the visualization will have a map overlay.

(bool) flag: boolean for if map overlay

Returns
None

◆ set_title()

def bridges.bridges.Bridges.set_title (   self,
  title,
  None 
)

Setter for the title of the bridges visualization.

(str) title: representing the title

Returns
None

◆ set_username()

def bridges.bridges.Bridges.set_username (   self,
  username 
)

Setter for username (must be a string)

Parameters
usernameusername to be set
Returns
None

◆ set_visualize_JSON()

def bridges.bridges.Bridges.set_visualize_JSON (   self,
  flag 
)

◆ visualize()

def bridges.bridges.Bridges.visualize (   self,
  None 
)

◆ window() [1/2]

def bridges.bridges.Bridges.window (   self,
  float 
)

◆ window() [2/2]

def bridges.bridges.Bridges.window (   self,
  value 
)

Member Data Documentation

◆ connector

bridges.bridges.Bridges.connector

◆ ds_handle

bridges.bridges.Bridges.ds_handle

◆ vis_type

bridges.bridges.Bridges.vis_type

The documentation for this class was generated from the following file: