nakas commited on
Commit
8790ece
·
verified ·
1 Parent(s): 3ec9aec

Update air_quality_map.py

Browse files
Files changed (1) hide show
  1. air_quality_map.py +11 -0
air_quality_map.py CHANGED
@@ -319,6 +319,17 @@ class AirQualityApp:
319
 
320
  def mock_get_monitors(self, state_code, county_code=None, parameter_code=None):
321
  """Mock function to return sample data for development"""
 
 
 
 
 
 
 
 
 
 
 
322
  # Sample data for California
323
  if state_code == "CA":
324
  monitors = [
 
319
 
320
  def mock_get_monitors(self, state_code, county_code=None, parameter_code=None):
321
  """Mock function to return sample data for development"""
322
+ # Get state code in proper format
323
+ if len(state_code) == 2:
324
+ # Convert 2-letter state code to numeric format for mock data
325
+ state_code_mapping = {
326
+ "CA": "06",
327
+ "NY": "36",
328
+ "TX": "48"
329
+ }
330
+ numeric_state_code = state_code_mapping.get(state_code, "01") # Default to "01" if not found
331
+ else:
332
+ numeric_state_code = state_code
333
  # Sample data for California
334
  if state_code == "CA":
335
  monitors = [