geovizir
#
Subpackages#
Submodules#
Package Contents#
Functions#
|
Print a pandas DataFrame by columns. |
|
|
|
Return a GeoDataFrame of the world countries. |
|
Return a GeoDataFrame of the stats of a country. |
|
Return a list of labels for a list of bins. |
|
Relabel a column with the bins of the column. |
|
Get data from the World Bank API |
|
Get the data from the World Bank API with the most |
Attributes#
- geovizir.__version__#
- geovizir.glimpse(df: pandas.DataFrame, max_width: int = 76)[source]#
Print a pandas DataFrame by columns.
Print the dimensions, column names, dtypes and first few values of a pandas DataFrame by columns.
- Parameters:
df (DataFrame) – The pandas DataFrame to print.
max_width (int, optional) – The maximum width of the output, by default 76.
- geovizir.ne_countries(scale: int = 10) geopandas.GeoDataFrame [source]#
Return a GeoDataFrame of the world countries.
Download the world countries shapefile from Natural Earth and return a GeoDataFrame of the countries.
- Parameters:
scale (int, optional) – The scale of the shapefile, by default 10. The allowed values are 10, 50 and 110.
- Returns:
A table of the world countries.
- Return type:
GeoDataFrame
- geovizir.ne_states(state: str, scale: int = 10) geopandas.GeoDataFrame [source]#
Return a GeoDataFrame of the stats of a country.
Download the counties shapefile from Natural Earth and return a GeoDataFrame of the countries.
- Parameters:
state (str) – The country ISO3 code.
scale (int, optional) – The scale of the shapefile, by default 10. The allowed values are 10, 50 and 110.
- Returns:
A table of the world countries.
- Return type:
GeoDataFrame
- geovizir.label_bins(bins: list[int, float]) list[str] [source]#
Return a list of labels for a list of bins.
For each element of the bins, an interval is created with the previous element. The first element is add as ‘< first_element’ and the last element as ‘> last_element’.
- Parameters:
bins (list[float, int]) – A list of bins to be labeled.
- Returns:
A list of labels.
- Return type:
list[str]
Examples
>>> bins([1,2,3])
- geovizir.relabel_bins(column: pandas.Series)[source]#
Relabel a column with the bins of the column.
- Parameters:
column (Series) – A column to be relabeled.
- Returns:
A column with the labels of the bins.
- Return type:
Series