Skip to content

Commit

Permalink
fix: rename telemetry stations
Browse files Browse the repository at this point in the history
  • Loading branch information
bczernecki committed May 28, 2024
1 parent 6cad4be commit 367fbea
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export(meteo_imgw_daily)
export(meteo_imgw_datastore)
export(meteo_imgw_hourly)
export(meteo_imgw_monthly)
export(meteo_imgw_telemetry_stations)
export(meteo_noaa_co2)
export(meteo_noaa_hourly)
export(meteo_ogimet)
Expand All @@ -21,6 +20,7 @@ export(ogimet_daily)
export(ogimet_hourly)
export(sounding_wyoming)
export(spheroid_dist)
export(stations_meteo_imgw_telemetry)
export(stations_ogimet)
export(test_url)
import(data.table)
Expand Down
16 changes: 9 additions & 7 deletions R/meteo_imgw_telemetry_stations.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@
#'


meteo_imgw_telemetry_stations = function() {
stations_meteo_imgw_telemetry = function() {

telemetry_stations = read.csv("https://danepubliczne.imgw.pl/datastore/getfiledown/Arch/Telemetria/Meteo/kody_stacji.csv",
fileEncoding = "CP1250",
sep = ";",
stringsAsFactors = FALSE)
telemetry_stations = suppressWarnings(
read.csv("https://danepubliczne.imgw.pl/datastore/getfiledown/Arch/Telemetria/Meteo/kody_stacji.csv",
fileEncoding = "CP1250",
sep = ";",
stringsAsFactors = FALSE)
)
colnames(telemetry_stations) = c("no", "id", "name", "river", "lat", "lon", "alt")

# extra fix for columns wrongly signed in IMGW datatabase (i.e. missing semicolon):
Expand All @@ -28,8 +30,8 @@ meteo_imgw_telemetry_stations = function() {
telemetry_stations[fix_needed, "lat"] = telemetry_stations[fix_needed, "river"]
telemetry_stations[fix_needed, "river"] = NA

telemetry_stations$lon = coordinates_to_decimal(telemetry_stations$lon)
telemetry_stations$lat = coordinates_to_decimal(telemetry_stations$lat)
telemetry_stations$lon = suppressWarnings(coordinates_to_decimal(telemetry_stations$lon))
telemetry_stations$lat = suppressWarnings(coordinates_to_decimal(telemetry_stations$lat))
telemetry_stations$alt = as.numeric(gsub(x = telemetry_stations$alt, " ", ""))
telemetry_stations = as.data.table(telemetry_stations[,-1])
telemetry_stations$id = as.character(telemetry_stations$id)
Expand Down
2 changes: 1 addition & 1 deletion man/climate-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 367fbea

Please sign in to comment.