Skip to content
Snippets Groups Projects
Commit ca941bcc authored by Clemens Berteld's avatar Clemens Berteld
Browse files

Added some comments

parent 05fdb6ce
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,7 @@ param_postgres = cfg["POSTGRES"]
param_interpol = cfg["INTERPOLATION"]
# Calculate average for a certain period of time for each station
def get_average_of_multiple_years(cursor, years):
avg_strings = " "
and_strings = ""
......@@ -41,6 +42,7 @@ def get_year_columns(cursor):
return columns
# Find minimum and maximum temperature value in database for colour ramp
def find_extremum(cursor, years, extremum):
extremum_strings = ''
and_strings = ''
......@@ -65,7 +67,7 @@ def get_min_max(cursor):
return min, max
# Find n (defined in config) neighbours and return them ordered by distance
# Find all neighbours and return them ordered by distance
def get_neighbours(cursor, lat, lon, columns):
values = '' # Used in second parameter of cursor.execute() (Avoids SQL injection)
for n in [lat, lon]:
......@@ -97,6 +99,7 @@ def calc_averages(neighbours, years):
return averages
# Find the nearest n neighbours (defined in config.ini) that are not NaN
def filter_neighbours(year, neighbours):
filtered_neighbours = []
neighbour_counter = 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment