<jupyter_start><jupyter_text>Converting Feature Classes to GeoDataframes Using Geopandas* http://geopandas.org/io.html*Importing feature classes using GeoPandas is easy with the `read_file()` command. What's worth noting is that GeoPandas actually uses the Python [Fiona](https://fiona.readthedocs.io/en/latest/manual.html) package. Fiona leverages a collection of drivers that provide access to a number of geospatial data formats. Geopandas simplifies the usage of Fiona commands, making import and export of geodataframes easier to use.*  Reading a shapefile into a GeoDataFrame* Read in `./data/12Digit_HUC_Subwatersheds.shp` into a geodataframe<jupyter_code>#Import geopandas
import geopandas as gpd
#Create a variable pointing to the shapefile. 
theShapefile = './data/12Digit_HUC_Subwatersheds.shp'
#Read the shapefile directly into a geodataframe
gdf_HUC12 = gpd.read_file(theShapefile)<jupyter_output><empty_output><jupyter_text>Exploring the geodataframe<jupyter_code>#View the first 5 rows
gdf_HUC12.head()
#View info for the dataframe
gdf_HUC12.info()
#Display a specific record
gdf_HUC12.loc[10]
#Display a specific geometry
gdf_HUC12.loc[10,'geometry']
#Display as simple polygon FC
gdf_HUC12.plot();
#Display acres as continuous values
gdf_HUC12.plot('ACRES',cmap='GnBu');
#Display as chorpleth map using HUC8 attribute
gdf_HUC12.plot('HUC_8',cmap='Set2');<jupyter_output><empty_output><jupyter_text>--- Reading GeoJSON data* Read in the `./data/NC_NPDES.json` data ([Source](https://services.nconemap.gov/secure/rest/services/NC1Map_Environment/FeatureServer/4/query?where=OBJECTID>0&outFields=*&f=geojson) - in JSON format) into a geodataframe<jupyter_code>#Read the data in
gdf_NPDES = gpd.read_file('./data/NC_NPDES.json')<jupyter_output><empty_output><jupyter_text>Explore as above, then plot on a given attribute<jupyter_code>#Plot the feature class<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.0968421052631579, 'fraction_numerical': 0.01631578947368421, 'mean_word_length': 7.089361702127659, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 18, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '377325', 'license': 'CNRI-Python', 'n_tokens_mistral': 700, 'n_tokens_neox': 656, 'n_words': 171, 'path': 'complete/02a-FeatureClass-to-GeoDataFrame-complete.ipynb', 'repo_name': 'ENV859/SpatialDataFrames', 'size': '1900'}