Skip to content

Instantly share code, notes, and snippets.

@TaylorMutch
Created December 1, 2016 02:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TaylorMutch/6c128220cbf1da72c4ca3964a27827a8 to your computer and use it in GitHub Desktop.
Save TaylorMutch/6c128220cbf1da72c4ca3964a27827a8 to your computer and use it in GitHub Desktop.
Example of how to use jerilyn.py
>>> from jerilyn import build_night_classification
>>> data = build_night_classification('path/to/sodar_data', 'path/to/classification.csv')
# Keys for accessing the top layer of data
>>> data[0].keys()
dict_keys(['mcrae_speeds', 'date', 'meta', 'primet_directions', 'mcrae_directions', 'primet_speeds'])
# Keys for accessing the criterion
>>> data[0]['meta'].keys()
dict_keys(['pulsing', 'mesoscale_forcing', 'date', 'direction', 'year', 'month', 'day', 'valley_jet', 'similar'])
# Example of what one criterion might look like
>>> print(data[0]['meta'])
{'pulsing': True, 'mesoscale_forcing': False, 'date': datetime.date(2012, 3, 14), 'direction': True, 'year': '2012', 'month': '3', 'day': '14', 'valley_jet': False, 'similar': False}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment