<jupyter_start><jupyter_text>Underway Intake Temperature from Dyson PCO2 systemData provided by J.Cross from PCO2 system<jupyter_code>%matplotlib inline
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
filename = 'data/GO9_2017-2018.all.txt'
dateparse = lambda x: pd.datetime.strptime(x, '%d/%m/%y %H:%M:%S')

df = pd.read_csv(filename, 
                  parse_dates={'datetime': ['PC Date', 'PC Time']}, 
                  date_parser=dateparse,
                  index_col='datetime')

df.head()
df.tail()
dfi = df['2018-04':'2018-05']
import gmt
fig = gmt.Figure()

#projection - 
fig.coast(region=[-185, -150, 50, 65], projection='B-167.5/60/55/60/6i', 
          land='black', water='lightgrey',
          frame=True,U=True) 
fig.show()
#choose temp boundaries
dfmiss = dfi.copy()
dfmiss['Intake Temp'].loc[(dfi['Intake Temp'] > 7) | (dfi['Intake Temp'] <-2)] = np.nan
# normalize data for colormap
dfnorm = dfmiss.apply(lambda x: (x - (-2)) / (7 - (-2)))
fig.plot(x=dfi.longitude.values, y=dfi.latitude.values, color=256*dfnorm['Intake Temp'], cmap='thermal', style='c0.05c')

fig.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1736474694589878, 'fraction_numerical': 0.04799301919720768, 'mean_word_length': 3.9017094017094016, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '275551', 'license': 'MIT', 'n_tokens_mistral': 467, 'n_tokens_neox': 424, 'n_words': 92, 'path': '2018/Python-GMT Dyson Underway PCO2.ipynb', 'repo_name': 'shaunwbell/ipythonnb', 'size': '1146'}