Package: shruby
ShrubyThis library provides one kind of object dubbed "ShrubyFrame". This modified dataframe mimics a GeoDataframe with a few special tweaks. It is designed to work hand in hand with the ArcGIS API for Python. This project is in progress but version 0.1.0 will have the following methods:create_buffers: creates a buffer around a point.create_cones: creates triangle like cones that show a range and direction of a point.InstallationpipinstallshrubyUsageimportpandasaspdfromshrubyimportShrubyFramedf=pd.read_csv("data.csv")sdf=ShrubyFrame(df,lat_field="lat",lon_field="lon",crs="EPSG:4326")sdf.create_buffers(distance=100,metric="meters")ShrubyFrameConstructorParameterTypeDefaultDetailssdfPandas DF, GeoDF, ArcGIS spacially enabled DFThe input data in the form of a dataframe.lat_fieldstringNoneThe latitude or Y field. If None, defaults to SHAPE from ArcGIS.lon_fieldstringNoneThe longitude or X field. If None, defaults to SHAPE from ArcGIS.crsstringEPSG:4326The spatial reference/projection in the form of EPSG:XXXX.using_arcgis_apiboolFalseWhether to return GeoAccessor Objects for use with the ArcGIS API.argsargs for a GeoDataframecreate_buffersArgumentTypeDefaultDetailsdistancenumerical/stringNoneThe distance of the radius. Can be a plain number or a field in the dataframe that contains the distance for each row.metricstringNoneThe unit of measurement for the distance. Can be any of the following: "meters", "kilometers", "feet", "miles", "nautical_miles".quad_segsint8The number of segments to use to create the buffer. The more segments that are used, the more circular the buffer will be, at the expense of processing time.Returns a ShrubyFrame with a geometry set to column "buffer_geometry" containing polygons. If using ArcGIS API, returns a GeoAccessor object.create_conesArgumentTypeDefaultDetailsdistancenumerical/stringNoneThe distance of the radius. Can be a plain number or a field in the dataframe that contains the distance for each row.metricstringNoneThe unit of measurement for the distance. Can be any of the following: "meters", "kilometers", "feet", "miles", "nautical_miles".orientationnumerical/stringNoneThe orientation of the cone. Can be a plain number or a field in the dataframe that contains the orientation for each row. Must be a number between 0 and 360.offsetnumerical20The offset of the cone. This offset will decide how wide the cones angle is.precisionint50The number of points to use to create the cone. The more points that are used, the more circular the end of the cone will be, at the expense of processing time.Returns a ShrubyFrame with a geometry set to column "cone_geometry" containing polygons. If using ArcGIS API, returns a GeoAccessor object.create_ringsArgumentTypeDefaultDetailsdistancenumerical/stringNoneThe distance of the radius. Can be a plain number or a field in the dataframe that contains the distance for each row.metricstringNoneThe unit of measurement for the distance. Can be any of the following: "meters", "kilometers", "feet", "miles", "nautical_miles".quad_segsint8The number of segments to use to create the buffer. The more segments that are used, the more circular the buffer will be, at the expense of processing time.Returns a ShrubyFrame with a geometry set to column "ring_geometry" containing polygons. If using ArcGIS API, returns a GeoAccessor object.