Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create load_CDC_EJI() function #77

Open
2 tasks
ericnost opened this issue Jul 19, 2024 · 0 comments
Open
2 tasks

create load_CDC_EJI() function #77

ericnost opened this issue Jul 19, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@ericnost
Copy link
Member

Loads CDC Environmental Justice Index scores for an area, produces a dropdwon widget that enables selecting between different EJI scores, and returns a map and/or geodataframe.

  • Download a copy of the EJI geodatabase and upload somewhere (where?)
  • Write load_CDC_EJI()
def load_CDC_EJI(area, area_type):
  import geopandas
  import folium
  from ECHO_modules.get_data import get_spatial_data
  from ECHO_modules.geographies import spatial_tables
  from ECHO_modules.utilities import choropleth
  
  this_area, state = get_spatial_data(region_type=area_type, states=[state_widget.value], spatial_tables=spatial_tables, region_filter=area.title()) # Get shape
  
  #unzip and load US.gdb from CDC

  features = geopandas.read_file("US.gdb", mask=this_area)  Note: Mask doesn't work perfectly, may still want to do attribute filter below
  
  # interactive widget selection here...

  map = choropleth(features, "EP_DIABETES", key_id="GEOID")

  return map, features

See watershed notebook for an example of how to do interactive widget selection:

class EJScreen:

@ericnost ericnost added the enhancement New feature or request label Jul 19, 2024
@ericnost ericnost self-assigned this Jul 19, 2024
@ericnost ericnost moved this to Todo in ECHO_modules Jul 19, 2024
@ericnost ericnost added this to the v0.2.0 milestone Jul 19, 2024
@shansen5 shansen5 self-assigned this Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

2 participants