![]() |
Bridges-Python 3.5.0-dev1
Bridges(Python API)
|
This class provides an API to building, displaying and manipulating World maps in BRIDGES. More...
Public Member Functions | |
get_projection (self) | |
get_overlay (self) | |
get_data_structure_type (self) | |
Getter for the data structure type as a JSON string Returns str the data structure type. | |
get_map_representation (self) | |
Getter for the data structure's JSON representation. | |
get_map_representation (self) | |
gets the JSON representation of the map data | |
__init__ (self, countries=None) | |
Constructor: creates an object with the given country data. | |
Protected Attributes | |
_countries | |
_all | |
Properties | |
countries = property | |
Returns a list of country objects. | |
This class provides an API to building, displaying and manipulating World maps in BRIDGES.
In the current implementation, we can draw a World map with all country boundaries, or specify a set of countries and display the country* boundaries.
Functions are provided to access each country county and color its boundary, its interior using stroke and fill color functions. This lets us build map based applications where the fill color can be used to represent different data attributes, such as population counts, election statistics or any attribute at the country level. We stop at the country level as each country has its own subdivisions, such as discticts, states, regions, counties, etc.
See the Maps tutorials for examples of the usage of the World Map API at https://bridgesuncc.github.io/tutorials/Map.html
bridges.world_map.WorldMap.__init__ | ( | self, | |
countries = None |
|||
) |
Constructor: creates an object with the given country data.
@param countries country information for a set of countries
Reimplemented from bridges.map.Map.
bridges.world_map.WorldMap.get_data_structure_type | ( | self | ) |
Getter for the data structure type as a JSON string Returns str the data structure type.
bridges.world_map.WorldMap.get_map_representation | ( | self | ) |
Getter for the data structure's JSON representation.
Reimplemented from bridges.map.Map.
bridges.world_map.WorldMap.get_map_representation | ( | self | ) |
gets the JSON representation of the map data
Uses functions to convert the state and country attributes to objects before serialization into a JSON string
Reimplemented from bridges.map.Map.
bridges.world_map.WorldMap.get_overlay | ( | self | ) |
Reimplemented from bridges.map.Map.
bridges.world_map.WorldMap.get_projection | ( | self | ) |
Reimplemented from bridges.map.Map.
|
protected |
|
protected |
|
static |
Returns a list of country objects.