수량 값의 시계열 사용
지정된 장소에서의 온도 변화를 분석합니다.
In[1]:=
![Click for copyable input](assets.ko/working-with-quantity-valued-time-series/In_91.png)
data = WeatherData[
Entity["City", {"Champaign", "Illinois", "UnitedStates"}],
"Temperature", {{2016, 3, 20}, {2016, 3, 22}}];
In[2]:=
![Click for copyable input](assets.ko/working-with-quantity-valued-time-series/In_92.png)
temps = TimeSeries[data, MissingDataMethod -> "Interpolation"]
Out[2]=
![](assets.ko/working-with-quantity-valued-time-series/O_64.png)
기온의 시계열을 시각화합니다.
In[3]:=
![Click for copyable input](assets.ko/working-with-quantity-valued-time-series/In_93.png)
DateListPlot[temps, PlotTheme -> "Detailed"]
Out[3]=
![](assets.ko/working-with-quantity-valued-time-series/O_65.png)
기본 특성을 살펴봅니다.
In[4]:=
![Click for copyable input](assets.ko/working-with-quantity-valued-time-series/In_94.png)
stats = {Min, Max, Mean, Median, StandardDeviation};
TableForm[{Map[#[temps] &, stats]}, TableHeadings -> {None, stats}]
Out[4]//TableForm=
![](assets.ko/working-with-quantity-valued-time-series/O_66.png)
온도를 화씨로 변환합니다.
In[5]:=
![Click for copyable input](assets.ko/working-with-quantity-valued-time-series/In_95.png)
tempsF = UnitConvert[temps, "DegreesFahrenheit"];
TableForm[{Map[#[tempsF] &, stats]}, TableHeadings -> {None, stats}]
Out[5]//TableForm=
![](assets.ko/working-with-quantity-valued-time-series/O_67.png)
6시간의 이동 평균을 구합니다.
In[6]:=
![Click for copyable input](assets.ko/working-with-quantity-valued-time-series/In_96.png)
avg = MovingMap[Mean, temps, {Quantity[6, "Hours"], Center}]
Out[6]=
![](assets.ko/working-with-quantity-valued-time-series/O_68.png)
전체 Wolfram 언어 입력 표시하기
Out[7]=
![](assets.ko/working-with-quantity-valued-time-series/O_69.png)