Skip to content

A Software Library for Processing and Evaluating Travel Region Models

Notifications You must be signed in to change notification settings

osharaki/travel_regions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installing for development

  1. Clone this repository
  2. Navigate to its root directory
  3. Run pip install -e .

Usage

from travel_regions import TravelRegions

travel_regions = TravelRegions()

The examples section shows how TravelRegions can be utilized for various use cases.

Exporting results

Results are exported in the form of region files, which are serialized representations, following a standardized structure, of an instance of TravelRegions at a specific hierarchical level.

Four region files for the first four hierarchical levels of the default region model are already available in region_files. These are what's used when TravelRegions is instantiated without any arguments (default instantiation).

If, however, a region model is provided, i.e. TravelRegions(region_model="path/to/my_region_model.csv", levels=3), then that region model is used as a point of origin instead. For an example of how the CSV file representing a region model should be structured, refer to the travel region model.

The serialized class representation of any region model can be exported as a region file for a specific hierarchical level by calling the export_regions() method of TravelRegions.

Visualization

Travel Regions Visualizer is a simple JavaScript map tool built to interpret region files and visualize them using Leaflet.

About

A Software Library for Processing and Evaluating Travel Region Models

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages