Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example code fails #37

Open
blackburnstat opened this issue Aug 29, 2022 · 1 comment
Open

Example code fails #37

blackburnstat opened this issue Aug 29, 2022 · 1 comment

Comments

@blackburnstat
Copy link

Hi. The code given in the vignette is not working for me (running R 4.2.0, RStudio 2022.07.1).

> library(odjitter)
Attaching package: ‘odjitter’
The following object is masked from ‘package:base’:
    jitter
> od <- readr::read_csv("https://github.com/dabreegster/odjitter/raw/main/data/od.csv")
Rows: 49 Columns: 11                                                                                                                     
── Column specification ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Delimiter: ","
chr (2): geo_code1, geo_code2
dbl (9): all, from_home, train, bus, car_driver, car_passenger, bicycle, foot, other
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
> zones = sf::read_sf("https://github.com/dabreegster/odjitter/raw/main/data/zones.geojson")
> names(zones)[1] = "geo_code"
> road_network = sf::read_sf("https://github.com/dabreegster/odjitter/raw/main/data/road_network.geojson")
> od_unjittered = od::od_to_sf(od, zones)
0 origins with no match in zone ids
0 destinations with no match in zone ids
 points not in od data removed.
> set.seed(42) # for reproducibility
> od_jittered <- jitter(od, zones, subpoints = road_network)
Error in system(paste0(odjitter_location, " --help"), intern = TRUE) : 
  'odjitter' not found

Thanks for any help.

@Robinlovelace
Copy link
Collaborator

Hi @blackburnstat it looks like you need to install the odjitter Rust crate. You can verify that it is installed by entering the following command in your system command line console, e.g. Poweshell or ideally a Linux terminal:

odjitter

You should see something like this:

odjitter
odjitter 0.1.0
Dustin Carlino <dabreegster@gmail.com
Disaggregate origin/destination data from zones to points

USAGE:
    odjitter <SUBCOMMAND>

OPTIONS:
    -h, --help       Print help information
    -V, --version    Print version information

SUBCOMMANDS:
    disaggregate    Fully disaggregate input desire lines into output representing one trip
                        each, with a `mode` column
    help            Print this message or the help of the given subcommand(s)
    jitter          Import raw data and build an activity model for a region

I know others have had issues installing it on Windows so any feedback on how you get on would be very welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants