Icon

CSV - Import Weather Files from Sweden - KNIME Forum (82460)

<p>Import CSV Weather Files from Sweden - KNIME Forum (82460)</p>

URL: Hub: use R to read and write custom CSV files and read them back with different nodes https://hub.knime.com/-/spaces/-/~pL4LNWDVaZJPtdup/current-state/
URL: Import CSV Weather Files from Sweden - KNIME Forum (82460) https://forum.knime.com/t/file-reader-and-irregular-csv-files/82460/2?u=mlauber71

Import CSV Weather Files from Sweden - KNIME Forum (82460)

https://forum.knime.com/t/file-reader-and-irregular-csv-files/82460/2?u=mlauber71

library(readr)

file_location <- knime.flow.in[["v_filename"]]

# Adjust the delimiter to semicolon and set the header row to start from line 10

knime.out <- as.data.frame(read_delim(

file = file_location,

delim = ";",

col_names = TRUE,

skip = 9, # Skip the first 9 lines to start reading from the 10th line

col_types = cols(.default = "c"), # force to import as strings

locale = locale(encoding = "UTF-8") # Specify UTF-8 encoding

))

"conda.environment" variable Propagate Python and R environmentfor KNIME on MacOSX (Apple Scilicon)OR Windowswith Miniforge / Minicondaconfigure how to handle the environmentdefault = just check the names
conda_r_knime
smhi-opendata_1_107330_20240903_092400.csv
CSV Reader
Merge Variables
locate and create /data/ folder with absolute paths
Collect Local Metadata
v_filename
Java Edit Variable (simple)
Datumyyyy-MM-dd
String to Date&Time
library(readr) read CSV fileand guess formats
R Source (Table)
Tid (UTC)HH:mm:ss
String to Date&Time
Lufttemperatur
String to Number
data.table
Table Writer

Nodes

Extensions

Links