BCCN-Prog / weather_2016

For the BCCN 2016 advanced programming project
3 stars 1 forks source link

Using visualization functions #56

Open denisalevi opened 8 years ago

denisalevi commented 8 years ago

There are currently two plot functions for plotting multiple stations on a map of germany. To use them, include the following in your script:

import sys
sys.path.append('path/to/weather_2016')
from visualization import map_functions

In map_functions there are currently two functions available:

map_functions.interpolated_color_map()
map_functions.hexagon_map()

Both functions have following parameter structure (plus additional optional parameters):

    Params:
        station_lon (1D array): longitutes of station locations
        station_lat (1D array): latitudes of station locations
        station_val (1D array): values to plot per stations

For animation I would suggest that @akresnia implements the animation functions using above mapping functions in a file calles animation_functions.py' and with function nameshexagon_animation()andinterpolation_animation()'. The functions could then be imported and used like this:

from visualisation import animation_functions
animation_functions.hexagon_animation()
animation_functions.interpolation_animation()

The following parameters should be not optional:

    Params:
        station_lon (1D array): longitutes of station locations
        station_lat (1D array): latitudes of station locations
        station_val (2D array, dimension=(number_stations, number_time_steps):
            an array with each row being one station and each column being one time step to plot
        time (1D array): times for the different time steps, should be somehow shown on plot??

time could e.g. a counter with the date or the hour etc. depending on the plot we use. But this probably should be tackled once we know what plots we will use.

The map_functions should already work as described above, the animation_functions are still work in progress.

@rahul-nt @WHops can you check if using the plotting functions work for you?