GithubHelp home page GithubHelp logo

Comments (2)

AnthonyFucci avatar AnthonyFucci commented on August 14, 2024

Thanks for reporting this! prepare_add_on_files() is kind of risky in that it's used very infrequently and does not have a warning to let the user know if specified directory has already been prepared as either 5 day or 7 day. It also needs to be called whenever the data is read in so that summarizeNHTS knows which weight type to use.

Try this method to see if it resolves the numbers. Update program first

devtools::install_github('Westat-Transportation/summarizeNHTS')
  1. Create a 5 day directory and a 7 day directory. Copy the entire INCOG dataset into each so that you have two folders with the original dataset (e.g. "C:/NHTS/INCOG/5day/csv/2017" and "C:/NHTS/INCOG/7day/csv/2017")
  2. Run prepare_add_on_files() twice, once for each directory.
prepare_add_on_files(
  directory = "C:/NHTS/INCOG/5day/csv/2017",
  weight_type = "5day"
)
prepare_add_on_files(
  directory = "C:/NHTS/INCOG/7day/csv/2017",
  weight_type = "7day"
)
  1. Whenever you read in an add on dataset, run prepare_add_on_files() with only the weight_type parameter specified so that summarizeNHTS knows which to use
nhts_data <- read_data(
  dataset = "2017",
  csv_path = "C:/NHTS/INCOG/5day"
)
prepare_add_on_files(weight_type = "5day")
  1. Now numbers should match other tools
summarize_data(
  data = nhts_data,
  agg = "trip_count",
  by = "WHYTRP1S"
)

from summarizenhts.

Westat-Transportation avatar Westat-Transportation commented on August 14, 2024

Closing due to lack of activity.

from summarizenhts.

Related Issues (10)

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.