Add isochrone request and plotting functionality #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 usingosmnx
or not.Created a similar version of
download_data.py
calleddownload_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 oftravel_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, withplot_data.py
superseding it.Also made minor additions to
requirements.txt
and.gitignore