Create one Quarto file for all of Lab 4.
Make sure your final file is carefully formatted, so that each analysis is clear and concise. Be sure your knitted .html file shows all your source code, including your function definitions.
One of the Open-Notify APIs provides predictions of pass times for a given location when given the corresponding latitude, longitude, and altitude are given:
You can find the latitudes and longitudes for the U.S. state capitals at this site.
- Use the API to get the next 3 predicted pass times for all of the U.S. state capitals. Organize all of this information into a nice data frame (or data frame-like object) that will be easy to use for mapping.
-
Map the U.S. state capitals using
leaflet
-
Find an image of your choosing to use as the marker icon, that's relevant for these data.
-
The hover-over information for each marker should include the name of the state capital and the soonest predicted pass time. The click information should include the name of the state capital and all three predicted pass times. Make sure these times are in an easy-to-read format.
Check out this video for adding polylines to a leaflet
map.
- Overlay lines on your map that connect the U.S. state capitals in order of pass times (essentially east to west) so that we can see the expected pass order.