Skip to content

Instantly share code, notes, and snippets.

View AlexArcPy's full-sized avatar

Alexey Tereshenkov AlexArcPy

View GitHub Profile
@AlexArcPy
AlexArcPy / Geocoding.ipynb
Created July 31, 2016 14:39 — forked from kjordahl/Geocoding.ipynb
GeoPandas geocoding example
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@AlexArcPy
AlexArcPy / GeoDataFrame.ipynb
Created July 31, 2016 14:39 — forked from kjordahl/GeoDataFrame.ipynb
working with GeoDataFrames in GeoPandas
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@AlexArcPy
AlexArcPy / GeoSeries.ipynb
Created July 31, 2016 14:40 — forked from kjordahl/GeoSeries.ipynb
Working with GeoSeries in GeoPandas
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@AlexArcPy
AlexArcPy / convert.py
Created August 3, 2016 08:16 — forked from jwass/convert.py
Simple script used to convert some shapefiles to GeoJSON, leaving out a few undesired properties. Requires shapely 1.2.18.
import functools
import fiona
import geojson
import pyproj
import shapely.geometry
import shapely.ops
omit = ['SHAPE_AREA', 'SHAPE_LEN']
@AlexArcPy
AlexArcPy / filter_states.r
Last active August 12, 2016 16:21
arcgisbinding R package for running R scripts as ArcGIS geoprocessing script tools
options(scipen=999)
tool_exec <- function(in_param, out_param)
{
#load feature class into dataset
#can use 'C:\\Program Files (x86)\\ArcGIS\\Desktop10.4\\TemplateData\\TemplateData.gdb\\USA\\states'
data = arc.open(path = in_param[[1]])
#get subregion name from user
sub_region = in_param[[2]]
@AlexArcPy
AlexArcPy / iterating_arcpy_object.ipynb
Last active September 28, 2016 07:51
Iterating through the properties of arcpy objects
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@AlexArcPy
AlexArcPy / get_mapservice_sources.ipynb
Created November 2, 2016 17:05
Get data sources that are used by ArcGIS Server map services with Python - Jupyter notebook
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@AlexArcPy
AlexArcPy / arcpy_named_tuples.py
Created November 9, 2016 16:08
Using Python named tuples for feature class records
from collections import namedtuple
import arcpy
fc = r'C:\Program Files (x86)\ArcGIS\Desktop10.4\TemplateData\TemplateData.gdb\USA\states'
#creating a defintion of a named tuple with fields from feature class
fields = [field.name for field in arcpy.ListFields(fc)]
state = namedtuple('StateFeature',field_names=fields)
#generating named tuples for features in feature class
@AlexArcPy
AlexArcPy / arcpy_chain_cursors.ipynb
Created January 13, 2017 14:20
Using itertools module within arcpy workflows
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@AlexArcPy
AlexArcPy / python_bisect.ipynb
Created January 13, 2017 14:22
Using Python bisect module to group list values
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.