GithubHelp home page GithubHelp logo

check update_dt function about gtfs2gps HOT 2 CLOSED

ipeagit avatar ipeagit commented on July 28, 2024
check update_dt function

from gtfs2gps.

Comments (2)

rafapereirabr avatar rafapereirabr commented on July 28, 2024 1

@Joaobazzo , it seems your last Pull Request broke something in the package, particularly in the vigntte. Please have a look. https://travis-ci.org/ipeaGIT/gtfs2gps

from gtfs2gps.

Joaobazzo avatar Joaobazzo commented on July 28, 2024
library(patchwork)
library(ggplot2)
poa <- gtfs2gps::read_gtfs(system.file("extdata/poa.zip", package="gtfs2gps"))

fromgtfs <- poa$stop_times[!is.na(departure_time),.(departure_time)]
fromgtfs[,hora := stringr::str_sub(departure_time,1,2)]
table(fromgtfs$hora)
#> 
#> 00 01 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 
#> 11  1  9 31 42 53 54 39 40 42 44 45 41 48 49 58 47 37 31 25 27
p1 <- ggplot(data = fromgtfs,aes(x = hora)) + 
  geom_histogram(stat = "count",bins = 24)
#> Warning: Ignoring unknown parameters: binwidth, bins, pad

poa2 <- gtfs2gps::gtfs2gps(poa)
#> Converting shapes to sf objects
#> Linking to GEOS 3.6.2, GDAL 2.2.3, PROJ 4.9.3
#> Using 1 CPU core
#> Processing the data
poa2[,hora := stringr::str_sub(departure_time,1,2)]

table(poa2$hora)
#> 
#>     00     01     05     06     07 
#>   4890   1730 233436 324541 195696

p2 <- ggplot(data = poa2,aes(x = hora)) + 
  geom_histogram(stat = "count",bins = 24)
#> Warning: Ignoring unknown parameters: binwidth, bins, pad
pf <- p1 / p2
pf

Created on 2020-03-27 by the reprex package (v0.3.0)

from gtfs2gps.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.