<jupyter_start><jupyter_text>Using Selection by Geography<jupyter_code>import transportation_tutorials as tt
import geopandas as gpd
import pandas as pd
import matplotlib.pyplot as plt
import osmnx as ox
from shapely.geometry import Polygon<jupyter_output><empty_output><jupyter_text>Questions Consider a study area that mostly covers Deerfield Beach in Florida. The study area can be defined by a polygon bounded by the following coordinates (given in `epsg:4326`):<jupyter_code>Polygon([
    (-80.170862, 26.328588),
    (-80.170158, 26.273494),
    (-80.113007, 26.274882),
    (-80.104592, 26.293503),
    (-80.072967, 26.293790),
    (-80.070111, 26.329349)
])<jupyter_output><empty_output><jupyter_text>1. Use OSMnx to download the boundaries for Deerfield Beach, and generate   an image that compares the city to the indicated study area polygon. Are    there any areas in the city of Deerfield Beach that are outside the   designated studay area, and if so, is this concerning? *(Hint: use the   `add_basemap` function from the `transportation_tutorials.mapping` package   to add context to your map.)*2. How many MAZs are there that are located completely inside the study area?    Generate a static map of only these MAZ's.  *(Hint: Please make sure to use    appropriate Coordinate Reference Systems (CRS) in your analysis.)*3. How many MAZs are at least partially inside the study area?  Generate a static map    of these MAZ's, including the full area of any MAZ that is at least partially    contained in the study area.  Data To answer the questions, use the following file:<jupyter_code>maz = gpd.read_file(tt.data('SERPM8-MAZSHAPE'))
maz.plot(figsize = (10,10));
maz.head()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.07965116279069767, 'fraction_numerical': 0.06279069767441861, 'mean_word_length': 4.7558528428093645, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '627111', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 600, 'n_tokens_neox': 533, 'n_words': 212, 'path': 'course-content/exercises/exercise-geo-selection.ipynb', 'repo_name': 'chrisc20042001/python-for-transportation-modeling', 'size': '1720'}