Misc cleanup
This commit is contained in:
		
							parent
							
								
									5803efd4bb
								
							
						
					
					
						commit
						690b325884
					
				
					 6 changed files with 3 additions and 58 deletions
				
			
		
							
								
								
									
										28
									
								
								README.md
									
										
									
									
									
								
							
							
						
						
									
										28
									
								
								README.md
									
										
									
									
									
								
							|  | @ -16,34 +16,12 @@ Prerequisites | |||
| 
 | ||||
| - [AKExtract](http://github.com/thermokarst/akextract) | ||||
| - Flask (0.10.1) | ||||
| - SQLAlchemy (0.8.2) | ||||
| - psycopg2 (2.5.1) | ||||
| - flask-wtf (0.9.1) | ||||
| - SQLAlchemy (1.0.5) | ||||
| - psycopg2 (2.6.1) | ||||
| - flask-wtf (0.12) | ||||
| - PostgreSQL (9.4+) | ||||
| 
 | ||||
| 
 | ||||
| Installation | ||||
| ------------ | ||||
| 
 | ||||
| 1) Clone the repo: | ||||
| 
 | ||||
|     $ git clone https://github.com/thermokarst/akindices | ||||
| 
 | ||||
| 2) Get the data from http://snap.uaf.edu | ||||
| 
 | ||||
| 3) Copy `config.py.default` to `config.py`, edit the parameters to suit your needs. | ||||
| 
 | ||||
| 4) Launch a python interpreter and populate the database with data: | ||||
| 
 | ||||
|     $ python | ||||
|     >>> import akindices | ||||
|     >>> akindices.database.init_db() | ||||
| 
 | ||||
| 5) Launch the application with: | ||||
| 
 | ||||
|     $ ./run.py | ||||
| 
 | ||||
| 
 | ||||
| Contact | ||||
| ------- | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,7 +1,6 @@ | |||
| from flask_wtf import Form | ||||
| from wtforms import IntegerField, SelectField | ||||
| from wtforms.validators import NumberRange, Required | ||||
| from sqlalchemy import func | ||||
| 
 | ||||
| 
 | ||||
| class AKIYearField(IntegerField): | ||||
|  |  | |||
|  | @ -1,5 +1,4 @@ | |||
| from app import db | ||||
| from sqlalchemy.ext.hybrid import hybrid_property | ||||
| from sqlalchemy.sql import text | ||||
| from flask import abort | ||||
| 
 | ||||
|  |  | |||
|  | @ -77,19 +77,3 @@ SELECT c.name, c.latitude, c.longitude, c.northing, c.easting, t.data | |||
| INTO new_communities | ||||
| FROM temp05 t | ||||
| INNER JOIN communities c ON c.id=t.community_id; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| select distinct on (doc->'model', doc->'datatype', doc->'scenario') doc->'model', doc->'datatype', doc->'scenario' from new_communities c, jsonb_array_elements(c.data) with ordinality t1(doc, rn); | ||||
|  |  | |||
|  | @ -28,12 +28,3 @@ config = { | |||
| 
 | ||||
|     'default': DevelopmentConfig | ||||
| } | ||||
| 
 | ||||
| #  WITH x AS ( | ||||
| #     SELECT name, jsonb_array_elements(data) AS data | ||||
| #     FROM temps06 | ||||
| #     WHERE name='Anchorage') | ||||
| # SELECT d.key::INTEGER AS year, d.value AS temperatures | ||||
| # FROM x, jsonb_each(data) d | ||||
| # WHERE data->>'model'='CRU' | ||||
| # AND d.key NOT IN ('model', 'datatype', 'scenario', 'modelname', 'resolution'); | ||||
|  |  | |||
|  | @ -9,9 +9,3 @@ itsdangerous==0.24 | |||
| psycopg2==2.6.1 | ||||
| Flask-WTF==0.12 | ||||
| WTForms==2.0.2 | ||||
| flake8==2.4.1 | ||||
| flake8-docstrings==0.2.1.post1 | ||||
| mccabe==0.3.1 | ||||
| pep257==0.6.0 | ||||
| pep8==1.5.7 | ||||
| pyflakes==0.8.1 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Matthew Dillon
						Matthew Dillon