- Postgresql-9.4 (http://www.postgresql.org).
- Ruby-2.2.X (http://www.ruby-lang.org).
- Rails-4.2.X (http://www.rubyonrails.org)
You must have Postgresql-9.4 installed, and have the PG gem installed.
Run Bundle install
in your command line to install the PG gem.
The database configuration does not have a username and password set (see config/database.yml). Depending on how you have configured Postgresql, this may cause problems in creating a database. In order to create and update the database it is suggested that you create a user with login and createdb privileges, then set the PGUSER and PGPASSWORD environmental variables to that username and password. You can add the following to your .bashrc or .bash_profiles file if you want:
export PGUSER=<your username>
export PGPASSWORD=<your password>
If you are using Ubuntu, you might want to look at this help article to install Postgres and get it set up with md5 authentication.
- Create a csv (comma seperated values) file of analysis ready data (AR2.0). use the analysisready package (http://github.com/harryganz/analysisready) if necessary. Each file should contain sample data for all species in a given year and region. DO NOT include more than one year or region in an individual AR2.0 file.
- Compress each file into a zip file. DO NOT include more than one csv in a zip file.
- Rename the csv and zip files to match the following convention: <region_abbreviation><year>.<file_extension>. The region abbreviations are: fk - Florida Keys, dt - Dry Tortugas, sefcri - Southeast Florida Coral Reef Initiative. For example, sample data from the Florida Keys in 2012 in zip format will be names "fk2012.zip". Sample data from 2004 in the Dry Tortugas in csv format will be names "dt2004.csv". NOTE: Each region/year should have two files: a csv file, and a zip file.
- Place the csv and zip files directly into the sample_data subdirectory of the public directory of this Rails application.
- Create a csv file with columns named: "YEAR","REGION", "STRAT", "PROT", "NTOT" (number of possible primary sampling units), and "GRID_SIZE" (side length of a primary sample unit, in meters). DO NOT include more than one year and region in a single ntot file.
- Rename the file according to the following convention: ntot_<region_abbreviation><year>.csv.
- Place the csv file(s) directly into the stratum_data directory of the public folder of this Rails application.
- Create a csv file with columns named: "SPECIES_CD","SCINAME","COMNAME","LC", "LM","WLEN_A","WLEN_B". Where SPECIES_CD is the first three letters of the generic name and first four letters of the specific name, SCINAME and COMNAME are the scientific and common name, respectively, LC is the length at capture (in cm), LM is the median length at maturity (in cm), WLEN_A is the alpha coefficient of the allometric growth equation in g/mm, and WLEN_B is the beta coefficient of the allometric growth equation.
- Rename the file to taxonomic_data.csv
- Save the file to the taxonomic_data subdirectory of the public folder of this Rails application.