Change Log
- 08-21-2020: Baseline Version v0.1
This project focuses on the asset map item for the Code for America (CFA) National Day of Civic Hacking (NDocH) event; it consists of this notebook to visualize various assets within the Sacramento area. The data is sourced from various open data portals and provides the deliverables listed below.
Deliverables
- Asset Maps: Shared as HTML files in maps folder and within notebook
- Notebook: Contains all code and documentation needed for visualization
- Documentation: Notebook and README contains full write-up and results
Note: Data processing and maps are created using Jupyter Notebook due to its ability to visualize results effectively and efficiently. Listed below are installation instructions and more about Jupyter and Python.
The event NDoCH instructions are shown below and specify that open data sources should be used to visualize resources available to the Sacramento community. This notebook is intended as starting point to visualize such data for further development.
Asset mapping is an integral part of empowered community building that is based on understanding the strengths and needs of diverse communities. First, use publicly available information about your locale to give a sense of the landscape and demographics. Next, research the location and availability of government programs (e.g. county health and human services offices), community based organizations (like resource centers, food banks, and legal aid clinics) or other resources that are vital to your community. Visually documenting the landscape can help identify what might make your community more equitable and accessible to all who live there.
This notebook starts with a tutorial using Python mapping tools as a prototype, then develops asset maps for the Sacramento area. Open data sources are listed below and will be added to with additional development.
One desired outcome for this project is to develop a better understanding of publicly available data, appropriate tools and spatial analysis technique in develop the asset maps. As a result, project methodology, assumptions and results are documented in this readme.
Key project assumptions are listed below and validated through analysis and visualization of publicly available datasets. They serve as an outline for guide development of the notebook, analysis and visualizations.
Assumptions
- Publicly available data via open data portals are typically good quality and therefore suitable for use in generating equity/asset maps
- Data science tools such as Jupyter, Python and the Folium plotting package are appropriate tools to analyze, communicate and share results
- All selected tools are open-source software, and all analysis is repeatable, documented and reproducible to improve accessibility
Asset maps are summarized below and organized into separate modules within the notebook. Each map is available as a separate HTML file in the maps folder.
Data Processing Steps
- Import raw data, then process it with helper functions as needed
- Lat/long coordinate CSV and GeoJSON formats used for analysis
- GeoJSON data was converted to JSON for plotting within Folium
- Geospatial data was plotted with helper functions
- Complete map is output within notebook and as separate file
Map Legend
- SFPD Crime Reports, 2003-2018 (Red Point)
Results
- Map served to validate Jupyter, Python and Folium for visualizations
- Tools were appropriate, and functions developed for use in notebook
- Cluster markers and map options implemented for additional use
SF Open Data
Tutorials
- Folium Tutorial: SFPD Crime Data
- Folium Example: Cluster Markers
- Folium Tutorial: Cluster Markers (JPYTR)
- Folium Tutorial: Shapefile Data (Medium)
Map Legend
- SACOG LIHM Communities, 2016 (Blue Polygon)
- CA Schools: Sac County, 2019-20 (Red Point)
- CA Schools: Amador County, 2019-20 (Green Point)
- CA Schools: Placer County, 2019-20 (Blue Point)
- CA Schools: Yolo County, 2019-20 (Orange Point)
- CA Schools: Yuba County, 2019-20 (Purple Point)
Results
- Map starts with SACOG Low Income High Minority (LIHM) Communities
- Sacramento area schools were filtered from CA data and added to map
- Map shows good access to schools within LIHM communities
- LIHM communities in the north and southeast may have less school access
Note: Analysis only evaluates proximity and not school quality; also, additional CA Geoportal data are listed below for future analysis.
SACOG Data
CA Geoportal Data
- CA Geoportal: Open Datasets
- CA School Locations (2019-20)
- CA Healthcare Shortage (Primary Care)
- CA Healthcare Shortage (Mental Health)
- CA Healthcare Shortage (Dental Care)
Map Legend
- SACOG LIHM Communities, 2016 (Orange Polygon)
- City of Sacramento Bike Facilities, 2018 (Green Line)
- City of Sacramento Bike Opportunity Areas, 2016 (Purple Polygon)
Results
- Map starts with SACOG Low Income High Minority (LIHM) Communities
- City of Sacramento bike facility data was added to map
- Map shows good access in downtown and expanding in opportunity areas
- LIHM communities outside of downtown may have less access to bike facilities
SACOG Data
City of Sacramento Data
Map Legend
- SACOG LIHM Communities, 2016 (Orange Polygon)
- Sac Region High Transit Frequency Areas, 2020 (Purple Polygon)
- Sac Region High Quality Transit, 2017 (Green Line)
Results
- Map starts with SACOG Low Income High Minority (LIHM) Communities
- SACOG transportation quality data added to map
- Map shows good access in downtown and along major corridors
- LIHM communities outside of downtown may have less access to transit
SACOG Data
- Sac Region LIHM Communities (2016)
- Sac Region High Transit Frequency Areas (2020)
- Sac Region High Quality Transit (2017)
Map Legend
- SACOG LIHM Communities, 2016 (Orange Polygon)
- SACOG Air Pollution PM 2.5 Planning Areas, 2018 (Purple Polygon)
- SACOG CalEnviroScreen 3.0, Top 25% Tracts (Green Line)
Results
- Map starts with SACOG Low Income High Minority (LIHM) Communities
- SACOG pollution level data was added to map
- Some LIHM communities are within CalEnviroScreen areas
- Most of Sacramento area is within the PM 2.5 pollution planning area
- Additional analysis needed to evaluate CalEnviroScreen overlap
SACOG Data
- Sac Region LIHM Communities (2016)
- SACOG Air Pollution PM 2.5 Planning Areas, 2018
- SACOG CalEnviroScreen 3.0, Top 25% Tracts
- Download and install Jupyter Notebook from their website
- Verify that Jupyter Notebook was installed and visible from Windows Start menu
- Start Jupyter Notebook; it will start CMD shell and load in the web browser
- Save this notebook and CSV data to your "Documents" folder and navigate to it from the Notebook start page
- Open this notebook from the start page; file and cells should be viewable
This notebook will require some basic understanding of the Python programming language, Jupyter platform and data analysis concepts. It is based on this tutorial and Github Repo.
Jupyter is a powerful collaborative tool which is open-source and light-weight. It provides all the tools necessary to run data analysis, visualization, statistics and data science out of the box. In addition, it has gain acceptance from industry and academia for collaborating on projects and publishing work.
Jupyter is a combination of text and code with the programming run-time built into the platform so there is no need to install additional software. The text is in the markdown file format (similar to HTML), and code in several languages. It is organized by cells which can consist of either text or code; placed together, they can be sent as a single document to share/publish work.
Notebooks are organized by cells, which mainly consist of text (in markdown) and code (Python). It operations like a hybrid between MS Word and Excel file; whereas the entire file is like a document, the cells operate like a spreadsheet. For getting started, feel free to scroll down each cell and navigate around the cells for a quick tour. Here is a breakdown of how to view/edit cells:
Navigation
- Each cell may be edited by hitting ENTER; toggle between cells using the arrow keys or mouse/scroller
- When editing a cell, be sure to select "markdown" for text or "code" before writing into it
- Each cell can be run by hitting CTRL + ENTER or the "run" button form the menu bar
- Output from each cell will appear below; if an error occurs, please read and try to debug it(!)
- File can be saved by hitting CTRL + "s" or file/save from the pulldown menu above
Notes
- This notebook will require some Python programming
- It is widely used and taught in high school and AP Computer Science courses
- Jupyter supports many other languages, including R, Scala and Julia
- Python is the most popular of them and can be used for other tasks, primarily data science and web applications
Jupyter
- Intro Guide (DataQuest)
- Intro Guide (DataCamp)
- Notebook Intro (Medium)
- Data Science Tutorial (Jupyter)
Python
Markdown