# How to display files column by column?

**URL:** <https://discourse.processing.org/t/how-to-display-files-column-by-column/18299>\
**Category:** Libraries\
**Created:** [March 2, 2020, 6:02am UTC](https://discourse.processing.org/t/how-to-display-files-column-by-column/18299 "2020-03-02T06:02:22Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![littleprince84](https://avatars.discourse-cdn.com/v4/letter/l/da6949/32.png) [@littleprince84](https://discourse.processing.org/u/littleprince84)\
**Post date:** [March 2, 2020, 6:02am UTC](https://discourse.processing.org/t/how-to-display-files-column-by-column/18299/1 "2020-03-02T06:02:22Z")

</div>

Hi, I’m very beginner. I really need your help.  
(Eventhough I used a library, the question is not about the library itself. The main question is a code regarding how to read files (column by column)and display it in sequence.)  
My project is…‘animation of hourly activities on map’.

1. To display amount of hourly activities on map. (On the same day, and the amount of activities will be described as circle size)

2. When I finish displaying activities(points) for time 0(T1), then now need to display points for time1(T1)…and so on(for time 2(T2), time 3(T3), time 4…) It should be an ‘animation’

3. the result needs to be “animation” which shows the changes of activities on the same points on the map over time(hourly)

The structure of CSV(which includes the information of location, amount of activities, time and date) file is as follow

 ![제조도 질문4](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/6/6c080135f07c2d6615f6d9221d11c2e6525243c4.jpeg)

I’ve tried to display for the first day of first time(T0) by using this code below.

```auto
// we should load all things in setup, and call each one and draw in draw() in order.

import com.reades.mapthing.*;
import net.divbyzero.gpx.*;
import net.divbyzero.gpx.parser.*;
import de.fhpotsdam.unfolding.*;
import de.fhpotsdam.unfolding.geo.*;
import de.fhpotsdam.unfolding.utils.*;
import de.fhpotsdam.unfolding.providers.*;

UnfoldingMap map;

ArrayList<Position> Bcontainer = new ArrayList(); //declare and create array "Big container" 
int maxSize = 0;
int upTo = 0;
int time;

void setup()
{
  size(800, 600, P2D);
  smooth();

  // Create interactive map centered around Jeju
  map = new UnfoldingMap(this, new OpenStreetMap.OpenStreetMapProvider());
  map.zoomAndPanTo(10, new Location(33.35, 126.52));
  MapUtils.createDefaultEventDispatcher(this, map);
  map.setTweening(true);
 
  
  // Load CSV data
  Table DataCSV = loadTable("oneday.csv", "header");

  for (int i=0; i<24 ;i++)
  {
    
  for (TableRow Row : DataCSV.rows()) 
    {
      
    // Create new empty object to store data
    Position Scontainer = new Position();
   
    // Read data from CSV
    Scontainer.k = Row.getInt("T"+i);
    float lat = Row.getFloat("Y_COORD");
    float lng = Row.getFloat("X_COORD");
    Scontainer.location = new Location(lat, lng);
    
    // Add to list of all location
    Bcontainer.add(Scontainer);
    maxSize = max(maxSize, Scontainer.k);
    }
  }
    newTime();
} 

// OK we put all (FROM 1~31 DAY) POINTS INTO BCONTAINER

void draw() 
{
  // Draw map and darken it a bit
  map.draw();
  fill(0, 150);
  rect(0, 0, width, height);

  noStroke();
  for( int i = 0; i < upTo; i++)
{
  for (Position Scontainer : Bcontainer) 
    {
    // Convert geo locations to screen positions
    ScreenPosition pos = map.getScreenPosition(Scontainer.location);
    float s = map(Scontainer.k, 0, maxSize, 1, 50);
    //the brightness of the circle
    fill(200, 30, 200, 50);
    ellipse(pos.x, pos.y, s, s);
    }
}

  if( millis() > time )
    {  
    newTime();
    
     if( ???? )
      {
      upTo++;
      }
    }
  }
  
void newTime()
{
  time = millis() + 100;
}

```

```auto
public class Position {
  Location location;
  int k ;
} 

```

My questions are

I used processing 2.X since only in that case

1. in setup() I red all columns and added them in Bcontainer(arrylist)
2. I want to read and draw column by column from Bcontainer. But I do not know how to do this.  
Do I have to use ‘2-D array?’
3. what is the code that enables me to read and display data one column by one column?(Column : each T, so that I can display them on the screen in sequence

plz help me ㅜㅜ

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [March 5, 2020, 12:01am UTC](https://discourse.processing.org/t/how-to-display-files-column-by-column/18299/2 "2020-03-05T00:01:22Z")

</div>

Why are you using Processing 2.x instead of Processing 3?

---

<div class="post-metadata">

**Author:** ![littleprince84](https://avatars.discourse-cdn.com/v4/letter/l/da6949/32.png) [@littleprince84](https://discourse.processing.org/u/littleprince84)\
**Post date:** [March 5, 2020, 12:13am UTC](https://discourse.processing.org/t/how-to-display-files-column-by-column/18299/3 "2020-03-05T00:13:49Z")

</div>

Since ‘unfolding map’ does not work with 3.x version

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [March 5, 2020, 12:35am UTC](https://discourse.processing.org/t/how-to-display-files-column-by-column/18299/4 "2020-03-05T00:35:24Z")

</div>

You might try contacting the author for a copy of the Unfolding Maps Processing 3 beta:

> [@How to get and install Unfolding Map v0.9.9beta library?](https://discourse.processing.org/t/how-to-get-and-install-unfolding-map-v0-9-9beta-library/7363/5):
>
> very good, is it possible to share that link?

See also a download link from:

- [transitland-processing-animation/README.md at master · transitland/transitland-processing-animation · GitHub](https://github.com/transitland/transitland-processing-animation/blob/master/README.md)

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [March 5, 2020, 8:02am UTC](https://discourse.processing.org/t/how-to-display-files-column-by-column/18299/5 "2020-03-05T08:02:00Z")

</div>

> [@littleprince84](#):
>
> what is the code that enables me to read and display data one column by one column?

You are using a table? You can address columns by their name or index.

See reference for row and table etc. (Journey, so I can‘t look at the moment)

---

<div class="post-metadata">

**Author:** ![AKREUZ](https://avatars.discourse-cdn.com/v4/letter/a/9dc877/32.png) [@AKREUZ](https://discourse.processing.org/u/AKREUZ)\
**Post date:** [April 3, 2021, 12:54pm UTC](https://discourse.processing.org/t/how-to-display-files-column-by-column/18299/6 "2021-04-03T12:54:34Z")

</div>

Is there a link for the beta to use unfolding maps for P3? I’ve contacted the author but haven’t gotten a response as of yet?

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [April 3, 2021, 1:09pm UTC](https://discourse.processing.org/t/how-to-display-files-column-by-column/18299/8 "2021-04-03T13:09:59Z")

</div>

The download link in the link that Jeremy provided works:

> [@How to display files column by column?](https://discourse.processing.org/t/how-to-display-files-column-by-column/18299/4):
>
> You might try contacting the author for a copy of the Unfolding Maps Processing 3 beta: See also a download link from: [transitland-processing-animation/README.md at master · transitland/transitland-processing-animation · GitHub](https://github.com/transitland/transitland-processing-animation/blob/master/README.md)

And it states that it is for P3.

Using Google at first a click on the link did nothing and then I did an “Open in a new window” and refreshed and it downloaded!

Also a right click on the link and “Save link as…” works.

`:)`

---

<div class="post-metadata">

**Author:** ![MoonAlien822](https://avatars.discourse-cdn.com/v4/letter/m/65b543/32.png) [@MoonAlien822](https://discourse.processing.org/u/MoonAlien822)\
**Post date:** [October 12, 2021, 11:25am UTC](https://discourse.processing.org/t/how-to-display-files-column-by-column/18299/9 "2021-10-12T11:25:30Z")

</div>

i can’t get it to work.

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [October 12, 2021, 11:45am UTC](https://discourse.processing.org/t/how-to-display-files-column-by-column/18299/10 "2021-10-12T11:45:58Z")

</div>

Hello,

> **[GitHub - transitland/transitland-processing-animation: Animating scheduled...](https://github.com/transitland/transitland-processing-animation)**
>
> Animating scheduled transit trips using the Transitland API and Processing - GitHub - transitland/transitland-processing-animation: Animating scheduled transit trips using the Transitland API and P...

It works here with Processing 3.5.4 on W10 Pro:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/0/06b95701d705c0ca2854a6ece25dfc060f1b8fd1.png)

Not all the examples have active links to data.

`:)`

---

<div class="post-metadata">

**Author:** ![MoonAlien822](https://avatars.discourse-cdn.com/v4/letter/m/65b543/32.png) [@MoonAlien822](https://discourse.processing.org/u/MoonAlien822)\
**Post date:** [October 12, 2021, 4:01pm UTC](https://discourse.processing.org/t/how-to-display-files-column-by-column/18299/11 "2021-10-12T16:01:35Z")

</div>

i live in that area but i can’t install it  
edit: i suddenly can istall it but i don’t know how to now use it in processing
