![]() |
Bridges-Python-3.0.2
3.0.2
Bridges(PythonAPI)
|
Classes | |
class | DataSource |
Functions | |
def | get_game_data () |
Get meta data of the IGN games collection. More... | |
def | parse_actor_movie_imdb (item) |
def | get_actor_movie_imdb_data (number=0) |
Get ActorMovie IMDB Data retrieved, formatted into a list of ActorMovieIMDB objects. More... | |
def | get_actor_movie_imdb_data2 () |
def | get_earthquake_usgs_data (number=0) |
Get USGS earthquake data USGS Tweet data (https://earthquake.usgs.gov/earthquakes/map/) retrieved, formatted into a list of EarthquakeUSGS objects. More... | |
def | get_shakespeare_data (endpoint="", textonly=False) |
Get data of Shakespeare works (plays, poems) More... | |
def | get_gutenberg_book_data (num=0) |
Get meta data of the Gutenberg book collection (1000 books) This function retrieves, and formats the data into a list of GutenbergBook objects. More... | |
def | get_cancer_incident_data (num=0) |
Retrieves the CDC dataset into a vector of records See CancerIncidence class for more information. More... | |
def | get_song (songTitle, artistName=None) |
Get data of a particular songs (including lyrics) using the Genius API (https://docs.genius.com/), given the song title and artist name. More... | |
def | get_song_data () |
Get data of the songs (including lyrics) using the Genius API https://docs.genius.com/ Valid endpoints: https://bridgesdata.herokuapp.com/api/songs/. More... | |
def | get_color_grid_from_assignment |
Reconstruct a ColorGrid from an existing ColorGrid on the bridges server. More... | |
def | get_assignment |
This function obtains the JSON representation of a particular assignment as a string. More... | |
def | osm_server_request (url) |
def | get_osm_data (args) |
Takes a location name as a string and returns an OsmData object :param :return: OsmData: More... | |
def | elevation_server (url) |
def | get_elevation_data (args) |
This function returns elevation data for the requested location and resolution. More... | |
def | get_wiki_data_actor_movie (year_begin, year_end) |
def bridges.data_src_dependent.data_source.elevation_server | ( | url | ) |
def bridges.data_src_dependent.data_source.get_actor_movie_imdb_data | ( | number = 0 | ) |
Get ActorMovie IMDB Data retrieved, formatted into a list of ActorMovieIMDB objects.
number | the number of actor/movie pairs, but currently unused, returns all records. |
Exception | if the request fails |
def bridges.data_src_dependent.data_source.get_actor_movie_imdb_data2 | ( | ) |
def bridges.data_src_dependent.data_source.get_assignment | ( | server | ) |
This function obtains the JSON representation of a particular assignment as a string.
:param str server: internal server url of bridges object :param str user: the name of the user who uploaded the assignment :param int assignment: the ID of the assignment to get :param int subassignment: the ID of the subassignment to get (default 0) :return str that is the JSON representation of the subassignment as stored by the bridges server
def bridges.data_src_dependent.data_source.get_cancer_incident_data | ( | num = 0 | ) |
Retrieves the CDC dataset into a vector of records See CancerIncidence class for more information.
def bridges.data_src_dependent.data_source.get_color_grid_from_assignment | ( | server | ) |
Reconstruct a ColorGrid from an existing ColorGrid on the bridges server.
:param str server: internal server url of bridges object :param str user: the name of the user who uploaded the assignment :param int assignment: the ID of the assignment to get :param int subassignment: the ID of the subassignment to get (default 0) :return: ColorGrid: the ColorGrid stored in the bridges server
def bridges.data_src_dependent.data_source.get_earthquake_usgs_data | ( | number = 0 | ) |
Get USGS earthquake data USGS Tweet data (https://earthquake.usgs.gov/earthquakes/map/) retrieved, formatted into a list of EarthquakeUSGS objects.
number | the number of earthquake records retrieved, limited to 5000 |
Exception | if the request fails |
def bridges.data_src_dependent.data_source.get_elevation_data | ( | args | ) |
This function returns elevation data for the requested location and resolution.
Note that the data returned may be for a slightly different location and resolution than requested.
:param args[0]: a bounding box, aka an array [minLat, minLon, maxLat, maxLon] :param args[1]: spatial resolution, aka the distance between two samples (in degrees)
:return EleData for the bounding box and resolution requested (approximately)
def bridges.data_src_dependent.data_source.get_game_data | ( | ) |
Get meta data of the IGN games collection.
This function retrieves and formats the data into a list of Game objects
Exception | if the request fails |
def bridges.data_src_dependent.data_source.get_gutenberg_book_data | ( | num = 0 | ) |
Get meta data of the Gutenberg book collection (1000 books) This function retrieves, and formats the data into a list of GutenbergBook objects.
Exception | if the request fails |
def bridges.data_src_dependent.data_source.get_osm_data | ( | args, | |
OsmData | |||
) |
Takes a location name as a string and returns an OsmData object :param :return: OsmData:
def bridges.data_src_dependent.data_source.get_shakespeare_data | ( | endpoint = "" , |
|
textonly = False |
|||
) |
Get data of Shakespeare works (plays, poems)
This function retrieves and formats the data into a a list of Shakespeare objects.
Valid endpoints: 'poems','plays', <title> Valid queryParams: format{simple}
Exception | if the request fails |
endpoint | can be either "plays" or "poems". If this is specified, then only these types of works are retrieved. |
textOnly | if this is set, then only the text is retrieved. |
def bridges.data_src_dependent.data_source.get_song | ( | songTitle, | |
artistName = None |
|||
) |
Get data of a particular songs (including lyrics) using the Genius API (https://docs.genius.com/), given the song title and artist name.
Valid endpoints: http://bridgesdata.herokuapp.com/api/songs/find/ Valid queryParams: song title, artist name
This function retrieves and formats the data into a Song object. The song if not cached in the local DB is queried and added to the DB
Exception | if the request fails |
def bridges.data_src_dependent.data_source.get_song_data | ( | ) |
Get data of the songs (including lyrics) using the Genius API https://docs.genius.com/ Valid endpoints: https://bridgesdata.herokuapp.com/api/songs/.
This function retrieves and formats the data into a list of Song objects. This version of the API retrieves all the cached songs in the local DB.
Exception | if the request fails |
def bridges.data_src_dependent.data_source.get_wiki_data_actor_movie | ( | year_begin, | |
year_end | |||
) |
def bridges.data_src_dependent.data_source.osm_server_request | ( | url | ) |
def bridges.data_src_dependent.data_source.parse_actor_movie_imdb | ( | item | ) |