-
git clone https://github.com/codereport/city-strides-hacking.git
-
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 theCopy Value
->Copy as Curl
- Paste the curl command to https://curlconverter.com/python/
- Your
cookies
can be found in the generated command
- Add a
parameters.yaml
. Example below.
city: bangkok
map_style: 'open-street-map'
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
- You can now run:
./download_node_csv.py cookie.json
to scrape all the nodes tonodes.csv
./plot_nodes.py
to view all of the nodes without a 1000 node limit
- Compile the Rust code:
cargo build
, this creates executable./city_strides_route_generator
- Download the file
data/bangkok.json
anddata/bangkok_all.json
by querying https://overpass-api.de with the queries of overpass_queries.md (assuming you set bangkok inparameters.yaml
) - Call
././city_strides_route_generator