Comments (4)
I thing round()
is a good idea. My only concern is that, as we are going to compute the average speed, having zero values for time is always unwanted, as it will produce infinite speeds. Additionally, if considering a distance of 15 meters, the maximum speed will be 54km/h if the travel time takes one second, but there are speeds higher than this value in some gtfs data that we use. Possibly it will be better to compute the speeds using the original values before converting to ITime
.
from gtfs2gps.
Indeed, this happens because iTime only accepts integer values so the smaller unit is seconds
. This idea of using round()
seems like a good suggestion to me. @pedro-andrade-inpe , what do you think ?
> data.table::as.ITime(1) + data.table::as.ITime(1)
[1] "00:00:02"
>
>
> data.table::as.ITime(0) + data.table::as.ITime(1)
[1] "00:00:01"
>
>
> data.table::as.ITime(.5) + data.table::as.ITime(.5)
[1] "00:00:00"
from gtfs2gps.
Arredondar dentro do parenteses na linha 189 desse script
https://github.com/ipeaGIT/gtfs2gps/blob/9fb6909aeedd1001bef6731e5cf00280db07309f/R/gtfs2gps_dt_parallel.R
from gtfs2gps.
Every convertion to ITimes
in mod_updates
that involves an arithmetical operation already uses round
. Therefore this issue can be considered finished.
from gtfs2gps.
Related Issues (20)
- should gtfs2gps includes as gtfs class, such as gtfstools? HOT 9
- gtfs2gps::gtfs2gps not processing transport network sf object HOT 4
- example of adjust_speed function not working HOT 1
- writing a merged gtfs list got: 'gtfs' must inherit from the 'gtfs' class HOT 2
- gtfs2gps::gtfs2gps function not exporting file with proper units
- incompatibility with gtfstools HOT 1
- Vignette link does not work HOT 1
- Check performance of using gtfstools::string_to_seconds() HOT 2
- adjust_speed approach HOT 2
- Add `progress` parameter to gtfs2gps HOT 1
- New silent parameter to gtfs2gps()
- gtfs2gps function changing input parameter by reference HOT 1
- 'speed' values are NA , but not really HOT 3
- problems with spatial_resolution input argument
- Submit v2.1-0 to CRAN
- Add new parameter ncores
- passar apend_height p/ gtfs2emis
- fix documentation of parameter `ncores`
- Issues with the upcoming release of units 0.8-2 HOT 1
- Reactivate codecov
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gtfs2gps.