Skip to content

Commit

Permalink
Add curl to suggested section (in order to run example)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinRoth committed Mar 11, 2017
1 parent f67634b commit c982ac4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Title: Import KNMI Data
Version: 0.1.5.6
Authors@R: person("Martin", "Roth", email = "[email protected]",
role = c("aut", "cre"))
Date: 2017-03-11
Description: Import KNMI data into R.
License: MIT + file LICENSE
LazyData: TRUE
Expand Down Expand Up @@ -33,4 +34,5 @@ SystemRequirements: netcdf library version 4.1 or later
Suggests:
testthat,
rgeos,
raster
raster,
curl
4 changes: 2 additions & 2 deletions R/EOBS.R
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ removeOutsiders <- function(data, area) {
lon <- lat <- pointID <- NULL
setkey(data, lon, lat)
data[, pointID:=.GRP, by=key(data)]
coords <- data[, .(lon = unique(lon),
lat = unique(lat)), by = pointID][, .(lon, lat)]
coords <- data[, list(lon = unique(lon), lat = unique(lat)),
by = pointID][, list(lon, lat)]
points <- sp::SpatialPoints(coords, area@proj4string)
index <- data[, unique(pointID)][which(!is.na(sp::over(points,
as(area, 'SpatialPolygons'))))]
Expand Down
1 change: 1 addition & 0 deletions R/TechnicalImport.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ ReadZippedFile <- function(url, colNames) {
}

UpdateJsonTable <- function(jsonTable) {
depth <- lat <- lon <- mag <- NULL
tmp <- as.data.table(jsonTable)
tmp[, date := as.Date(date, tz = "CET")]
tmp[, depth := as.numeric(depth)]
Expand Down

0 comments on commit c982ac4

Please sign in to comment.