Skip to content

Commit

Permalink
v0.4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
xyluo25 committed May 16, 2024
1 parent 7e2515b commit 47313d1
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 28 deletions.
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# **Grid2demand**

GRID2DEMAND: A tool for generating zone-to-zone travel demand based on grid cells or TAZs
GRID2DEMAND: A tool for generating zone-to-zone travel demand based on grid cells or TAZs and gravity model

- [**Grid2demand**](#grid2demand)
- [**Code Examples**](#code-examples)
Expand Down Expand Up @@ -57,13 +57,13 @@ if __name__ == "__main__":
path_poi = "your-path-to-poi.csv"

# Initialize a GRID2DEMAND object
gd = GRID2DEMAND(node_file = path_node, poi_file = path_poi)
net = gd.GRID2DEMAND(node_file = path_node, poi_file = path_poi)

# load network: node and poi
net = gd.load_network()
net.load_network()

# Generate zone dictionary from node dictionary by specifying number of x blocks and y blocks
gd.net2zone(num_x_blocks=10, num_y_blocks=10)
net.net2zone(num_x_blocks=10, num_y_blocks=10)
# net.net2zone(cell_width=10, cell_height=10, unit="km")

# Synchronize geometry info between zone, node and poi
Expand All @@ -90,13 +90,13 @@ if __name__ == "__main__":
path_zone = "your-path-to-zone.csv" # zone_id, geometry are required columns

# Initialize a GRID2DEMAND object
gd = GRID2DEMAND(zone_file = path_zone, node_file = path_node, poi_file = path_poi)
net = gd.GRID2DEMAND(zone_file = path_zone, node_file = path_node, poi_file = path_poi)

# load network: node and poi
net = gd.load_network()
net.load_network()

# Generate zone
gd.taz2zone()
net.taz2zone()

# Synchronize geometry info between zone, node and poi
net.sync_geometry_between_zone_and_node_poi()
Expand All @@ -122,13 +122,13 @@ if __name__ == "__main__":
path_zone = "your-path-to-zone.csv" # zone_id, x_coord, y_coord are required columns

# Initialize a GRID2DEMAND object
gd = GRID2DEMAND(zone_file = path_zone, node_file = path_node, poi_file = path_poi)
net = gd.GRID2DEMAND(zone_file = path_zone, node_file = path_node, poi_file = path_poi)

# load network: node and poi
net = gd.load_network()
net.load_network()

# Generate zone
gd.taz2zone()
net.taz2zone()

# Synchronize geometry info between zone, node and poi
net.sync_geometry_between_zone_and_node_poi()
Expand All @@ -153,13 +153,13 @@ if __name__ == "__main__":
path_poi = "your-path-to-poi.csv"

# Initialize a GRID2DEMAND object
gd = GRID2DEMAND(node_file = path_node, poi_file = path_poi, use_zone_id=True)
net = gd.GRID2DEMAND(node_file = path_node, poi_file = path_poi, use_zone_id=True)

# load network: node and poi
net = gd.load_network()
net.load_network()

# Generate zone dictionary from node dictionary by specifying number of x blocks and y blocks
gd.net2zone(num_x_blocks=10, num_y_blocks=10)
net.net2zone(num_x_blocks=10, num_y_blocks=10)
# net.net2zone(cell_width=10, cell_height=10, unit="km")

# Synchronize geometry info between zone, node and poi
Expand Down
26 changes: 13 additions & 13 deletions README_pkg.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Project description

GRID2DEMAND: A tool for generating zone-to-zone travel demand based on grid cells or TAZs
GRID2DEMAND: A tool for generating zone-to-zone travel demand based on grid cells or TAZs and gravity model

## Introduction

Expand Down Expand Up @@ -38,13 +38,13 @@ if __name__ == "__main__":
path_poi = "your-path-to-poi.csv"

# Initialize a GRID2DEMAND object
gd = GRID2DEMAND(node_file = path_node, poi_file = path_poi)
net = gd.GRID2DEMAND(node_file = path_node, poi_file = path_poi)

# load network: node and poi
net = gd.load_network()
net.load_network()

# Generate zone dictionary from node dictionary by specifying number of x blocks and y blocks
gd.net2zone(num_x_blocks=10, num_y_blocks=10)
net.net2zone(num_x_blocks=10, num_y_blocks=10)
# net.net2zone(cell_width=10, cell_height=10, unit="km")

# Synchronize geometry info between zone, node and poi
Expand All @@ -71,13 +71,13 @@ if __name__ == "__main__":
path_zone = "your-path-to-zone.csv" # zone_id, geometry are required columns

# Initialize a GRID2DEMAND object
gd = GRID2DEMAND(zone_file = path_zone, node_file = path_node, poi_file = path_poi)
net = gd.GRID2DEMAND(zone_file = path_zone, node_file = path_node, poi_file = path_poi)

# load network: node and poi
net = gd.load_network()
net.load_network()

# Generate zone
gd.taz2zone()
net.taz2zone()

# Synchronize geometry info between zone, node and poi
net.sync_geometry_between_zone_and_node_poi()
Expand All @@ -103,13 +103,13 @@ if __name__ == "__main__":
path_zone = "your-path-to-zone.csv" # zone_id, x_coord, y_coord are required columns

# Initialize a GRID2DEMAND object
gd = GRID2DEMAND(zone_file = path_zone, node_file = path_node, poi_file = path_poi)
net = gd.GRID2DEMAND(zone_file = path_zone, node_file = path_node, poi_file = path_poi)

# load network: node and poi
net = gd.load_network()
net.load_network()

# Generate zone
gd.taz2zone()
net.taz2zone()

# Synchronize geometry info between zone, node and poi
net.sync_geometry_between_zone_and_node_poi()
Expand All @@ -134,13 +134,13 @@ if __name__ == "__main__":
path_poi = "your-path-to-poi.csv"

# Initialize a GRID2DEMAND object
gd = GRID2DEMAND(node_file = path_node, poi_file = path_poi, use_zone_id=True)
net = gd.GRID2DEMAND(node_file = path_node, poi_file = path_poi, use_zone_id=True)

# load network: node and poi
net = gd.load_network()
net.load_network()

# Generate zone dictionary from node dictionary by specifying number of x blocks and y blocks
gd.net2zone(num_x_blocks=10, num_y_blocks=10)
net.net2zone(num_x_blocks=10, num_y_blocks=10)
# net.net2zone(cell_width=10, cell_height=10, unit="km")

# Synchronize geometry info between zone, node and poi
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@

setuptools.setup(
name="grid2demand", # Replace with your own username
version="0.4.3",
version="0.4.4",
author="Xiangyong Luo, Dr.Xuesong(Simon) Zhou",
author_email="[email protected], [email protected]",
description="A tool for generating zone-to-zone travel demand based on grid zones and gravity model",
description="A tool for generating zone-to-zone travel demand based on grid cells or TAZs and gravity model",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/xyluo25/grid2demand",
Expand Down

0 comments on commit 47313d1

Please sign in to comment.