API reference¶
Data transformers¶
gpdvegaregister two data transformers:'gpd_to_values'stores GeoDataFrame as inline values in the chart definition usinggpdvega.gpd_to_values().'gpd_to_json'stores GeoDataFrame as separate json file with array of GeoJSON object and includes a link to it into chart definition usinggpdvega.gpd_to_json()
Note
gpdvega enables 'gpd_to_values' as active data tranformer.
Please see Altair data transformers documentation for description of data pipeline mechanism
API¶
-
gpdvega.gpd_to_values[source]¶ Replace a GeoDataFrame by a data model with values. For
geopandas.GeoDataFramecolumns values are stored as Foreign Members of GeoJSON feature objects. For all other types uses functionaltair.to_values().
-
gpdvega.gpd_to_json[source]¶ Write the data model to a .json file and return a url based data model. For
geopandas.GeoDataFramecolumns values are stored as Foreign Members of GeoJSON feature objects. For all other types uses functionaltair.to_json().
-
gpdvega.geojson_feature(data, feature='features', **kwargs)[source]¶ A convenience function for extracting features from a geojson object or url
Parameters: - data : anyOf(string, geojson.GeoJSON)
string is interpreted as URL from which to load the data set. geojson.GeoJSON is interpreted as data set itself.
- feature : string
- The JSON property containing the GeoJSON object set to convert to
a GeoJSON feature collection. For example
features[0].geometry.
- **kwargs :
additional keywords passed to JsonDataFormat