Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add isochrone request and plotting functionality #1

Merged
merged 3 commits into from
Apr 21, 2024
Merged

Conversation

bopo16
Copy link
Owner

@bopo16 bopo16 commented Apr 21, 2024

Using TravelTime SDK for python, created functionality to request a range of isochrones and plot them on a map.
Also refined plotting of roads and boundary polygon, and added a point feature for destination (eg. Central Station).
This is all handled in plot_data.py

Separated downloading functionality into its own file - download_data.py. This may be better suited as a Jupyter notebook, to better separate plotting/loading functions, and would allow the user to selectively run cells depending on whether or not data needs to be downloaded using osmnx or not.

Created a similar version of download_data.py called download_data_small.py, which does the exact same thing but with a smaller network dataset (in this case, Parramatta, NSW). There is almost certainly a better way to do this, but for now it works pretty well for quickly iterating when testing stuff.

Begun work on incorporating the request(s) to TravelTime API as POST requests in a separate requests.py file. This allows a bit more customisation compared to the Python SDK, and allows multiple isochrones to be requested at once. Not that I'm likely to get rate limited, but it does seem like the right path forward. I'm not really in the mood to copy the request for each iteration of travel_time, so it would be great to generate the json with apple/pkl at some point.

The other thing I'd like to do is download the isochrones to disk once I've configured them in a way I like so I can start working on the in GIS software. Could be good to add this if I shove this whole thing into a Jupyter notebook for others to use at some point.

Also messed around with mapping.ipynb, for testing quick stuff and getting parameters, etc.
May remove isochrones.py in future updates, as it's kind of a stub, with plot_data.py superseding it.

Also made minor additions to requirements.txt and .gitignore

@bopo16 bopo16 added the enhancement New feature or request label Apr 21, 2024
@bopo16 bopo16 self-assigned this Apr 21, 2024
@bopo16 bopo16 merged commit 93c67f2 into main Apr 21, 2024
@bopo16 bopo16 deleted the download-load branch April 21, 2024 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant