Installing and running - mtop/speciesgeocoder GitHub Wiki
This file describes the installation of SpeciesGeoCoder on Mac OSX, GNU/Linux and Windows systems.
For the impatient
Download the latest version from https://github.com/mtop/speciesgeocoder/releases
unzip speciesgeocoder-x.x.x.zip
cd speciesgeocoder-x.x.x
./geocoder.py -l example_data/localities.csv -p example_data/polygons.txt -t example_data/*.tif
Dependencies
The following package is required for SpeciesGeoCoder to run:
- argparse (Module included in python v2.7. Available at https://pypi.python.org/pypi/argparse)
The following packages are optional and will depend on which kind of analyses you will do:
- osgeo (The GDAL library available at https://pypi.python.org/pypi/GDAL/). Required for altitudinal coding
- R (Available from http://www.r-project.org/). Required if you want to use the plot functions or do stochastic mapping
- R-packages: rgeos, maptools, maps, mapdata, raster, optparse, ape, geiger, phytools (R will prompt you for the missing packages)
Installing on Mac OSX
Download the latest version from https://github.com/mtop/speciesgeocoder/releases
- Unzip the file by double-clicking on it.
- Open a terminal window and use the command "cd" to move into the directory "speciesgeocoder-x.x.x" (where "x.x.x" will indicate the version number of the latest release; tips: instead of writing the path, you can just 'drag' the folder to your terminal window)
- Copy and paste the following command into your terminal window to make sure everything works as expected:
./geocoder.py -l example_data/localities.csv -p example_data/polygons.txt -t example_data/*.tif
Installing on Windows
- Download and install the Latest Python 2 Release from https://www.python.org/downloads/windows/
- Direct your browser to http://www.lfd.uci.edu/~gohlke/pythonlibs/ and then download and install GDAL for python 2.7
- Download and install R from http://cran.r-project.org/bin/windows/base/
In addition, you'll also have to add the R executables to your PATH (in order for SpeciesGeoCoder to find it).
- Find the directory that the R program is installed in (e.g "C:\Program Files\R\R-3.1.1")
- From the desktop, right-click My Computer and click Properties.
- In the System Properties window, click on the Advanced tab.
- In the Advanced section, click the Environment Variables button.
- Click the Environment Variables button, highlight the Path variable in the Systems Variable section and click the Edit button.
- Add ";C:\Program Files\R\R-3.1.1\bin" (if that is where the R executables are found, don't forget the preceding ";" character) to the end of line and click "Ok".
Change permissions to the R "library" directory in the following way: (this is nessesary as SpeciesGeoCoder will have to automatically install additional R packages).
- Right click on "C:\Program Files\R\R-3.1.1\library" and select properties -> Security.
- Click "Edit".
- In "Group our user names" select your name.
- Mark the "Full control" checkbox.
- Click "Ok".
Installing on GNU/Linux
Download the latest version from https://github.com/mtop/speciesgeocoder/releases
unzip speciesgeocoder-x.x.x.zip
cd speciesgeocoder-x.x.x
./geocoder.py -l example_data/localities.csv -p example_data/polygons.txt -t example_data/*.tif
Optionally you can make a symbolic link from a directory in your PATH to the file "speciesgeocoder" in the "speciesgeocoder-x.x.x" directory.
Installing and running the development version
git clone [email protected]:mtop/speciesgeocoder.git
cd speciesgeocoder/
./geocoder.py -l example_data/localities.csv -p example_data/polygons.txt -t example_data/*.tif