Julia로 시작하는 데이터 시각화
Gustavo Vieira Suñe
Data Analyst

tomato DataFrame| Date | 가격(루피) |
|---|---|
| FEB-2004 | 10.0 |
| MAR-2004 | 12.0 |
| APR-2004 | 6.0 |
| MAY-2004 | 8.0 |
| ... | ... |
tomato.Date = sort(
tomato.Date, :Date
)
# 시계열 플롯 plot( tomato.Date, tomato.Price,# 플롯 커스터마이즈 linewidth=2, linecolor=:tomato, label="Tomato" ) xlabel!("Date") ylabel!("Unit Price (Rupees)")

tomato DataFrame| Date | 가격(루피) |
|---|---|
| APR-2004 | 6.0 |
| APR-2005 | 10.0 |
| APR-2006 | 8.0 |
| APR-2007 | 8.0 |
| ... | ... |
using Dates
birthday = Date("1989-12-04")
birthday = Date(
"1989/DEC/04", dateformat"y/u/d"
)
birthday = Date(
"Dec 4, 1989", dateformat"u d, y"
)
| 코드 | 의미 | 예시 |
|---|---|---|
| Y/y | 연도 (YYYY) | 1989, 2023 |
| m | 월 (MM) | 1, 10 |
| u | 월 약어 | Jan, DEC |
| U | 월 이름 | January, DECEMBER |
| d | 일 (DD) | 4, 28 |
| H | 시 (HH) | 12, 22 |
| M | 분 (MM) | 05, 25 |
| S | 초 (SS) | 10, 59 |
tomato.Date = Date.(
tomato.Date, dateformat"u-y"
)
tomato.Date = sort(
tomato.Date, :Date
)
| Date | 가격(루피) |
|---|---|
| 2004-02-01 | 10.0 |
| 2004-03-01 | 12.0 |
| 2004-04-01 | 6.0 |
| 2004-05-01 | 8.0 |
| ... | ... |
# 시계열 플롯
plot(
tomato.Date,
tomato.Price,
# 플롯 커스터마이즈
linewidth=2,
linecolor=:tomato,
label="Tomato"
)
xlabel!("Date")
ylabel!("Unit Price (Rupees)")

# 최고가 행 maximum_price = tomato[ argmax(tomato.Price), :]# 플롯에 주석 추가 annotate!( # 좌표 maximum_price.Date, maximum_price.Price + 2,# 주석 텍스트 "Highest Price", annotationfontsize=8 )

Julia로 시작하는 데이터 시각화