Skip to content

codereport/city-strides-hacking

Repository files navigation

Node Preview

image

Route Generation

7xh4u7

How to Use the Python Scripts

  1. git clone https://github.com/codereport/city-strides-hacking.git

  2. Add a file named cookies.json with the following contents:

{
    "_citystrides_session": "...",
    "remember_user_token": "..."
}
  • Generate the above by doing the following:
    • Go to www.citystrides.com (on Firefox)
    • Ctrl + Shift + I to open the Web Developer Tools
    • Choose a city on CityStrides, and click the 'Show Nodes" button (need to subscride for access to nodes)
    • Copy the GET command using the Copy Value -> Copy as Curl
    • Paste the curl command to https://curlconverter.com/python/
    • Your cookies can be found in the generated command
  1. Add a parameters.yaml. Example below.
city: bangkok
max_distance: 25.0
steps: 9
hot_spots: true
hot_spot_n: 2
hot_spot_delta: 0.05
heat_map_max_length: 1
heat_map_exclude_csnodes: false
start_node: 1692740969
  1. You can now run:
    • ./download_node_csv.py cookie.json to scrape all the nodes to nodes.csv
    • ./plot_nodes.py to view all of the nodes without a 1000 node limit

Useful Links

About

Python scripts that build optimal routes for node collection

Resources

License

Stars

Watchers

Forks

Languages