What is this ~/Documents/Processing/libraries directory while installing Processing 3

I’m new to Processing. I was trying to get the code working based on the following link:

I’m using Linux Ubuntu. The following are the steps to install Processing based on the above link.

    1: Download Processing 3.
    2: Download Unfolding Maps version 0.9.9 for Processing 3.
    3: Navigate to ~/Documents/Processing/libraries on your machine.
    4: Drag and drop the unzipped Unfolding Maps folder into ~/Documents/Processing/libraries.
    5: Open Processing, navigate to Sketch > Import Library > Add Libary. Search for "Video Export" and click Install.
    6: Quit and re-open Processing.

I’m not exactly sure about the step 3 and step 4. More explicitly, how to find the ~/Documents/Processing/libraries folder? I have Processing 3 installed in my home folder. So, I can find ~/Processing folder, and inside of this folder, I have

devel@hpz4:~/processing$ ls
core  install.sh  java  lib  modes  processing  processing-java  revisions.txt  tools  uninstall.sh
devel@hpz4:~/processing$ 

So, what shall I do then?

I finally choose to use the lib folder. I mean, I drag and drop the unzipped Unfolding Maps into
~/Processing/lib.

Eventually, when I tried the first example following the read me file, the output is as the following.

devel@hpz4:~/Desktop/python_begin_again/transitland/transitflow$ python2 transitflow.py --name=bart --operator=o-9q9-bart

INPUTS:
date:  2019-03-02
name:  bart
API key:  None
1 operators to be downloaded.

o-9q9-bart 1 / 1
http://transit.land/api/v1/routes?per_page=10000&operated_by=o-9q9-bart
12 routes found.

http://transit.land/api/v1/stops?per_page=10000&served_by=o-9q9-bart
50 stops found.

http://transit.land/api/v1/schedule_stop_pairs?date=2019-03-02&per_page=10000&sort_min_id=0&operator_onestop_id=o-9q9-bart
9301 schedule stop pairs found.

success!

1 operators successfully downloaded.
0 operators failed.
Concatenating individual operator outputs.
Calculating trip segment bearings.
Total rows:  9301
Counting number of vehicles in transit.
Time elapsed:  0:00:24.503688

and

devel@hpz4:~/Desktop/python_begin_again/transitland/transitflow$ python2 transitflow.py --name=chicago --bbox=-87.992249,41.605175,-87.302856,42.126747 --clip_to_bbox --exclude=o-9-amtrak,o-9-amtrakcharteredvehicle

INPUTS:
date:  2019-03-02
name:  chicago
API key:  None
exclude:  ['o-9-amtrakcharteredvehicle', 'o-9-amtrak']
bbox:  -87.992249 41.605175 -87.302856 42.126747

http://transit.land/api/v1/operators?per_page=10000&bbox=-87.992249%2C41.605175%2C-87.302856%2C42.126747
5 operators in bounding box.
3 operators to be downloaded.

o-dp3-pace 1 / 3
http://transit.land/api/v1/routes?per_page=10000&operated_by=o-dp3-pace
228 routes found.

http://transit.land/api/v1/stops?per_page=10000&served_by=o-dp3-pace
https://api.transit.land/api/v1/stops?offset=10000&per_page=10000&served_by=o-dp3-pace&sort_key=id&sort_order=asc
https://api.transit.land/api/v1/stops?offset=20000&per_page=10000&served_by=o-dp3-pace&sort_key=id&sort_order=asc
25556 stops found.

http://transit.land/api/v1/schedule_stop_pairs?date=2019-03-02&per_page=10000&sort_min_id=0&operator_onestop_id=o-dp3-pace
10000
https://api.transit.land/api/v1/schedule_stop_pairs?date=2019-03-02&operator_onestop_id=o-dp3-pace&per_page=10000&sort_key=id&sort_min_id=4707804518&sort_order=asc
20000
https://api.transit.land/api/v1/schedule_stop_pairs?date=2019-03-02&operator_onestop_id=o-dp3-pace&per_page=10000&sort_key=id&sort_min_id=4707819294&sort_order=asc
30000
https://api.transit.land/api/v1/schedule_stop_pairs?date=2019-03-02&operator_onestop_id=o-dp3-pace&per_page=10000&sort_key=id&sort_min_id=4707864774&sort_order=asc
40000
https://api.transit.land/api/v1/schedule_stop_pairs?date=2019-03-02&operator_onestop_id=o-dp3-pace&per_page=10000&sort_key=id&sort_min_id=4707904035&sort_order=asc
retry 1 / 5: HTTP Error 502: Bad Gateway
retry 2 / 5: HTTP Error 502: Bad Gateway
retry 3 / 5: HTTP Error 502: Bad Gateway
retry 4 / 5: HTTP Error 502: Bad Gateway
retry 5 / 5: HTTP Error 502: Bad Gateway
failed:
HTTP Error 502: Bad Gateway
o-dp3-chicagotransitauthority 2 / 3
http://transit.land/api/v1/routes?per_page=10000&operated_by=o-dp3-chicagotransitauthority
retry 1 / 5: HTTP Error 502: Bad Gateway
retry 2 / 5: HTTP Error 502: Bad Gateway
retry 3 / 5: HTTP Error 502: Bad Gateway
137 routes found.

