{
  "name": "us-measles-cases",
  "title": "US Measles Cases (CDC)",
  "description": "Confirmed measles cases in the United States as reported by the Centers for Disease Control and Prevention (CDC): cases per year since 1962, cases per week of rash onset since 2022, and cases among US residents by state or jurisdiction for the last three years. The latest two years are provisional and the current year is year to date. Updated weekly from CDC's Measles Cases and Outbreaks page.",
  "status": "monitored",
  "homepage": "https://www.cdc.gov/measles/data-research/index.html",
  "keywords": ["measles", "public health", "infectious disease", "vaccination", "CDC", "United States"],
  "licenses": [
    {
      "name": "US-PD",
      "title": "Public domain: work of the US federal government (17 U.S.C. 105). CDC: most information on its websites is in the public domain and may be freely used or reproduced; attribute CDC.",
      "path": "https://www.cdc.gov/other/agencymaterials.html"
    }
  ],
  "sources": [
    {
      "title": "CDC, Measles Cases and Outbreaks",
      "path": "https://www.cdc.gov/measles/data-research/index.html"
    },
    {
      "title": "CDC data file: MeaslesCasesHistory.json (annual cases, 1962 on)",
      "path": "https://www.cdc.gov/wcms/vizdata/measles/MeaslesCasesHistory.json"
    },
    {
      "title": "CDC data file: MeaslesCasesWeekly.json (weekly cases by rash onset, 2022 on)",
      "path": "https://www.cdc.gov/wcms/vizdata/measles/MeaslesCasesWeekly.json"
    },
    {
      "title": "CDC data file: MeaslesCasesMap.json (cases by jurisdiction)",
      "path": "https://www.cdc.gov/wcms/vizdata/measles/MeaslesCasesMap.json"
    }
  ],
  "upkeep": {
    "mode": "living",
    "refresh": "weekly",
    "workflow": ".github/workflows/update.yml"
  },
  "resources": [
    {
      "name": "annual-cases",
      "path": "data/annual-cases.csv",
      "title": "Confirmed measles cases per year, 1962 to date",
      "format": "csv",
      "mediatype": "text/csv",
      "encoding": "utf-8",
      "schema": {
        "fields": [
          { "name": "year", "type": "year", "description": "Calendar year, assigned by CDC from the MMWR week of rash onset." },
          { "name": "cases", "type": "integer", "description": "Confirmed measles cases reported to CDC, including cases in international visitors. The current year is year to date." },
          { "name": "provisional", "type": "boolean", "description": "true for the latest two years, which CDC labels preliminary and subject to change." }
        ],
        "primaryKey": ["year"]
      }
    },
    {
      "name": "weekly-cases",
      "path": "data/weekly-cases.csv",
      "title": "Confirmed measles cases per week of rash onset, 2022 to date",
      "format": "csv",
      "mediatype": "text/csv",
      "encoding": "utf-8",
      "schema": {
        "fields": [
          { "name": "week_start", "type": "date", "description": "First day (Sunday) of the MMWR week of rash onset." },
          { "name": "week_end", "type": "date", "description": "Last day (Saturday) of the MMWR week." },
          { "name": "mmwr_year", "type": "integer", "description": "MMWR year: the calendar year containing the week's Wednesday." },
          { "name": "mmwr_week", "type": "integer", "description": "MMWR week number within mmwr_year, counted from 1 (derived)." },
          { "name": "cases", "type": "integer", "description": "Confirmed cases with rash onset in this week. Recent weeks are incomplete and rise as reports arrive." },
          { "name": "cumulative", "type": "integer", "description": "Running total of cases in mmwr_year up to and including this week (derived)." }
        ],
        "primaryKey": ["week_start"]
      }
    },
    {
      "name": "state-cases",
      "path": "data/state-cases.csv",
      "title": "Confirmed measles cases among US residents by jurisdiction",
      "format": "csv",
      "mediatype": "text/csv",
      "encoding": "utf-8",
      "schema": {
        "fields": [
          { "name": "jurisdiction", "type": "string", "description": "Reporting jurisdiction: the 50 states, the District of Columbia, and New York City (counted separately from New York State)." },
          { "name": "year", "type": "integer", "description": "Year of rash onset." },
          { "name": "cases", "type": "integer", "description": "Confirmed cases among US residents reported by this jurisdiction. Excludes international visitors, so totals are slightly below the national count." }
        ],
        "primaryKey": ["jurisdiction", "year"]
      }
    }
  ],
  "views": [
    {
      "name": "annual-cases-chart",
      "title": "Confirmed US measles cases per year (log scale)",
      "resources": ["annual-cases"],
      "specType": "vega-lite",
      "spec": {
        "width": "container",
        "height": 320,
        "mark": { "type": "line", "point": true },
        "encoding": {
          "x": { "field": "year", "type": "quantitative", "axis": { "format": "d", "title": "Year" } },
          "y": { "field": "cases", "type": "quantitative", "scale": { "type": "log" }, "axis": { "title": "Confirmed cases (log scale)" } },
          "tooltip": [{ "field": "year", "type": "quantitative", "format": "d" }, { "field": "cases", "type": "quantitative", "format": "," }, { "field": "provisional", "type": "nominal" }]
        }
      }
    }
  ]
}
