Git Product home page Git Product logo

foss4g14's Introduction

Exploratory Spatial Data Analysis with PySAL

Sergio Rey

September 8, 2014

FOSS4G 2014, Portland, OR

Workshop Description

PySAL is a cross-platform library of spatial analysis functions written in Python. It is intended to support the development of high level applications for spatial analysis with an emphasis on vector spatial data. This tutorial will provide hands-on training in a select set of PySAL modules with a particular focus on spatial data processing, spatial autocorrelation analysis and visualization.

Prerequisites

  • Previous experience with Python programming is recommended
  • Participants should bring their own laptops to the workshop
  • Software should be installed prior to traveling to the workshop (instructions below)

Software Requirements

For the workshop we will require the following packages be installed

  • PySAL 1.8.0
  • SciPy
  • Numpy
  • iPython Notebook 2.1+
  • folium

There are a number of ways to install PySAL and these dependencies. For the workshop, if you do not yet have the dependencies installed we suggest using one of two scientific Python distributions (below). These have the advantages of including most of the dependencies for PySAL as well as PySAL itself. Moreover, both allow for updating PySAL to the most recent release (1.8 released July 25, 2014) which is more current that what is listed in either distribution. Both of these distributions also allow for installation of our final dependency, folium.

PySAL via Anaconda Python Distribution

  1. Install Anaconda Python Distribution Version 1.8.0
  2. Open a terminal (Mac or Linux) or Powershell (Windows)
  3. pip install -U pysal
  4. pip install -U folium

PySAL via Enthought Canopy

Note that the Academic version of Canopy comes with PySAL version 1.7. For this workshop we will be using PySAL 1.8. Upgrading in Canopy can be done as follows:

  1. Install Canopy
  2. Run Canopy
  3. From the menu select Tools Canopy Terminal
  4. pip install -U pysal
  5. pip install -U folium

Testing Your Installation

Once you have installed all the dependencies, you can check to confirm everything is ready to go.

For Anaconda:

  1. Open a terminal (Mac or Linux) or Powershell (Windows)

  2. ipython notebook

  3. In the browser click New Notebook

  4. In the first cell in the notebook enter
    import pysal

    pysal.version

    Then <Shift-Enter> (i.e., hit the Shift then the Enter Key)

  5. In the second cell in the notebook enter
    import folium

    Then <Shift-Enter>

Your screen should look something like: Anaconda setup

For Enthought Canopy:

  1. Run Canopy

  2. From the menu select Tools Canopy Terminal

  3. ipython notebook

  4. In the browser click New Notebook

  5. In the first cell in the notebook enter
    import pysal

    pysal.version

    Then <Shift-Enter> (i.e., hit the Shift then the Enter Key)

  6. In the second cell in the notebook enter
    import folium

    Then <Shift-Enter>

Your screen should look something like: Enthought setup

Issues

If you run into any problems, double check that you have installed both the upgraded version of PySAL and folium (see above). If problems persist, please contact me [email protected].

foss4g14's People

Contributors

sjsrey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.