http://transit.land/api/v1/stops?per_page=10000&served_by=o-dp3-chicagotransitauthority
https://api.transit.land/api/v1/stops?offset=10000&per_page=10000&served_by=o-dp3-chicagotransitauthority&sort_key=id&sort_order=asc
retry 1 / 5: HTTP Error 502: Bad Gateway
retry 2 / 5: HTTP Error 502: Bad Gateway
retry 3 / 5: HTTP Error 502: Bad Gateway
retry 4 / 5: HTTP Error 502: Bad Gateway
retry 5 / 5: HTTP Error 502: Bad Gateway
failed:
HTTP Error 502: Bad Gateway
o-dp3-metra 3 / 3
http://transit.land/api/v1/routes?per_page=10000&operated_by=o-dp3-metra
retry 1 / 5: HTTP Error 502: Bad Gateway
retry 2 / 5: HTTP Error 502: Bad Gateway
retry 3 / 5: HTTP Error 502: Bad Gateway
retry 4 / 5: HTTP Error 502: Bad Gateway
retry 5 / 5: HTTP Error 502: Bad Gateway
failed:
HTTP Error 502: Bad Gateway
0 operators successfully downloaded.
3 operators failed.
failed operators: ['o-dp3-pace', 'o-dp3-chicagotransitauthority', 'o-dp3-metra']
Concatenating individual operator outputs.
Traceback (most recent call last):
  File "transitflow.py", line 404, in <module>
    df = concatenate_csvs("sketches/{}/{}/data/indiv_operators".format(OUTPUT_NAME, DATE))
  File "transitflow.py", line 184, in concatenate_csvs
    concatenated_df   = pd.concat(df_from_each_file, ignore_index=True)
  File "/usr/lib/python2.7/dist-packages/pandas/core/reshape/concat.py", line 212, in concat
    copy=copy)
  File "/usr/lib/python2.7/dist-packages/pandas/core/reshape/concat.py", line 245, in __init__
    raise ValueError('No objects to concatenate')
ValueError: No objects to concatenate

EDIT: I finally get it running. Yet, It seems like one package is missing, as I got the following error:
No library found for com.hamoid

1 Like

about above step 2.3.4.

-a- after you installed processing pls
start processing / you are in [JAVA] mode,
run any processing example for test
-b- when you write your own code pls use
file / save as /

myfirstproject

and it will be saved to a user code area actually you can also change first


after this ( using the path from the picture ) there will be your code at
/home/pi/projects/sketchbook/myfirstproject/myfirstproject.pde

using any filemanager ( here linux mc (midnight commander ) )
you can check on 2 locations:
-a- the user code storage
-b- the processing install path


and there you see that at
/home/pi/projects/sketchbook/
is also that
/home/pi/projects/sketchbook/libraries ( not at the processing install path )
there will be all installed libraries ( actually separated also if you use other MODEs like p5js … )
and that is the path where the unzipped downloaded map tool goes.

after that download unzip to “libraries”
must restart processing IDE
and search examples of that new library and test if it works: like
file / examples / contributed libraries / Unfolding Maps / SimpleMapApp

4 Likes

good, does this work with the examples from “Unfolding Maps”?

now step “5”
i have a problem with this:

Search for “Video Export” and click Install

there is a library “Video” ( should install anyhow ),
but no specific library “Video Export”
i not know to get from where?

your reply is really really helpful indeed! Yes. You’re right. I think it might be some documentation mistake or processing version updates. I’m working on testing the transitland-processing-aninmation code to see is it works.

Hi, I run it again, and the following is the output.

devel:~$ python2 transitflow.py --name=bart --operator=o-9q9-bart

INPUTS:
date:  2019-03-05
name:  bart
API key:  None
1 operators to be downloaded.

o-9q9-bart 1 / 1
http://transit.land/api/v1/routes?per_page=10000&operated_by=o-9q9-bart
12 routes found.

http://transit.land/api/v1/stops?per_page=10000&served_by=o-9q9-bart
50 stops found.

http://transit.land/api/v1/schedule_stop_pairs?date=2019-03-05&per_page=10000&sort_min_id=0&operator_onestop_id=o-9q9-bart
10000
https://api.transit.land/api/v1/schedule_stop_pairs?date=2019-03-05&operator_onestop_id=o-9q9-bart&per_page=10000&sort_key=id&sort_min_id=4911115056&sort_order=asc
14162 schedule stop pairs found.

success!

1 operators successfully downloaded.
0 operators failed.
Concatenating individual operator outputs.
Calculating trip segment bearings.
Total rows:  14162
Counting number of vehicles in transit.
Time elapsed:  0:00:34.411114

I finally found the sketch.pde file in the python code directory. And after running it using Processing, I got the following error message:

:~/processing$ Gtk-Message: 11:02:47.707: Failed to load module "canberra-gtk-module"
No library found for com.hamoid
Libraries must be installed in a folder named 'libraries' inside the sketchbook folder (see the Preferences window).
The package “com.hamoid” does not exist. You might be missing a library.

ok, thats it

so it was a library video_export needed.
documentation not wrong, he just not give a link for it.

1 Like

Yes. That’s right. I finally manually downloaded and installed this library like what we did with the Unfolding Maps library. It worked out charmingly. Thank you again, Kll.

I’m reading the code. I found the template.pde not easy to follow. I’m mainly interested in the animation part. Could you kindly point me to some related tutorial if you happen to know any? Thank you so much for your time and attention!