Python从入门到实践,总结笔记6:CSV格式+JSON格式

1、CSV格式:要在文本文件中存储数据,最简单的方式是将数据作为一系列以以逗逗号号分分隔隔的的值值 (CSV)写入文件。这样的文件称为CSV文件。

创建reader对象;

对列表调用了enumerate() 来获取每个元素的索引及其值;

打印文件头:

import csv
from datetime import datetime
from matplotlib import pyplot as plt

filename = 'death_valley_2014.csv'

with open(filename) as f:
    reader = csv.reader(f)
    header_row = next(reader)
    for index, column_header in enumerate(header_row):
        print(index, column_header)

death_valley_2014.csv:

PST,Max TemperatureF,Mean TemperatureF,Min TemperatureF,Max Dew PointF,MeanDew PointF,Min DewpointF,Max Humidity, Mean Humidity, Min Humidity, Max Sea Level PressureIn, Mean Sea Level PressureIn, Min Sea Level PressureIn, Max VisibilityMiles, Mean VisibilityMiles, Min VisibilityMiles, Max Wind SpeedMPH, Mean Wind SpeedMPH, Max Gust SpeedMPH,PrecipitationIn, CloudCover, Events, WindDirDegrees
2014-1-1,63,42,24,14,9,5,48,32,15,30.31,30.25,30.19,,,,7,2,,0.00,0,,203
2014-1-2,66,47,28,22,19,16,58,36,19,30.29,30.19,30.11,10,10,10,9,2,,0.00,0,,135
2014-1-3,64,46,28,24,21,15,61,40,22,30.14,30.04,29.96,,,,9,3,,0.00,0,,205
2014-1-4,66,47,28,25,21,16,61,42,20,30.14,30.02,29.93,,,,9,4,,0.00,0,,148
2014-1-5,61,44,26,18,7,-1,56,30,9,30.34,30.27,30.15,,,,10,4,,0.00,0,,195
2014-1-6,57,40,23,7,3,-1,37,24,11,30.45,30.34,30.22,10,10,10,9,4,,0.00,3,,254
2014-1-7,57,44,30,10,7,5,37,26,14,30.24,30.15,30.09,10,10,10,9,4,,0.00,4,,211
2014-1-8,60,40,21,11,8,3,46,29,14,30.21,30.11,30.05,10,10,10,12,5,,0.00,3,,226
2014-1-9,57,42,27,19,14,8,52,36,20,30.14,30.08,30.01,10,10,10,9,4,,0.00,3,,241
2014-1-10,63,44,26,25,20,14,66,42,21,30.22,30.16,30.09,10,10,10,6,3,,0.00,3,,204
2014-1-11,64,47,30,29,25,17,67,38,22,30.23,30.08,29.94,10,10,10,23,6,37,0.00,0,,235
2014-1-12,63,50,35,29,22,17,49,33,18,30.37,30.15,29.92,10,10,10,15,8,18,0.00,0,,169
2014-1-13,64,46,28,16,14,11,51,31,14,30.53,30.44,30.36,10,10,10,10,4,,0.00,0,,159
2014-1-14,70,50,30,15,10,7,47,25,9,30.54,30.45,30.38,10,10,10,13,6,,0.00,0,,148
2014-1-15,70,50,30,12,8,4,34,21,9,30.46,30.37,30.29,10,10,10,12,6,,0.00,0,,177
2014-1-16,72,50,27,10,3,-1,39,20,6,30.35,30.28,30.22,10,10,10,12,5,,0.00,0,,167
2014-1-17,71,50,28,7,3,1,31,18,7,30.31,30.23,30.16,10,10,10,12,5,,0.00,0,,203
2014-1-18,69,48,28,9,4,-1,31,19,8,30.29,30.20,30.14,10,10,10,10,3,,0.00,0,,189
2014-1-19,69,48,27,8,5,1,33,20,9,30.26,30.19,30.12,10,10,10,12,4,,0.00,0,,223
2014-1-20,68,49,30,10,6,3,35,22,10,30.32,30.25,30.18,10,10,10,10,3,,0.00,0,,184
2014-1-21,62,45,28,11,8,4,36,23,13,30.35,30.27,30.18,10,10,10,8,3,,0.00,5,,251
2014-1-22,70,52,34,11,9,4,36,22,10,30.17,30.04,29.93,10,10,10,9,3,,0.00,2,,214
2014-1-23,66,46,27,17,10,3,36,23,12,30.22,30.09,29.95,10,10,10,14,6,22,0.00,3,,127
2014-1-24,66,54,41,19,16,15,36,24,15,30.38,30.31,30.25,10,10,10,12,4,,0.00,5,,141
2014-1-25,68,54,39,17,15,11,36,24,12,30.30,30.23,30.15,10,10,10,9,5,,0.00,0,,177
2014-1-26,63,48,33,19,14,11,42,28,16,30.18,30.09,30.02,10,10,10,9,3,,0.00,1,,221
2014-1-27,71,50,28,19,15,12,49,28,11,30.12,30.07,30.01,10,10,10,8,3,,0.00,3,,165
2014-1-28,71,52,34,20,17,14,44,29,13,30.19,30.13,30.08,10,10,10,9,2,,0.00,4,,281
2014-1-29,72,54,35,34,22,15,50,29,15,30.16,30.00,29.77,10,10,10,24,5,36,0.00,4,,221
2014-1-30,66,60,52,42,36,24,59,43,25,29.78,29.72,29.66,10,10,10,26,20,37,0.00,3,,213
2014-1-31,59,52,42,35,28,18,63,42,28,29.96,29.82,29.72,10,10,10,22,14,30,0.00,1,Rain,262
2014-2-1,55,44,33,30,12,2,65,32,11,30.10,30.05,29.97,10,10,10,20,8,26,0.00,1,,314
2014-2-2,54,40,25,27,19,13,69,46,21,30.10,30.00,29.90,10,10,10,21,5,25,0.00,2,,203
2014-2-3,55,40,26,26,24,20,81,55,29,29.96,29.91,29.84,10,10,10,10,5,,0.00,0,,204
2014-2-4,54,39,24,27,22,18,78,52,31,30.08,30.02,29.94,10,10,10,9,4,,0.00,3,,149
2014-2-5,55,41,27,28,23,15,66,48,29,30.13,30.04,29.99,10,10,10,10,3,,0.00,1,,185
2014-2-6,55,45,35,40,31,23,83,59,37,29.98,29.90,29.83,10,10,10,20,7,26,0.00,5,,238
2014-2-7,64,50,35,35,32,27,89,53,25,30.01,29.96,29.92,10,10,10,30,11,43,0.00,3,,220
2014-2-8,70,56,43,42,37,31,71,48,26,30.14,30.04,29.97,10,10,10,32,12,41,0.00,0,,214
2014-2-9,75,57,39,41,36,33,82,45,22,30.04,29.97,29.87,10,10,10,30,7,39,0.00,0,,229
2014-2-10,73,62,46,40,33,27,61,35,18,30.10,30.00,29.90,10,10,10,25,13,34,0.00,0,,183
2014-2-11,71,54,37,34,30,23,71,45,17,30.17,30.12,30.06,10,10,10,8,4,,0.00,3,,193
2014-2-12,70,54,37,29,26,22,57,37,21,30.23,30.14,30.08,10,10,10,8,5,,0.00,4,,183
2014-2-13,77,56,34,27,23,19,54,32,15,30.15,30.05,29.95,10,10,10,8,4,,0.00,2,,278
2014-2-14,78,58,37,23,20,17,48,25,13,30.12,30.03,29.97,10,10,10,24,4,,0.00,0,,263
2014-2-15,82,60,37,20,17,14,39,21,9,30.05,29.97,29.91,10,10,10,23,7,28,0.00,0,,247
2014-2-16,,,,,,,,,,,,,,,,,,,0.00,,,-1
2014-2-18,75,56,37,25,21,16,51,25,13,30.08,30.01,29.93,10,10,10,9,3,,0.00,6,,157
2014-2-19,80,61,42,27,21,12,38,25,8,29.98,29.85,29.77,10,10,10,24,7,33,0.00,1,,157
2014-2-20,68,52,37,26,18,12,49,27,13,30.19,30.10,30.00,10,10,10,12,5,,0.00,4,,148
2014-2-21,71,53,35,23,16,14,42,25,12,30.10,30.00,29.91,10,10,10,8,5,,0.00,0,,183
2014-2-22,72,54,35,22,18,15,47,27,13,29.99,29.92,29.87,10,10,10,7,4,,0.00,0,,179
2014-2-23,73,55,37,25,23,20,53,31,15,30.02,29.96,29.91,10,10,10,9,4,,0.00,0,,191
2014-2-24,75,56,37,24,21,15,51,28,12,30.04,29.97,29.91,10,10,10,10,2,,0.00,0,,218
2014-2-25,75,56,37,37,23,14,42,28,14,30.01,29.94,29.88,10,10,10,16,6,,0.00,1,,188
2014-2-26,68,55,42,46,37,27,75,50,36,29.98,29.92,29.88,10,10,10,21,8,29,0.00,4,,196
2014-2-27,70,62,53,47,32,13,75,41,16,29.91,29.81,29.72,10,10,10,28,18,39,0.01,4,Rain,209
2014-2-28,59,52,45,51,46,39,100,91,55,29.79,29.67,29.52,10,7,2,29,7,36,0.77,7,Rain,221
2014-3-1,57,50,43,46,42,40,97,77,57,29.93,29.81,29.68,10,10,10,20,10,24,0.01,4,Rain,185
2014-3-2,59,48,37,45,42,37,100,76,53,30.12,30.05,29.95,10,10,10,18,6,23,0.00,1,,181
2014-3-3,63,51,39,46,43,39,100,73,46,30.17,30.08,30.00,10,10,10,8,4,,0.00,4,,186
2014-3-4,70,59,48,46,44,40,93,63,33,30.06,29.99,29.93,10,10,10,10,5,,0.00,3,,183
2014-3-5,75,58,41,44,39,33,93,53,22,30.22,30.04,29.97,10,10,10,13,6,,0.00,4,,180
2014-3-6,79,64,50,42,38,29,68,40,22,29.99,29.89,29.79,10,10,10,26,8,36,0.00,4,,241
2014-3-7,73,62,52,33,20,11,38,22,10,30.09,30.01,29.90,10,10,10,20,10,30,0.00,3,,329
2014-3-8,73,58,44,28,24,18,51,28,13,30.25,30.19,30.12,10,10,10,13,6,,0.00,0,,180
2014-3-9,73,60,48,31,25,15,50,28,11,30.30,30.20,30.09,10,10,10,9,5,,0.00,1,,212
2014-3-10,80,62,46,35,27,16,46,28,10,30.09,29.97,29.88,10,10,10,22,10,31,0.00,4,,233
2014-3-11,69,58,48,34,22,11,54,28,16,30.13,30.07,29.98,10,10,10,14,5,21,0.00,4,,29
2014-3-12,66,58,50,19,16,12,27,21,13,30.20,30.10,30.03,10,10,10,21,11,30,0.00,1,,346
2014-3-13,71,56,42,22,16,8,41,22,9,30.03,29.98,29.91,10,10,10,13,5,,0.00,3,,339
2014-3-14,79,58,37,23,16,0,50,24,5,30.12,30.04,29.99,10,10,10,10,5,,0.00,0,,227
2014-3-15,78,62,48,28,25,20,37,25,14,30.32,30.24,30.13,10,10,10,10,5,,0.00,0,,182
2014-3-16,82,62,42,30,23,16,55,26,8,30.35,30.22,30.03,10,10,10,15,6,,0.00,0,,189
2014-3-17,80,68,57,25,20,14,25,15,9,30.01,29.77,29.60,10,10,10,32,14,43,0.00,4,,230
2014-3-18,68,57,43,21,12,5,32,18,9,30.04,29.93,29.80,10,10,10,15,8,23,0.00,0,,88
2014-3-19,71,54,36,14,10,6,39,20,8,30.16,30.08,30.04,10,10,10,9,5,,0.00,1,,160
2014-3-20,73,56,39,25,16,11,36,21,11,30.06,29.97,29.86,10,10,10,8,4,,0.00,4,,237
2014-3-21,79,61,44,32,26,20,43,26,13,29.91,29.83,29.76,10,10,10,16,6,25,0.00,2,,206
2014-3-22,78,62,46,35,30,25,61,32,16,30.00,29.93,29.81,10,10,10,14,5,,0.00,0,,180
2014-3-23,78,62,45,27,22,5,48,26,6,30.10,30.04,29.98,10,10,10,10,6,17,0.00,0,,200
2014-3-24,82,62,44,25,14,2,41,19,5,30.12,30.04,29.98,10,10,7,13,6,17,0.00,0,,170
2014-3-25,82,62,41,29,20,12,36,21,8,29.98,29.83,29.67,10,10,10,22,9,31,0.00,1,,241
2014-3-26,64,58,53,36,31,26,52,37,25,29.79,29.71,29.64,10,8,2,37,20,48,0.00,2,,230
2014-3-27,66,58,50,34,31,28,52,40,25,30.00,29.87,29.80,10,10,10,22,14,31,0.00,2,,231
2014-3-28,73,55,37,35,31,26,73,42,21,30.16,30.07,30.01,10,10,10,20,6,25,0.00,2,,206
2014-3-29,80,64,50,35,28,23,39,25,17,30.05,29.95,29.81,10,10,10,24,14,36,0.00,0,,220
2014-3-30,71,60,50,39,25,12,49,30,11,29.93,29.86,29.78,10,10,10,29,17,37,0.00,0,,232
2014-3-31,72,58,43,34,23,9,52,31,10,29.92,29.85,29.77,10,10,10,25,13,37,0.00,3,,209
2014-4-1,62,54,45,31,22,11,54,32,15,29.88,29.82,29.76,10,10,10,30,18,41,0.00,2,,241
2014-4-2,60,51,43,29,26,20,50,37,27,30.00,29.87,29.77,10,10,10,21,12,31,0.00,3,,238
2014-4-3,68,50,34,36,25,19,64,38,17,30.11,30.03,29.96,10,10,10,13,5,17,0.00,5,,186
2014-4-4,70,58,46,36,27,11,56,34,11,29.96,29.87,29.78,10,10,10,20,9,34,0.00,4,,204
2014-4-5,72,54,37,31,27,20,65,37,15,30.05,29.92,29.82,10,10,10,14,6,20,0.00,1,,209
2014-4-6,79,63,48,35,26,22,44,26,14,30.17,30.08,30.02,10,10,10,14,6,18,0.00,0,,178
2014-4-7,84,65,48,32,24,17,48,24,9,30.21,30.14,30.07,10,10,10,9,6,,0.00,0,,161
2014-4-8,88,67,46,29,22,13,41,20,6,30.18,30.08,30.00,10,10,10,14,7,18,0.00,4,,189
2014-4-9,91,74,57,29,17,-5,31,15,4,30.04,29.96,29.88,10,10,10,22,11,33,0.00,5,,227
2014-4-10,90,70,51,24,16,10,23,12,5,29.96,29.89,29.81,10,10,10,17,7,,0.00,4,,196
2014-4-11,90,72,54,33,24,16,31,18,7,29.87,29.78,29.68,10,10,10,23,9,32,0.00,0,,189
2014-4-12,88,68,52,41,34,29,43,27,13,29.72,29.67,29.62,10,10,10,24,8,33,0.00,0,,252
2014-4-13,87,70,52,38,25,-1,53,22,6,29.94,29.80,29.69,10,10,10,17,6,,0.00,0,,123
2014-4-14,80,66,53,12,7,2,16,10,6,30.16,30.07,29.98,10,10,10,16,9,22,0.00,0,,139
2014-4-15,87,69,52,35,24,13,33,20,13,30.01,29.86,29.72,10,10,10,14,6,17,0.00,3,,200
2014-4-16,89,70,53,34,31,24,47,25,10,29.79,29.73,29.65,10,10,10,9,5,,0.00,1,,173
2014-4-17,89,70,52,38,32,28,45,25,12,29.84,29.77,29.71,10,10,10,21,7,28,0.00,6,,199
2014-4-18,82,71,61,46,40,32,48,34,18,29.83,29.77,29.71,10,10,10,17,12,23,0.00,7,,162
2014-4-19,87,70,53,44,41,30,64,38,13,29.94,29.88,29.83,10,10,10,17,7,23,0.00,,,203
2014-4-20,90,72,57,43,38,29,55,32,12,30.02,29.96,29.89,10,10,10,16,6,,0.00,,,172
2014-4-21,91,72,53,32,24,14,41,20,7,30.02,29.92,29.81,10,10,9,21,10,33,0.00,5,,203
2014-4-22,75,65,57,32,23,15,30,19,11,29.80,29.76,29.71,10,10,10,31,16,44,0.00,1,,215
2014-4-23,75,60,45,30,20,14,34,22,10,29.97,29.90,29.81,10,10,10,15,5,,0.00,3,,193
2014-4-24,82,65,48,35,29,20,48,28,10,30.00,29.88,29.76,10,10,10,21,7,28,0.00,0,,202
2014-4-25,73,64,52,39,36,33,51,35,24,29.75,29.69,29.60,10,10,10,30,18,47,0.00,,,223
2014-4-26,70,58,48,27,25,22,42,29,18,29.82,29.68,29.51,10,10,10,24,16,36,0.00,,,255
2014-4-27,77,58,42,33,29,25,52,33,18,29.95,29.85,29.78,10,10,10,14,6,23,0.00,,,226
2014-4-28,79,63,48,33,28,22,52,28,14,30.10,29.99,29.88,10,10,10,9,5,,0.00,0,,176
2014-4-29,86,70,55,29,12,7,36,12,6,30.24,30.15,30.06,10,10,10,20,8,23,0.00,1,,4
2014-4-30,86,69,54,14,7,-3,17,9,4,30.27,30.14,30.02,10,10,10,16,8,25,0.00,1,,25
2014-5-1,88,70,53,28,9,3,24,10,5,30.19,30.09,29.98,10,10,10,10,7,18,0.00,2,,180
2014-5-2,97,75,54,26,21,13,28,14,5,30.05,29.95,29.85,10,10,10,20,6,28,0.00,1,,215
2014-5-3,96,75,55,21,16,7,22,11,4,29.87,29.82,29.77,10,10,10,24,9,37,0.00,0,,229
2014-5-4,91,80,70,36,24,13,29,15,6,29.84,29.80,29.74,10,10,10,28,16,36,0.00,1,,209
2014-5-5,82,72,63,39,34,29,38,27,15,29.81,29.76,29.70,10,10,10,30,19,38,0.00,3,,210
2014-5-6,70,60,48,38,32,25,68,37,20,29.75,29.69,29.63,10,10,6,28,16,39,0.00,3,Rain,278
2014-5-7,75,59,45,37,30,21,64,34,15,29.84,29.78,29.74,10,10,10,17,5,28,0.00,1,,222
2014-5-8,82,66,50,37,33,26,50,32,15,29.96,29.89,29.84,10,10,10,16,7,29,0.00,3,,208
2014-5-9,71,64,63,38,36,33,40,34,28,29.88,29.87,29.84,10,10,10,24,14,33,0.00,0,,231
2014-5-11,79,69,59,13,8,4,16,10,6,30.02,29.93,29.88,10,10,10,29,19,37,0.00,0,,344
2014-5-12,82,68,55,15,12,8,21,12,6,30.12,30.06,29.98,10,10,10,13,9,21,0.00,1,,293
2014-5-13,86,70,55,19,13,6,18,11,7,30.24,30.17,30.09,10,10,10,16,8,28,0.00,0,,167
2014-5-14,90,70,50,14,10,5,17,10,6,30.25,30.16,30.06,10,10,10,12,7,21,0.00,0,,163
2014-5-15,97,75,54,30,17,11,19,11,5,30.14,30.04,29.94,10,10,10,15,6,20,0.00,2,,201
2014-5-16,100,80,61,31,26,18,26,14,7,29.97,29.87,29.75,10,10,10,22,6,36,0.00,5,,245
2014-5-17,102,84,68,24,17,1,18,9,4,29.81,29.73,29.66,10,10,10,24,10,30,0.00,1,,231
2014-5-18,93,80,69,36,23,10,27,14,6,29.75,29.65,29.60,10,10,10,31,15,41,0.00,0,,250
2014-5-19,88,74,61,34,23,13,31,17,7,29.79,29.71,29.65,10,10,10,28,13,36,0.00,0,,201
2014-5-20,73,64,57,39,32,25,51,32,18,29.83,29.78,29.73,10,10,6,29,18,40,0.00,1,,231
2014-5-21,73,61,50,43,37,30,57,41,24,29.92,29.88,29.82,10,10,8,29,7,38,0.00,4,,276
2014-5-22,77,64,52,51,39,33,67,42,20,29.98,29.91,29.86,10,10,7,25,9,37,0.02,4,Rain,276
2014-5-23,88,68,50,46,37,27,75,36,12,29.94,29.88,29.80,10,10,10,15,5,22,0.00,0,,181
2014-5-24,93,77,63,43,38,30,40,24,11,29.84,29.79,29.72,10,10,10,15,6,22,0.00,0,,179
2014-5-25,98,79,61,44,40,33,46,25,11,29.90,29.82,29.74,10,10,10,14,6,16,0.00,0,,195
2014-5-26,104,83,64,46,40,30,43,23,9,29.88,29.81,29.75,10,10,10,25,6,33,0.00,0,,194
2014-5-27,102,82,63,40,32,21,38,18,6,29.91,29.82,29.73,10,10,10,22,8,33,0.00,0,,205
2014-5-28,98,84,70,35,25,17,23,14,5,29.78,29.72,29.65,10,10,10,26,10,38,0.00,3,,197
2014-5-29,93,75,57,33,23,9,36,16,4,29.85,29.79,29.74,10,10,10,17,7,28,0.00,3,,196
2014-5-30,98,76,55,20,13,8,19,10,4,29.84,29.79,29.72,10,10,10,21,8,29,0.00,1,,224
2014-5-31,95,80,68,20,13,1,15,9,4,29.81,29.76,29.73,10,10,10,24,13,31,0.00,0,,220
2014-6-1,97,75,55,32,16,6,19,11,4,29.86,29.78,29.70,10,10,10,16,5,20,0.00,0,,186
2014-6-2,97,80,64,29,20,9,24,13,4,29.79,29.73,29.68,10,10,10,28,11,39,0.00,1,,208
2014-6-3,96,76,57,27,15,2,20,10,4,29.85,29.77,29.70,10,10,10,17,9,24,0.00,0,,189
2014-6-4,104,78,61,31,23,13,24,14,5,29.80,29.73,29.67,10,10,10,17,9,16,0.00,0,,168
2014-6-5,100,81,62,35,26,12,28,15,4,29.79,29.71,29.62,10,10,10,15,6,23,0.00,0,,190
2014-6-6,102,81,62,35,30,20,30,16,6,29.70,29.65,29.57,10,10,10,13,5,,0.00,,,191
2014-6-7,102,82,63,36,30,16,31,15,4,29.72,29.66,29.59,10,10,10,20,7,24,0.00,,,176
2014-6-8,106,88,71,37,28,15,24,13,4,29.76,29.70,29.65,10,10,10,10,5,18,0.00,2,,192
2014-6-9,108,90,72,39,29,16,29,13,4,29.78,29.70,29.61,10,10,10,20,9,28,0.00,0,,200
2014-6-10,104,88,72,39,32,24,22,14,6,29.69,29.63,29.55,10,10,10,21,8,29,0.00,1,,203
2014-6-11,102,86,73,43,39,35,33,20,11,29.72,29.67,29.62,10,10,10,17,6,24,0.00,1,,198
2014-6-12,102,84,68,43,36,28,33,18,8,29.79,29.72,29.67,10,10,10,26,11,37,0.00,0,,205
2014-6-13,98,86,75,40,27,13,26,14,5,29.77,29.68,29.59,10,10,10,29,12,45,0.00,0,,226
2014-6-14,93,78,62,24,15,9,16,10,5,29.84,29.75,29.67,10,10,8,17,9,25,0.00,,,205
2014-6-15,95,78,64,33,22,11,19,12,6,29.67,29.63,29.57,10,10,6,30,12,37,0.00,,,225
2014-6-16,90,81,73,34,29,24,22,16,10,29.70,29.65,29.60,10,9,1,38,20,50,0.00,2,,217
2014-6-17,91,78,64,34,28,22,28,17,9,29.73,29.66,29.62,10,10,10,33,14,46,0.00,0,,220
2014-6-18,90,74,60,30,24,19,25,15,8,29.91,29.85,29.75,10,10,9,10,5,,0.00,0,,241
2014-6-19,97,78,60,30,24,14,26,14,6,29.95,29.88,29.83,10,10,10,12,5,,0.00,0,,190
2014-6-20,102,82,63,29,26,15,26,13,4,29.89,29.81,29.72,10,10,10,23,7,28,0.00,,,193
2014-6-21,106,84,64,28,22,15,23,11,4,29.81,29.73,29.65,10,10,10,23,8,30,0.00,,,216
2014-6-22,102,83,66,24,20,16,16,9,5,29.78,29.72,29.66,10,10,10,14,7,20,0.00,,,181
2014-6-23,102,83,64,34,25,19,19,12,5,29.81,29.75,29.70,10,10,10,18,5,22,0.00,1,,162
2014-6-24,105,84,64,35,32,29,28,15,8,29.83,29.74,29.66,10,10,10,25,7,33,0.00,0,,201
2014-6-25,104,86,69,42,33,28,23,15,8,29.84,29.71,29.63,10,10,2,29,9,37,0.00,0,,209
2014-6-26,91,85,79,45,42,39,29,23,19,29.73,29.68,29.59,10,8,2,37,25,51,0.00,4,,220
2014-6-27,100,81,64,45,41,36,40,24,11,29.79,29.71,29.62,10,10,10,16,5,23,0.00,0,,223
2014-6-28,105,86,68,45,42,36,40,23,9,29.77,29.71,29.65,10,10,10,20,6,28,0.00,,,188
2014-6-29,108,86,66,45,40,35,39,20,9,29.83,29.75,29.68,10,10,10,15,5,23,0.00,0,,167
2014-6-30,109,88,68,42,37,28,31,16,6,29.82,29.74,29.67,10,10,10,16,7,,0.00,1,,185
2014-7-1,109,94,78,43,37,22,28,16,5,29.77,29.70,29.63,10,10,10,22,9,30,0.00,0,,189
2014-7-2,109,91,73,42,35,17,28,15,4,29.79,29.73,29.67,10,10,10,22,10,29,0.00,0,,187
2014-7-3,108,90,73,41,34,24,25,15,6,29.84,29.78,29.73,10,10,10,28,10,34,0.00,0,,200
2014-7-4,105,90,75,49,41,37,27,18,10,29.95,29.87,29.80,10,10,10,24,11,29,0.00,,,184
2014-7-5,105,88,75,56,44,39,31,21,12,30.00,29.92,29.87,10,10,10,32,9,41,0.00,,,145
2014-7-6,105,88,75,50,45,41,31,21,16,29.97,29.88,29.79,10,10,10,24,7,31,0.00,,,295
2014-7-7,106,92,80,52,44,33,38,20,10,29.86,29.80,29.70,10,10,10,20,6,23,0.00,2,,218
2014-7-8,107,92,77,48,39,31,28,16,8,29.86,29.79,29.72,10,10,10,13,6,22,0.00,1,,183
2014-7-9,106,90,73,43,37,32,27,15,9,29.88,29.79,29.70,10,10,10,17,8,26,0.00,1,,179
2014-7-10,102,86,73,42,37,33,25,18,9,29.86,29.79,29.73,10,10,10,22,8,24,0.00,2,,180
2014-7-11,98,84,69,44,40,34,36,22,11,29.91,29.86,29.81,10,10,10,16,9,22,0.00,0,,172
2014-7-12,104,86,69,45,38,24,36,20,6,29.96,29.90,29.83,10,10,10,15,6,24,0.00,0,,136
2014-7-13,111,91,71,48,39,31,33,17,8,29.92,29.83,29.72,10,10,10,13,5,,0.00,0,,195
2014-7-14,104,93,84,56,51,48,31,23,17,29.91,29.86,29.79,10,10,10,16,9,24,0.00,5,,156
2014-7-15,102,90,81,59,53,48,42,28,17,29.95,29.88,29.80,10,10,10,17,7,23,0.00,2,,174
2014-7-16,104,90,79,54,50,36,42,27,11,29.89,29.83,29.75,10,10,10,20,9,30,0.00,1,,197
2014-7-17,104,88,73,52,46,25,43,27,7,29.89,29.82,29.73,10,10,10,20,11,26,0.00,0,,190
2014-7-18,102,86,71,51,44,28,47,28,8,29.91,29.83,29.76,10,10,10,20,9,23,0.00,1,,180
2014-7-19,100,87,75,59,48,39,56,28,14,29.90,29.86,29.81,10,10,10,15,9,22,0.00,0,Rain,188
2014-7-20,100,85,70,54,47,39,41,27,12,29.89,29.83,29.75,10,10,10,18,7,25,0.00,0,,192
2014-7-21,99,86,72,55,51,44,53,33,16,29.96,29.90,29.84,10,10,10,20,11,28,0.00,1,,176
2014-7-22,102,86,70,53,44,29,47,26,8,30.00,29.93,29.87,10,10,10,22,9,28,0.00,1,,185
2014-7-23,108,90,72,48,37,16,37,20,4,30.00,29.89,29.78,10,10,10,20,10,28,0.00,0,,193
2014-7-24,109,88,68,47,35,14,41,19,5,29.88,29.79,29.68,10,10,10,16,8,29,0.00,0,,195
2014-7-25,109,92,75,42,32,19,23,14,5,29.83,29.77,29.72,10,10,10,22,10,32,0.00,2,,191
2014-7-26,106,89,73,44,38,26,28,17,6,29.92,29.85,29.79,10,10,10,15,9,21,0.00,0,,189
2014-7-27,107,94,81,46,41,36,22,16,12,29.97,29.88,29.80,10,10,10,23,8,33,0.00,0,,170
2014-7-28,93,88,82,57,53,48,39,32,25,30.06,30.00,29.94,10,10,10,24,10,29,0.00,6,,224
2014-7-29,102,88,75,56,50,42,51,29,14,30.04,29.96,29.85,10,10,9,13,6,,0.00,4,,236
2014-7-30,106,90,75,54,49,43,33,24,13,29.95,29.91,29.85,10,7,1,36,14,48,0.00,3,,308
2014-7-31,106,91,77,53,48,44,42,24,13,29.95,29.87,29.76,10,10,10,14,7,24,0.00,1,,264
2014-8-1,108,91,75,47,43,38,34,19,9,29.88,29.81,29.74,10,10,10,16,7,22,0.00,0,,191
2014-8-2,99,87,75,57,47,40,29,24,15,29.91,29.85,29.79,10,10,9,20,11,28,0.00,0,,151
2014-8-3,84,76,68,66,60,46,87,63,26,30.09,29.97,29.84,10,9,3,17,10,25,0.06,6,Rain,315
2014-8-4,96,80,64,64,52,38,90,46,14,29.97,29.89,29.80,10,10,10,16,5,20,0.00,2,,221
2014-8-5,98,82,66,51,43,33,45,26,11,29.97,29.90,29.83,10,10,10,15,6,25,0.00,0,,186
2014-8-6,98,82,66,48,42,27,44,27,9,29.96,29.89,29.82,10,10,10,18,7,18,0.00,2,,188
2014-8-7,99,82,66,49,42,31,51,27,10,29.91,29.85,29.77,10,10,10,10,5,,0.00,0,,174
2014-8-8,100,83,66,50,40,24,45,24,7,29.89,29.83,29.77,10,10,10,13,5,18,0.00,0,,161
2014-8-9,102,86,71,45,39,29,33,20,8,29.91,29.85,29.78,10,10,10,14,6,,0.00,0,,187
2014-8-10,102,84,69,42,37,26,32,18,8,29.95,29.88,29.82,10,10,10,15,7,18,0.00,0,,191
2014-8-11,99,85,73,62,52,41,66,35,17,30.00,29.91,29.86,10,10,9,23,9,30,0.02,4,Rain-Thunderstorm,222
2014-8-12,100,86,73,58,54,48,57,34,19,29.97,29.88,29.76,10,10,10,20,7,25,0.00,2,,213
2014-8-13,100,87,75,51,43,28,40,24,9,29.89,29.85,29.78,10,10,10,26,12,38,0.00,0,,178
2014-8-14,100,85,71,51,35,9,49,22,4,29.92,29.86,29.78,10,10,10,30,15,37,0.00,0,,181
2014-8-15,102,83,66,42,32,19,38,18,6,29.96,29.89,29.83,10,10,10,21,9,25,0.00,0,,194
2014-8-16,104,84,66,30,25,20,22,12,5,30.00,29.91,29.82,10,10,10,13,6,17,0.00,0,,200
2014-8-17,106,84,64,36,28,22,19,13,7,29.94,29.85,29.77,10,10,10,18,6,23,0.00,0,,203
2014-8-18,102,88,73,37,27,13,22,12,4,29.81,29.74,29.67,10,10,10,17,11,28,0.00,2,,195
2014-8-19,98,82,66,48,32,20,37,18,6,29.73,29.70,29.63,10,10,10,25,13,36,0.00,2,,197
2014-8-20,91,78,66,44,41,36,42,27,14,29.91,29.83,29.74,10,10,10,14,10,16,0.00,0,,179
2014-8-21,96,77,61,53,44,39,44,28,15,29.94,29.87,29.82,10,10,10,18,7,28,0.00,0,,182
2014-8-22,100,82,66,50,43,32,49,26,10,29.89,29.80,29.71,10,10,10,30,10,38,0.00,0,,209
2014-8-23,97,84,71,44,40,36,31,22,12,29.87,29.78,29.72,10,10,10,15,9,23,0.00,0,,177
2014-8-24,96,81,66,43,39,22,42,25,7,29.84,29.77,29.69,10,10,10,21,9,26,0.00,0,,181
2014-8-25,97,80,64,41,33,20,38,21,6,29.83,29.76,29.69,10,10,10,29,15,43,0.00,0,,186
2014-8-26,97,80,64,40,35,26,40,21,8,29.96,29.88,29.81,10,10,10,20,10,23,0.00,0,,202
2014-8-27,99,80,61,39,33,28,36,20,9,30.05,29.97,29.92,10,10,10,10,6,,0.00,0,,176
2014-8-28,102,83,64,31,28,24,26,14,7,30.03,29.93,29.82,10,10,10,12,6,,0.00,0,,192
2014-8-29,105,84,63,36,26,19,22,13,5,29.89,29.81,29.73,10,10,10,14,5,16,0.00,0,,202
2014-8-30,105,85,66,38,34,27,28,17,9,29.81,29.72,29.64,10,10,10,25,9,34,0.00,0,,234
2014-8-31,105,88,73,33,28,24,19,12,6,29.77,29.70,29.64,10,10,10,17,8,25,0.00,0,,184
2014-9-1,102,82,63,43,32,27,27,17,7,29.82,29.75,29.69,10,10,10,13,5,17,0.00,0,,166
2014-9-2,102,85,68,42,37,28,33,19,8,29.82,29.72,29.64,10,10,10,24,8,31,0.00,0,,188
2014-9-3,102,85,68,42,38,32,35,20,10,29.72,29.63,29.54,10,10,10,18,8,25,0.00,0,,179
2014-9-4,100,82,64,43,36,28,35,20,8,29.71,29.65,29.60,10,10,10,16,7,18,0.00,0,,177
2014-9-5,99,81,63,39,30,16,31,18,5,29.88,29.81,29.72,10,10,10,13,7,17,0.00,0,,195
2014-9-6,100,82,64,46,36,25,25,18,14,29.94,29.86,29.78,10,10,10,18,7,23,0.00,0,,201
2014-9-7,100,86,71,61,47,38,41,27,16,29.87,29.79,29.71,10,10,10,29,9,39,0.00,0,,183
2014-9-8,95,84,75,56,47,36,45,28,22,29.85,29.78,29.71,10,10,10,25,10,33,0.01,4,Rain,198
2014-9-9,93,80,66,33,27,22,21,14,8,29.90,29.84,29.79,10,10,10,15,8,,0.00,0,,191
2014-9-10,97,79,62,31,28,25,29,16,9,29.96,29.88,29.81,10,10,10,9,6,,0.00,0,,183
2014-9-11,99,80,62,33,29,26,26,16,9,29.92,29.85,29.78,10,10,10,12,4,,0.00,0,,185
2014-9-12,100,82,64,35,32,29,28,17,9,29.90,29.83,29.75,10,10,10,14,5,16,0.00,0,,211
2014-9-13,100,82,64,39,35,31,28,18,10,29.86,29.78,29.71,10,10,10,12,4,,0.00,0,,197
2014-9-14,102,84,69,46,41,37,31,21,14,29.85,29.78,29.72,10,10,10,13,7,24,0.00,0,,215
2014-9-15,104,87,72,48,45,39,38,24,12,29.88,29.81,29.75,10,10,10,9,6,34,0.00,0,,209
2014-9-16,102,87,72,53,47,41,38,25,13,29.86,29.78,29.70,10,10,10,9,6,,0.00,0,,198
2014-9-17,102,86,72,51,47,42,41,26,15,29.80,29.73,29.63,10,10,10,15,7,18,0.00,0,,196
2014-9-18,93,84,73,47,42,38,39,24,15,29.73,29.69,29.65,10,10,10,25,13,37,0.00,0,,214
2014-9-19,91,75,59,48,42,35,58,33,15,29.86,29.80,29.74,10,10,10,16,7,24,0.00,0,,187
2014-9-20,95,77,61,55,44,35,44,30,17,29.92,29.84,29.77,10,10,10,18,6,36,0.00,2,,214
2014-9-21,91,78,64,52,47,32,60,35,12,29.94,29.88,29.83,10,10,10,13,5,,0.00,1,,180
2014-9-22,95,77,61,48,40,24,50,29,10,30.00,29.93,29.86,10,10,10,12,5,,0.00,0,,192
2014-9-23,97,78,60,40,31,13,43,22,5,30.00,29.92,29.85,10,10,10,12,7,17,0.00,0,,186
2014-9-24,98,76,55,39,34,26,35,21,11,29.97,29.89,29.81,10,10,10,22,7,26,0.00,0,,187
2014-9-25,96,82,70,55,48,38,43,31,23,29.90,29.84,29.78,10,10,10,25,11,39,0.00,0,,193
2014-9-26,90,76,64,49,43,30,54,35,12,29.86,29.79,29.70,10,10,10,24,13,38,0.00,0,,195
2014-9-27,77,68,60,41,36,29,44,32,18,29.78,29.74,29.68,10,9,2,37,13,47,0.00,2,,256
2014-9-28,79,64,51,44,38,35,56,38,23,29.87,29.81,29.76,10,10,10,23,5,32,0.00,1,,231
2014-9-29,82,68,57,44,40,35,56,37,22,29.98,29.92,29.87,10,10,10,20,10,28,0.00,1,,322
2014-9-30,82,70,51,42,38,34,59,35,15,29.93,29.84,29.68,10,10,10,16,6,23,0.00,0,,217
2014-10-1,88,70,53,42,31,19,47,26,10,29.98,29.86,29.69,10,10,10,16,6,23,0.00,0,,169
2014-10-2,86,68,51,21,15,5,26,15,5,30.15,30.08,29.99,10,10,10,10,5,,0.00,0,,186
2014-10-3,91,68,46,16,11,5,20,11,6,30.19,30.12,30.06,10,10,10,10,4,,0.00,0,,196
2014-10-4,93,71,51,18,15,11,20,12,6,30.12,30.03,29.94,10,10,10,9,5,,0.00,0,,201
2014-10-5,95,73,53,21,17,14,23,12,7,30.02,29.95,29.90,10,10,10,10,6,,0.00,0,,188
2014-10-6,95,73,53,26,20,14,22,14,7,29.99,29.92,29.84,10,10,10,12,5,,0.00,0,,179
2014-10-7,95,74,55,37,27,21,30,18,8,29.94,29.87,29.79,10,10,10,10,5,,0.00,1,,175
2014-10-8,91,72,55,40,34,30,37,25,14,29.91,29.84,29.77,10,10,10,9,5,,0.00,1,,197
2014-10-9,93,74,55,36,30,23,42,23,10,29.88,29.82,29.75,10,10,10,14,5,,0.00,0,,179
2014-10-10,90,70,52,35,29,23,32,21,11,29.97,29.91,29.85,10,10,10,10,4,,0.00,0,,178
2014-10-11,91,70,50,34,31,24,42,24,10,30.03,29.94,29.85,10,10,10,12,5,,0.00,0,,186
2014-10-12,93,72,52,32,14,-4,38,16,4,29.99,29.92,29.85,10,10,10,22,6,31,0.00,0,,258
2014-10-13,86,66,46,14,8,2,16,10,6,30.13,30.06,30.00,10,10,10,10,7,,0.00,0,,160
2014-10-14,88,67,46,33,15,4,24,14,6,30.03,29.93,29.81,10,10,10,17,8,24,0.00,2,,181
2014-10-15,84,74,61,41,33,22,42,25,10,29.88,29.83,29.74,10,10,8,29,15,37,0.00,1,,177
2014-10-16,81,64,48,39,35,31,59,37,19,30.00,29.91,29.85,10,10,10,12,5,,0.00,1,,163
2014-10-17,81,66,50,41,33,22,50,32,12,29.96,29.89,29.82,10,10,10,12,6,,0.00,4,,188
2014-10-18,84,65,48,41,35,31,59,34,18,29.94,29.88,29.82,10,10,10,12,6,,0.00,0,,190
2014-10-19,87,70,53,38,35,30,45,29,18,29.92,29.85,29.79,10,10,10,10,5,,0.00,0,,207
2014-10-20,88,70,52,40,37,32,53,31,17,29.91,29.84,29.76,10,10,10,21,8,29,0.00,2,,196
2014-10-21,81,66,51,42,36,30,56,34,17,29.91,29.85,29.79,10,10,10,17,8,,0.00,2,,206
2014-10-22,84,64,46,35,30,25,54,30,13,30.04,29.97,29.88,10,10,10,10,4,,0.00,3,,205
2014-10-23,88,67,46,31,27,22,44,24,10,30.08,29.99,29.91,10,10,10,17,5,,0.00,1,,185
2014-10-24,90,68,48,33,25,21,35,21,10,30.06,29.98,29.91,10,10,10,16,4,,0.00,0,,185
2014-10-25,84,74,63,40,32,26,37,24,13,30.01,29.95,29.91,10,10,10,24,12,32,0.00,0,,195
2014-10-26,77,64,52,40,35,26,51,36,16,29.96,29.89,29.83,10,10,10,15,8,,0.00,0,,196
2014-10-27,75,60,44,38,29,22,60,37,16,30.00,29.95,29.89,10,10,10,12,4,,0.00,0,,186
2014-10-28,79,62,44,26,22,20,40,25,13,30.11,30.06,30.00,10,10,10,9,5,,0.00,0,,196
2014-10-29,82,62,43,25,19,14,38,21,9,30.17,30.09,30.03,10,10,10,9,4,,0.00,0,,202
2014-10-30,84,64,45,22,18,13,28,18,10,30.08,29.99,29.90,10,10,10,10,5,,0.00,4,,210
2014-10-31,77,62,48,47,34,20,58,37,23,29.92,29.82,29.67,10,10,10,24,6,34,0.00,4,,175
2014-11-1,63,54,46,45,37,32,77,53,34,29.92,29.80,29.70,10,10,9,33,19,43,0.01,1,Rain,207
2014-11-2,66,52,37,37,30,19,79,47,17,30.10,30.01,29.94,10,10,10,8,4,,0.00,1,,250
2014-11-3,64,53,41,22,18,13,42,28,15,30.27,30.21,30.12,10,10,10,9,5,,0.00,0,,204
2014-11-4,69,50,32,17,13,10,44,24,11,30.36,30.29,30.23,10,10,10,9,3,,0.00,1,,196
2014-11-5,77,57,37,27,19,10,38,24,13,30.30,30.24,30.18,10,10,10,10,5,,0.00,0,,177
2014-11-6,80,60,41,30,26,21,51,29,14,30.32,30.24,30.17,10,10,10,12,3,,0.00,1,,177
2014-11-7,80,61,42,28,25,21,45,28,13,30.25,30.17,30.09,10,10,10,10,3,,0.00,0,,211
2014-11-8,82,62,42,28,25,21,45,28,13,30.22,30.13,30.06,10,10,10,9,4,,0.00,0,,188
2014-11-9,80,62,45,27,25,22,40,27,14,30.06,29.91,29.76,10,10,10,8,3,,0.00,0,,212
2014-11-10,81,62,43,32,26,21,47,30,15,29.81,29.75,29.68,10,10,10,9,3,,0.00,0,,215
2014-11-11,68,56,43,36,31,26,58,41,28,29.86,29.81,29.76,10,10,10,9,4,,0.00,0,,236
2014-11-12,72,56,39,38,33,28,68,46,28,29.95,29.89,29.83,10,10,9,8,4,,0.00,2,,190
2014-11-13,75,59,43,42,34,29,62,40,27,29.97,29.88,29.80,10,10,10,26,6,38,0.00,4,,233
2014-11-14,73,60,48,37,33,29,53,39,21,29.94,29.90,29.85,10,10,10,12,5,,0.00,1,,174
2014-11-15,71,54,37,33,30,26,65,44,21,30.05,29.95,29.87,10,10,10,10,3,,0.00,0,,248
2014-11-16,62,49,36,27,-1,-18,39,15,4,30.35,30.27,30.08,10,10,9,23,10,36,0.00,0,,193
2014-11-17,62,44,27,-6,-9,-12,18,12,6,30.37,30.30,30.24,10,10,10,9,4,,0.00,1,,230
2014-11-18,63,46,28,2,-3,-10,22,14,8,30.37,30.27,30.19,10,10,10,9,2,,0.00,5,,238
2014-11-19,68,52,36,37,14,0,44,24,11,30.20,30.10,30.02,10,10,10,18,5,28,0.00,2,,213
2014-11-20,66,52,37,37,29,20,58,41,27,30.11,30.00,29.86,10,10,10,15,5,,0.00,4,,207
2014-11-21,68,55,42,36,33,25,70,46,21,30.07,29.97,29.85,10,10,10,15,8,,0.00,0,,179
2014-11-22,64,50,36,36,32,26,68,49,29,30.10,29.99,29.86,10,10,10,13,4,,0.00,0,,219
2014-11-23,64,52,39,32,20,10,60,34,13,30.30,30.22,30.04,10,10,10,8,5,,0.00,0,,167
2014-11-24,64,47,30,21,13,8,52,29,12,30.45,30.37,30.27,10,10,10,10,6,,0.00,2,,186
2014-11-25,66,48,30,10,8,5,35,22,10,30.54,30.44,30.37,10,10,10,9,4,,0.00,0,,198
2014-11-26,70,51,32,12,9,5,32,21,11,30.44,30.36,30.29,10,10,10,8,3,,0.00,0,,210
2014-11-27,72,53,34,16,13,10,39,25,11,30.33,30.23,30.14,10,10,10,9,3,,0.00,0,,213
2014-11-28,70,52,33,17,11,-1,40,22,8,30.12,29.99,29.86,10,10,10,16,4,,0.00,0,,227
2014-11-29,77,60,44,21,12,5,23,16,10,29.88,29.81,29.74,10,10,10,20,9,28,0.00,0,,240
2014-11-30,66,59,52,46,35,10,62,45,17,30.05,29.89,29.77,10,10,10,31,14,43,0.00,0,,187
2014-12-1,61,50,39,44,39,34,83,63,52,30.23,30.14,30.06,10,10,10,13,7,,0.00,4,,186
2014-12-2,50,47,44,50,46,33,100,93,63,30.09,30.01,29.95,10,6,2,9,3,,1.16,7,Rain,223
2014-12-3,60,55,50,53,51,48,100,92,75,30.05,29.99,29.94,10,7,2,8,2,,0.00,8,Rain,184
2014-12-4,63,56,48,53,49,46,93,84,56,30.08,29.98,29.94,10,9,7,9,2,,0.00,4,,203
2014-12-5,60,53,46,52,49,45,93,84,67,30.20,30.15,30.09,10,9,6,6,2,,0.00,3,,225
2014-12-6,63,52,42,51,46,41,100,87,56,30.29,30.24,30.16,10,6,0,8,4,,0.00,3,Fog,196
2014-12-7,63,51,39,46,42,39,97,78,46,30.35,30.27,30.21,10,10,7,7,3,,0.00,0,,233
2014-12-8,66,52,39,44,41,38,93,71,38,30.26,30.20,30.15,10,10,10,8,4,,0.00,1,,213
2014-12-9,66,52,37,42,39,35,97,70,34,30.25,30.16,30.10,10,10,10,8,5,,0.00,2,,220
2014-12-10,60,48,37,43,39,35,93,73,49,30.13,30.05,29.97,10,10,10,9,3,,0.00,4,,224
2014-12-11,62,52,41,44,41,38,93,73,44,29.98,29.91,29.85,10,10,9,14,4,,0.00,5,,169
2014-12-12,54,50,46,50,43,36,100,79,66,29.95,29.87,29.76,10,10,5,20,11,24,0.21,6,Rain,188
2014-12-13,57,47,37,40,36,34,86,69,42,30.14,30.07,29.95,10,10,10,13,6,,0.00,0,,214
2014-12-14,54,43,32,38,35,30,92,77,49,30.19,30.14,30.09,10,10,10,8,4,,0.00,0,,238
2014-12-15,51,42,32,39,35,30,96,80,50,30.17,30.09,30.02,10,10,3,6,3,,0.07,6,Rain,223
2014-12-16,48,41,34,41,38,33,97,88,69,30.07,30.02,29.99,10,9,5,8,3,,0.01,6,Rain,206
2014-12-17,53,47,37,43,41,35,97,85,66,30.10,30.01,29.94,10,7,4,12,2,,0.01,6,Rain,220
2014-12-18,54,44,33,39,36,32,96,78,49,30.26,30.19,30.10,10,10,10,6,3,,0.00,4,,194
2014-12-19,52,42,33,41,37,32,96,82,59,30.29,30.22,30.17,10,10,10,8,4,,0.00,0,,210
2014-12-20,37,37,36,35,35,35,97,95,93,30.19,30.19,30.18,10,10,9,6,2,,0.00,0,,220
2014-12-22,61,50,39,44,42,38,97,75,54,30.19,30.13,30.06,10,10,5,10,4,,0.00,0,,230
2014-12-23,68,52,35,43,38,34,96,68,30,30.27,30.21,30.16,10,10,10,8,3,,0.00,0,,153
2014-12-24,60,48,36,41,37,33,93,66,41,30.19,29.96,29.67,10,10,3,31,5,41,0.00,2,,248
2014-12-25,53,47,41,29,15,9,46,29,17,30.01,29.89,29.64,10,10,10,32,18,39,0.00,0,,319
2014-12-26,51,42,34,16,13,10,44,31,19,30.28,30.14,30.01,10,10,10,13,8,,0.00,0,,332
2014-12-27,46,37,27,18,15,11,66,44,23,30.46,30.39,30.30,10,10,10,9,3,,0.00,0,,186
2014-12-28,50,38,25,21,18,14,75,54,24,30.36,30.26,30.15,10,10,10,8,4,,0.00,0,,221
2014-12-29,48,33,21,22,19,17,82,64,28,30.23,30.16,30.07,10,10,10,7,3,,0.00,0,,249

