Description Usage Arguments Value Examples
read csv data from jma web site
1 |
from |
Date |
to |
Date |
phpsessid |
php session id obtained by 'get_phpsessionid()' |
wait |
wait for given time after POST |
list of csv data (character), each csv can be processed with 'readr::read_csv()'
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | library("lubridate")
library("readr")
library("purrr")
library("dplyr")
phpsessid <- get_phpsessionid()
# Site: Fukuchiyama, Kyoto
# Interval: from 2018-01-01 to 2018-12-31
# Data: Temperature and Precipitation
f <- read_jma(ymd("2018-01-01"), ymd("2018-12-31"), phpsessid)
# parse csv using readr
col_names <- c("Datetime", "Temp", "Temp_exists",
"Temp_quality", "Rain", "Rain_exists", "Rain_qality")
col_types <- cols(col_datetime("%Y/%m/%d %H:%M:%S"),
col_double(), col_integer(), col_integer(),
col_double(), col_integer(), col_integer())
d <- f %>%
map(function(x){
read_csv(x, col_names=col_names, col_types=, skip=5)
}) %>%
bind_rows()
head(d)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.