Class Meeting 13A#
Today we will be working on Python code for geographic maps.
Links for today#
Mapping
OpenStreetMap (OSM) and an explanation of OSM.
Python package OSMnx for accessing OSM data.
Python package NetworkX for representing and manipulating graphs.
Python package GeoPandas that extends ideas from Pandas to geospatial data.
In particular, we will be working with the
GeoDataFrame
data structure (which extends Pandas’DataFrame
to geospatial data) andGeoDataFrame.explore
for creating interactive map visualizations.
Logistics#
Installing packages#
You will probably need to install some package(s) for today’s class:
conda install osmnx
(which should also installnetworkx
)
Getting the class activity starter code#
You have two choices for how to work with the class activity code:
If you want to keep a repository on GitHub of my personal changes to the code:
Make a copy of the class activity repository.
Clone your personal copy to your laptop.
If you are happy to keep your personal changes only on your laptop: You can directly clone the class activity repository.
Here is the Template repository for class activity 13A. You have only read access to the template repository, so you will not be able to push any changes back to it.
How to Copy the Class Activity Repository#
If you make a copy of the template repository on GitHub, then you can push your changes to the code back up to your copy on GitHub any time you want. To copy the template repository, follow the instructions at Creating a repository from a template.
Clone the appropriate repository#
Follow the standard Git procedure to clone the appropriate repository onto your laptop:
git clone <URL-of-repository>
Note that you can work on your local repository on your laptop (commit, branch, switch, restore, etc.) whether you cloned the template repository or your own copy. But you can only push changes back up to GitHub if you made your own copy on GitHub of the template repository.