Skip to content

Latest commit

 

History

History
103 lines (66 loc) · 5.48 KB

README.md

File metadata and controls

103 lines (66 loc) · 5.48 KB
                      TAKING A CLOSER LOOK AT THE NUMBER OF EVICTION NOTICES FILED IN CA-34TH DISTRICT

CA_34 Map - https://dxk613.github.io/evictmap/

Dashboard - https://public.tableau.com/app/profile/daniel1600/viz/Eviction_Notices_In_CA_34th_District/Dashboard2?publish=yes

Project's Objective: Examine how many eviction notices were filed within California's Congressional 34th District out of 39,677 eviction notices in Los Angeles from February to July 2023.

To accomplish my goal, I used these three sources:

  1. LA City Controller's Open Data on Eviction Notices - https://evictions.lacontroller.io/ (accessed data on August 28, 2023)
  2. Zip Data Maps - https://www.zipdatamaps.com/politics/national/district/california-34th-congressional-district
  3. Final CD Shapefiles (ZIP) - https://wedrawthelines.ca.gov/final-maps/

I started by importing the LA City Controller's Eviction Notices data to SQL. The main task of SQL was to match all of the zip codes within LA City Controller's eviction notice table with that of Zip Data Maps.

Once I imported the eviction notices data, I used SQL to create a new table to include all of 32 zip codes in Zip Data Maps.

zipcodetable

From there, I used the Inner Join function with the zip code columns from both Eviction Notices and Zip Data Maps to receive the table that contained these following information within CA-34th District:

  1. Notice Date
  2. Rent Owed
  3. Bedroom Count
  4. Notice Type
  5. Address

innerjoinfunction

  • side note: I converted the date format to make things simple

Once I saved my new queried table that contained the zip codes within CA-34th District, I exported the table to an Excel spreadsheet where I decided to remove the Bedroom Count since there were too many incomplete data to gain valuable insights.

To check if the adddresses were within CA-34th District's boundary, I used the LA Times Congressional Map as a cross-referencing tool with couple of addresses within the Excel spreadsheet.

LAMap https://www.latimes.com/projects/california-congressional-district-map-2021/

After testing couple of the addresses, I observed that there were addresses outside of the CA-34th District's boundary. Therefore, I used Python on Google Colab to ensure that only the addresses within the CA-34th District's boundary remained.

These were my main objectives I wanted to accomplish with Python:

  1. Geocode all of the addresses to gain latitude and longitude for each address
  2. Use the newly populated latitudes and longitudes to ensure only the addresses within CA-34th District remained
  3. Create an interactive map that displays all of the addresses within CA-34th District boundary

In my first step in geocoding the addresses, I went to Google Cloud Console to sign up my account and activate my personal API key specifically for geocoding purposes.

Once I completed that step, I applied the following codes to retrieve my geocoded addresses: image image image image image

Once I downloaded the new Excel file with the populated latitudes and longitudes, I used Google Colab to run the following codes to remove the addresses outside of the CA-34th District's border and keep only the ones within the district:
image image image image

After I removed the addresses that were outside of the district's boundary, only 9,084 addresses remained. For my final step, I created my map using the following codes: image image image

Once I downloaded my map into my local computer, I used my Github account to publish my map.

After that, I used Pivot Table on Excel for the remaining addresses to uncover various trends with the eviction notice data and publish them on Tableau:

image image image image

The end result: an interactive map and a dashboard