Mapping packages Unfortunately none come with Anaconda (only geoprocessing is http://proj4.org/ which does lat/long to Cartesian conversions). matplotlib.

Slides:



Advertisements
Similar presentations
NSF DUE ; Module 4.3. NSF DUE ; GeoTEd Partners Module name and number.
Advertisements

TileMill Quickly and Easily Design Maps for the Web Shaky Sherpa Matt Berg Modi Research Group The Earth Institute. Columbia University.
GIS Overlay Getting to the “where is?”. Distance buffering Creates a distance from a feature Creates a distance from a feature Works with points.
GIS Level 2 MIT GIS Services
Vector-Based GIS Data Processing Chapter 6. Vector Data Model Feature Classes points lines polygons Layers limited to one class of data Figure p. 186.
NR 322: Single Layer Analysis Jim Graham Fall 2008 Chapter 8 & 9.
19 th Advanced Summer School in Regional Science An introduction to GIS using ArcGIS.
Carol Blackwood – Geo User Support Vivienne Mayo – User Support Digimap Roam webinar 12 th November 2014.
Intro. To GIS Lecture 6 Spatial Analysis April 8th, 2013
Introduction to ArcGIS for Environmental Scientists Module 3 – GIS Analysis ArcGIS Toolbox.
Habitat Analysis in ArcGIS Use of Spatial Analysis to characterize used resources Thomas Bonnot
Spatial data models (types)
Preparing Data for Analysis and Analyzing Spatial Data/ Geoprocessing Class 11 GISG 110.
1 1 ISyE 6203 Radical Tools Intro To GIS: MapPoint John H. Vande Vate Spring 2012.
Geographic Information System GIS This project is implemented through the CENTRAL EUROPE Programme co-financed by the ERDF GIS Geographic Inf o rmation.
GIS concepts, skills and tools
Exercise 1: Creating GIS data—points lines and polygons A very common method of creating vector data is to physically create these files through on-screen.
School of Geography FACULTY OF ENVIRONMENT Introduction to ArcToolbox and Geoprocessing.
Exploring ArcToolbox Presented by: Isaac Johnson.
Introduction to GIS GIS/CAD5.
NR 143 Study Overview: part 1 By Austin Troy University of Vermont Using GIS-- Introduction to GIS.
A Quick Introduction to GIS
Introduction to Geographic Information Systems Fall 2013 (INF 385T-28620) Dr. David Arctur Research Fellow, Adjunct Faculty University of Texas at Austin.
Intro. To GIS Pre-Lab Spatial Analysis April 1 st, 2013.
Uploading Data Matthew Hanson  GeoNode made up of several components  Web Framework – Django  OGC Server – GeoServer  Database – PostGIS.
Presented by: Shahab Spring Introduction Data Analytics Plugins Learning Resources.
UNIT 3 – MODULE 3: Raster & Vector
Overlay Operations. Overlay Operations involve combining spatial and attribute data from two or more spatial data layers. “Stacking data” – Very powerful.
Data Processing Systems
Key Terms Attribute join Target table Join table Spatial join.
Python for data analysis Prakhar Amlathe Utah State University
Andrew White, Brian Freitag, Udaysankar Nair, and Arastoo Pour Biazar
Richard Wen Using Open Source Python Packages for Machine Learning on Vector Geodata Richard Wen
GIS Institute Center for Geographic Analysis
Vector Analysis Ming-Chun Lee.
GIS MAP OVERLAY ANALYSIS
How to pack a punch for free
Spatial Queries & Analysis in GIS
Basic Spatial Analysis
Spatial Analysis and Functions
External libraries A very complete list can be found at PyPi the Python Package Index: To install, use pip, which comes with.
Maps 1 EPID 799C Fall 2017.
Data Analysis using Python-I
Data visualization in Python
Raster and Vector Data.
GIS Lecture: Spatial Joins
Spatial Data Processing
Using QGIS, GRASS and PostGIS to answer some difficult questions
Mapbox Studio Sarah and Haley.
Review- vector analyses
GTECH 709 Databases Relational databases What makes a database geographic Geo-relational databases Locational references.
DESIGN & IMPLEMENTATION
GEOCODING Creates map features from addresses or place-names.
Lecture 5 Geocoding in ArcGIS
Cartographic and GIS Data Structures
Geographic Information Systems
EMSE 6574 – Programming for Analytics: Python 101 – Python Enviornments Joel Klein.
Electronic Field Study Advanced User Training
Geography 413/613 Lecturer: John Masich
URBDP 422 Urban and Regional Geo-Spatial Analysis
An Introduction to Concepts and their Implementation in ArcMap
Numpy and Pandas Dr Andy Evans
GIS Lecture: Geoprocessing
Automating and Validating Edits
GIS Institute Center for Geographic Analysis
Option One Install Python via installing Anaconda:
Vector Geoprocessing.
GIS Institute Center for Geographic Analysis
Python for Data Analysis
Working with GEOLocation Data
Presentation transcript:

Mapping packages Unfortunately none come with Anaconda (only geoprocessing is http://proj4.org/ which does lat/long to Cartesian conversions). matplotlib integrates with basemap: https://matplotlib.org/basemap/ But tricky to get working well. And cartopy for more sophisticated vector graphics: http://scitools.org.uk/cartopy/ GeoPandas probably the simplest to use: http://geopandas.readthedocs.io Based on Shapely , which has its roots in PostGIS. There are a wide variety of mapping packages for Python. Unfortunately none of them come with Anaconda, but if you have your own machine you can install them. While matplotlib has a couple of spin-off packages, most notably basemap, these can be hard to get working, especially on windows with the latest version of Python. Better is geopandas, which works well and is easy to get running. GeoPandas is based on Shapely, a package for generic shape manipulation and plotting in arbitrary coordinate spaces. This ultimately has its roots in the PostGIS spatial database.

GeoPandas Based around GeoSeries and GeoDataFrames. These made of: Points / Multi-Points Lines / Multi-Lines Polygons / Multi-Polygons GeoDataFrames always have one geometry column (by default called "geometry"). This can be set/get with: gdf = gdf.set_geometry('col1') print(gdf.geometry.name) GeoPandas basically adds the "geo" to the pandas series and dataframes setup. It does this by including a geometry column containing geographical data.

I/O Wide range of filetypes importable with: gdf = geopandas.read_file("filename") Including shapefiles and GeoJSON. Can also use a URL string. To write, use: gdf.to_file() Supports a wide range of formats (underneath uses fiona: http://toblerity.org/fiona/manual.html see manual for supported formats). One nice addition is that geopandas integrates (and simplifies) fiona, a library for reading and writing a wide variety of geographical data formats. This makes reading and writing geographical data files very easy.

Mapping Geometry mapped with: You can also plot slices etc. gdf.plot(); You can also plot slices etc. To make a choropleth, give a column other than geometry: gdf.plot(column='col1'); To plot datapoints, use a basemap plus points: base = gdf.plot(color='white', edgecolor='black') pts.plot(ax=base, marker='o', color='blue', markersize=2); Wraps round matplotlib, so there are other options: http://geopandas.readthedocs.io/en/latest/mapping.html As with pandas, producing a map is often just a matter of calling "plot". This will show the geometry data by default. The above slide gives the basics of also showing additional data columns and layers.

Data processing Columns can be referred to by column names, where good variable names. Also attributes: area: in projection units bounds: tuple of per-shape max and min coordinates total_bounds: tuple of per-dataframe max and min coordinates gdf.col1 = gdf.col1 / gdf.geometry.area As with pandas, columns can be created as the results of equations containing other columns, working elementwise. There are also a number of pre-calculated attributes associated with geometries.

Other operations Overlay (union; intersection; symmetrical difference; difference) Reprojection Buffering, convex hulls, etc. Scaling, translations, etc. Grouping and dissolves, attribute and spatial merges Geocoding through geocoding services (e.g. Google) Feature-to-feature distances Centroid finding Intersection and feature-in-feature checking http://geopandas.readthedocs.io/en/latest/reference.html GeoPandas adds a range of additional functions, encompassing much of the work you'd associated with a basic GIS. The documentation is generally good, and can be found, with examples, at the URL above. The functions have a very Pythonic style, with ease-of-use being of high importance. In general, as numpy gets wrapped deeper and deeper inside packages, the packages get more restricted in the kinds of jobs they'll do, but the process of analysis and visualisation gets easier and easier.