Thanks to visit codestin.com
Credit goes to github.com

Skip to content

SchmidtDSE/bart-ridership-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BART Processing Geopoint Example

More "realistic" example for using the Processing Geopoint library that interactively shows BART ridership by station and by journey (pair of stations where the system is entered and exited) with an optional population layer.

Animated screenshot of a visualization showing journeys within BART using processing-geopoint.



Purpose

Though the Processing Geopoint documentation offers examples of use, they are generally quite small. This project provides a more realistic example of using these tools in a more complex Processing sketch. Specifically, this mini-project explores ridership of the Bay Area Rapid Transit system (BART) in the San Francisco Bay Area.



Installation

After installing Processing, simply clone this repository with git clone [email protected]:SchmidtDSE/processing-geopoint.git. Don't have git installed? You can also download as a zip file from GitHub.



Usage

A pre-built dataset is included and can be run through the Processing IDE (PDE) or via the command line.


PDE

Running via the PDE is simple:

  • Open the PDE.
  • Go to File > Open.
  • Open bart_geotools.pde within your local copy of this repository.
  • Click run.
    • Another window, with the visualization, will pop up.

Command line

If processing-java is installed, you can do all of this from the command line at:

processing-java --sketch=bart_geotools --run

Just have --sketch=bart_geotools point to the bart_geotools directory within your copy of the repo.


Build from scratch

The dataset is pre-built but the data pipeline can be run by using pipeline/pipeline.sh. Note that this is expected to be run with the following dependencies already installed:

If you are on Linux with aptitude, build.sh will install all dependencies (including Processing), run the data pipeline, and execute the sketch non-interactively.



Method

The visualization deals with station ridership, journey ridership, and population estimations. Note that this describes the method currently employed on the main branch but community members may choose to modify this behavior.


Station ridership

The average weekday BART ridership data are aggregated such that any passenger entering or exiting the BART system at that station is considered in its ridership. Note that this uses the 202304 release. This is then represented as the area of the circle used to represent a station in the visualization.


Journey Ridership

A journey is the pairing of two stations such that all passengers entering at one station and exiting at another are considered in that journey's ridership. Put another way, passengers entering at station A and existing at station B are considered to be in the journey A - B.

By default, this is not directional (see pipeline/prep_dataset.py:DIRECTED). So, passengers entering at station B and exiting at station A are also considered to be part of the ridership for journey A - B. In other words, journey A - B is the same as journey B - A.

This visualization uses average weekday BART ridership data from the 202304 release and represents ridership by strokeWeight (line width) for lines between the two stations involved in the journey.


Population estimations

This visualization uses WorldPop 2020 Unconstrained USA Population Counts aggregated to a 5 letter geohash by summing all pixels found within a geohash's bounds. These are then visualized using a sequential mono-chromatic color scale.



Development standards

Processing code should use two space tabs and follow standard Java conventions where possible including JavaDoc on any public or global scope methods and classes. All Python code should follow the Google Python Style Guide where possible. At this stage, unit test targets are not enforced. Code should pass automated tests before merge.



Contributing

Pull requests and bug reports welcome. We do not have a formalized template but please be kind. Open source is often a labor of love done outside work hours / pay. We may decline to fulfill a bug or merge a PR in which case we politely recommend a fork.



License and open source

Released under the BSD license. See LICENSE.md for more details. Copyright Regents of University of California.

Visualization uses:

Data credits:

The data pipeline uses the following:

Some bash scripts also use the following but are not linked and are, instead, simply called:

Sam Pottinger is the primary contact.

About

Example usage of Processing Geopoint using BART ridership data.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors