Comments (2)
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')
- 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")
- 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"
)
- 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")
- Now numbers should match other tools
summarize_data(
data = nhts_data,
agg = "trip_count",
by = "WHYTRP1S"
)
from summarizenhts.
Closing due to lack of activity.
from summarizenhts.
Related Issues (10)
- read_data error: MSACAT HOT 2
- Issue in installation HOT 2
- summarizeNHTS HOT 6
- Error in fread HOT 9
- Missing variables in 2017 data HOT 3
- Install Error HOT 3
- 3 Weird Characters and HOT 2
- Incorrect variable labels in 2017 codebook HOT 3
- Issue in installation with R 3.6 in Conda environment HOT 5
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 summarizenhts.