A pilot program was run by a local cable operator in the county to provide low-cost computers and Internet access to low-income families with kids in high school. This showed a marked improvement in school performance for these kids, and the program has brought the company a fair amount of positive publicity and goodwill in the community.
Company officials now want to set up a similar program for community college students. The company provides Internet access to the five community college districts in the county, and officials are aware that the colleges are under a lot of pressure - they are facing funding cuts at the same time as increased demand for enrollment. To try to improve the situation the colleges are turning more and more to distance learning, primarily via the Internet. By providing computers and Internet access, the cable company can enable more low-income students to take advantage of online classes.
This case study uses ArcGIS API for Python to find districts that have the fewest low income families in order to empower these students.
We will use
summarize_within tool to get the number of low-income families within each community district. We will also visualize this using the map widget.
Connect to your ArcGIS Online organization¶
We first establish a connection to our organization which could be an ArcGIS Online organization or an ArcGIS Enterprise. To be able to run the code using ArcGIS API for Python, we will need to provide credentials of a user within an ArcGIS Online organization.
from arcgis.gis import GIS import pandas as pd
gis = GIS('home')
san_diego_data = gis.content.search('title:CommunityCollege_CensusTracts owner:api_data_owner', 'Feature layer', outside_org=True)
[<Item title:"CommunityCollege_CensusTracts" type:Feature Layer Collection owner:api_data_owner>]
from IPython.display import display for item in san_diego_data: display(item)
san_diego_item = san_diego_data # get first item from the list of items
for lyr in san_diego_item.layers: print(lyr.properties.name)
Since the item is a Feature Layer Collection, accessing the layers property will give us a list of Feature Layers.
census_tract_income = san_diego_item.layers
community_college_dist = san_diego_item.layers
m1 = gis.map('San Diego') m1
m2 = gis.map('San Diego') m2