使用matplotlib绘画出气温图,并且在图表中添加日期:

import csv
from datetime import datetime
from matplotlib import pyplot as plt

filename = 'death_valley_2014.csv'
with open(filename) as f:
    reader = csv.reader(f)
    header_row = next(reader)
    dates, highs, lows = [], [], []
    for row in reader:
        try:
            current_date = datetime.strptime(row[0], "%Y-%m-%d")
            high = int(row[1])
            low = int(row[3])
        except ValueError:
            print(current_date, 'missing date')
        else:
            dates.append(current_date)
            highs.append(high)
            lows.append(low)


fig = plt.figure(dpi=128, figsize=(10, 6))
plt.plot(dates, highs, c='red')
plt.plot(dates, lows, c='blue')
plt.fill_between(dates, highs, lows, facecolor='blue', alpha=0.1)

plt.title("Daily high and low temperatures, July 2014", fontsize=24)
plt.xlabel('', fontsize=16)
fig.autofmt_xdate()
plt.ylabel("Temperature (F)", fontsize=16)
plt.tick_params(axis='both', which='major', labelsize=16)
plt.show()

结果:

2、JSON数据格式

JSON(JavaScript Object Notation) 是一种轻量级的数据交换格式。 易于人阅读和编写。同时也易于机器解析和生成。 它基于JavaScript Programming Language, Standard ECMA-262 3rd Edition - December 1999的一个子集。 JSON采用完全独立于语言的文本格式,但是也使用了类似于C语言家族的习惯(包括C, C++, C#, Java, JavaScript, Perl, Python等)。 这些特性使JSON成为理想的数据交换语言。

JSON建构于两种结构:

  • “名称/值”对的集合(A collection of name/value pairs)。不同的语言中,它被理解为对象(object),纪录(record),结构(struct),字典(dictionary),哈希表(hash table),有键列表(keyed list),或者关联数组 (associative array)。
  • 值的有序列表(An ordered list of values)。在大部分语言中,它被理解为数组(array)。

 populationdata.json:

[
  {
    "Country Name": "Arab World",
    "Country Code": "ARB",
    "Year": "1960",
    "Value": "96388069"
  },
  {
    "Country Name": "Arab World",
    "Country Code": "ARB",
    "Year": "1961",
    "Value": "98882541.4"
  },

.......

]

制作世界人口地图:JSON格式

首先导入了模块json ,以便能够正确地加载文件中的数据;

将数据存储在pop_data 中;

我们遍历pop_data 中的每个元素;

每个元素都是一个字典,包含四个键—值对,我们将每个字典依次存储在pop_dict 中;

将表示人口数量的字符串转换为数字值,为此我们使用函数int();我们先将字符串转换为浮点数,再将浮点数转换为整数;

获取国别码:

from pygal_maps_world.i18n import COUNTRIES


def get_country_code(country_name):
    for code, name in COUNTRIES.items():
        if name == country_name:
            return code
    return None


print(get_country_code('Andorra'))
print(get_country_code('United Arab Emirates'))
print(get_country_code('Afghanistan'))

遍历字典:cc_populations.items();

制作世界地图;

import json

import pygal.maps.world

from country_codes import get_country_code

filename = 'population_data.json'
with open(filename) as f:
    pop_data = json.load(f)

cc_populations = {}
for pop_dict in pop_data:
    if pop_dict['Year'] == '2010':
        country = pop_dict['Country Name']
        population = int(float(pop_dict['Value']))
        code = get_country_code(country)
        if code:
            cc_populations[code] = population

cc_pops_1, cc_pops_2, cc_pops_3 = {}, {}, {}
for cc, pop in cc_populations.items():
    if pop < 100000000:
        cc_pops_1[cc] = pop
    elif pop < 1000000000:
        cc_pops_2[cc] = pop
    else:
        cc_pops_3[cc] = pop

print(len(cc_pops_1), len(cc_pops_2), len(cc_pops_3))


wm = pygal.maps.world.World()
wm.title = 'World Population in 2010, by Country'
wm.add('0-10m', cc_pops_1)
wm.add('10m-1bn', cc_pops_2)
wm.add('>1bn', cc_pops_3)
wm.render_to_file('world_population.svg')

猜你喜欢

转载自blog.csdn.net/weixin_42717395/article/details/88916875