Browse Source

Start writing readme

Fix readme
Petra Lamborn 2 years ago
parent
commit
100e043c57
2 changed files with 21 additions and 1 deletions
  1. 20
    1
      README.md
  2. 1
    0
      sql/weather.pgsql

+ 20
- 1
README.md View File

@@ -1,3 +1,22 @@
1 1
 # ampli
2 2
 
3
-Repository for Petra's work at ampli Jan-Feb 2019
3
+_Repository for Petra's work at [ampli](https://www.ampli.nz) Jan-Feb 2019_
4
+
5
+## What isn't in this repository
6
+
7
+This repository does not contain with it downloaded data (for confidentiality and size reasons), the fitted models (similar issues), or the configuration file for downloading from the database (which contains a password). Recreate an empty `data/` directory and `model/`. The configuration file is at `py/database.ini` and looks like:
8
+
9
+```ini
10
+[postgresql]
11
+host=<Hname>
12
+database=<dbname>
13
+user=<Username>
14
+password=<Password>
15
+```
16
+
17
+This file is based on an example from [the postgresSQL website](http://www.postgresqltutorial.com/postgresql-python/connect/). Replace `<Username>` and `<Password>` with valid credentials.
18
+
19
+## SQL
20
+
21
+I've included a bunch of annotated SQL queries in `sql/queries.pgsql` and `sql/weather.pgsql`. The latter file is specifically about the weather dataset; the former is more general. Some of the queries are copied into the `py/util.py` file, but changing these two files will do nothing on their own.
22
+

+ 1
- 0
sql/weather.pgsql View File

@@ -16,6 +16,7 @@ FROM weather.station_dim
16 16
 GROUP BY network
17 17
 ORDER BY agents DESC;
18 18
 
19
+-- Get data from station 2006
19 20
 SELECT record_no, station, temp_date, temp_time, tmax_c, tmin_c,
20 21
     tgmin, tmean, rhmean
21 22
 FROM weather.temperature_fact