restgdf package

Module contents

A package for getting GeoDataFrames from ArcGIS FeatureLayers.

class restgdf.Rest(url: str, session: ClientSession | None = None, auth: Any | None = None, where: str = '1=1', token: str | None = None, **kwargs)[source]

Bases: object

A class for interacting with ArcGIS FeatureLayers.

async classmethod from_url(url: str, **kwargs) Rest[source]

Create a Rest object from a url.

async getgdf() GeoDataFrame[source]

Get a GeoDataFrame from an ArcGIS FeatureLayer.

async getnestedcount(fields: tuple) DataFrame[source]

Get the nested value counts for a field.

async getoids() list[int][source]

Get the object ids for the Rest object.

async getuniquevalues(fields: tuple | str, sortby: str | None = None) list | DataFrame[source]

Get the unique values for a field.

async getvaluecounts(field: str) DataFrame[source]

Get the value counts for a field.

async headgdf(n: int = 10) GeoDataFrame[source]

Get the n first features as a GeoDataFrame.

async prep()[source]

Prepare the Rest object.

async samplegdf(n: int = 10) GeoDataFrame[source]

Get n random features as a GeoDataFrame.

async where(wherestr: str) Rest[source]

Create a new Rest object with a where clause.

async restgdf.get_gdf(url: str, session: ClientSession | None = None, where: str | None = None, token: str | None = None, **kwargs) GeoDataFrame[source]

Get a GeoDataFrame from an ArcGIS FeatureLayer.