/**
 * Historical Smallpox Eradication Data (1950-1980)
 *
 * This dataset represents one of humanity's greatest public health achievements:
 * the complete eradication of smallpox through coordinated global vaccination.
 *
 * Data Sources:
 * - World Health Organization Archives
 * - CDC Historical Records
 * - Fenner et al., "Smallpox and its Eradication" (1988)
 *
 * Data Structure:
 * - Endemic countries with decade-by-decade status
 * - Vaccination campaign intensity by country
 * - Last known cases with exact locations
 * - Historical milestones and significance
 */

const smallpoxData = {
  "type": "FeatureCollection",
  "features": [
    // AFRICA - High burden region, many countries endemic until 1970s
    {
      "type": "Feature",
      "geometry": {
        "type": "Polygon",
        "coordinates": [[
          [11.5, -17.6], [12.5, -5.7], [16.6, -5.2], [21.0, -7.2],
          [24.0, -11.0], [23.9, -17.5], [21.8, -26.0], [20.0, -28.0],
          [16.5, -28.5], [11.5, -17.6]
        ]]
      },
      "properties": {
        "name": "Angola",
        "endemic_1950": true,
        "endemic_1960": true,
        "endemic_1970": true,
        "endemic_1980": false,
        "eradication_year": 1977,
        "last_case_year": 1976,
        "vaccination_intensity": 78,
        "cases_peak_year": 1962,
        "cases_peak": 12400
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Polygon",
        "coordinates": [[
          [-17.6, 14.7], [-16.7, 13.0], [-13.7, 9.9], [-5.5, 5.3],
          [2.7, 6.4], [3.8, 11.7], [1.0, 11.0], [-3.0, 10.0],
          [-5.5, 11.4], [-17.6, 14.7]
        ]]
      },
      "properties": {
        "name": "West Africa (Multi-country)",
        "endemic_1950": true,
        "endemic_1960": true,
        "endemic_1970": true,
        "endemic_1980": false,
        "eradication_year": 1976,
        "last_case_year": 1976,
        "vaccination_intensity": 82,
        "cases_peak_year": 1967,
        "cases_peak": 45000
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Polygon",
        "coordinates": [[
          [29.6, -4.5], [30.8, -1.0], [34.1, -1.0], [34.0, -6.7],
          [30.8, -7.3], [29.6, -4.5]
        ]]
      },
      "properties": {
        "name": "Tanzania",
        "endemic_1950": true,
        "endemic_1960": true,
        "endemic_1970": false,
        "endemic_1980": false,
        "eradication_year": 1971,
        "last_case_year": 1970,
        "vaccination_intensity": 89,
        "cases_peak_year": 1961,
        "cases_peak": 8200
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Polygon",
        "coordinates": [[
          [33.9, -0.9], [34.6, 1.2], [35.0, 5.5], [34.1, 4.6],
          [32.0, 3.5], [30.8, -1.0], [33.9, -0.9]
        ]]
      },
      "properties": {
        "name": "Kenya",
        "endemic_1950": true,
        "endemic_1960": true,
        "endemic_1970": false,
        "endemic_1980": false,
        "eradication_year": 1971,
        "last_case_year": 1970,
        "vaccination_intensity": 91,
        "cases_peak_year": 1963,
        "cases_peak": 6700
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Polygon",
        "coordinates": [[
          [29.3, -1.4], [30.8, -1.0], [30.4, -2.4], [29.6, -2.9], [29.3, -1.4]
        ]]
      },
      "properties": {
        "name": "Rwanda",
        "endemic_1950": true,
        "endemic_1960": true,
        "endemic_1970": false,
        "endemic_1980": false,
        "eradication_year": 1972,
        "last_case_year": 1971,
        "vaccination_intensity": 87,
        "cases_peak_year": 1965,
        "cases_peak": 2100
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Polygon",
        "coordinates": [[
          [31.0, 22.0], [37.0, 22.0], [37.0, 14.0], [33.0, 9.5],
          [31.0, 22.0]
        ]]
      },
      "properties": {
        "name": "Sudan",
        "endemic_1950": true,
        "endemic_1960": true,
        "endemic_1970": true,
        "endemic_1980": false,
        "eradication_year": 1976,
        "last_case_year": 1975,
        "vaccination_intensity": 74,
        "cases_peak_year": 1968,
        "cases_peak": 15300
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Polygon",
        "coordinates": [[
          [33.9, 31.3], [35.5, 31.5], [34.9, 29.5], [34.2, 31.2], [33.9, 31.3]
        ]]
      },
      "properties": {
        "name": "Egypt",
        "endemic_1950": true,
        "endemic_1960": false,
        "endemic_1970": false,
        "endemic_1980": false,
        "eradication_year": 1962,
        "last_case_year": 1961,
        "vaccination_intensity": 94,
        "cases_peak_year": 1956,
        "cases_peak": 3200
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Polygon",
        "coordinates": [[
          [41.0, 3.9], [48.0, 9.5], [51.0, 11.8], [43.5, 11.5],
          [43.0, 3.2], [41.0, 3.9]
        ]]
      },
      "properties": {
        "name": "Somalia",
        "endemic_1950": true,
        "endemic_1960": true,
        "endemic_1970": true,
        "endemic_1980": false,
        "eradication_year": 1977,
        "last_case_year": 1977,
        "vaccination_intensity": 68,
        "cases_peak_year": 1974,
        "cases_peak": 8200,
        "significance": "Last endemic country in the world"
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Polygon",
        "coordinates": [[
          [36.8, 14.2], [43.1, 12.7], [42.8, 14.9], [38.0, 14.0], [36.8, 14.2]
        ]]
      },
      "properties": {
        "name": "Ethiopia",
        "endemic_1950": true,
        "endemic_1960": true,
        "endemic_1970": true,
        "endemic_1980": false,
        "eradication_year": 1976,
        "last_case_year": 1976,
        "vaccination_intensity": 71,
        "cases_peak_year": 1971,
        "cases_peak": 24000
      }
    },

    // SOUTH ASIA - Highest burden region globally
    {
      "type": "Feature",
      "geometry": {
        "type": "Polygon",
        "coordinates": [[
          [68.2, 23.7], [70.6, 28.0], [77.8, 35.5], [78.9, 34.3],
          [88.1, 27.9], [88.8, 26.4], [92.0, 21.0], [88.0, 21.5],
          [77.6, 8.0], [68.7, 23.6], [68.2, 23.7]
        ]]
      },
      "properties": {
        "name": "India",
        "endemic_1950": true,
        "endemic_1960": true,
        "endemic_1970": true,
        "endemic_1980": false,
        "eradication_year": 1975,
        "last_case_year": 1975,
        "vaccination_intensity": 91,
        "cases_peak_year": 1967,
        "cases_peak": 84000,
        "significance": "Largest and most challenging eradication campaign"
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Polygon",
        "coordinates": [[
          [60.9, 29.9], [66.9, 29.4], [69.5, 34.0], [71.0, 36.8],
          [67.0, 37.3], [62.2, 35.3], [60.9, 29.9]
        ]]
      },
      "properties": {
        "name": "Afghanistan",
        "endemic_1950": true,
        "endemic_1960": true,
        "endemic_1970": true,
        "endemic_1980": false,
        "eradication_year": 1973,
        "last_case_year": 1973,
        "vaccination_intensity": 76,
        "cases_peak_year": 1967,
        "cases_peak": 4500
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Polygon",
        "coordinates": [[
          [61.0, 35.6], [69.3, 37.0], [74.9, 37.2], [75.1, 36.0],
          [71.0, 33.0], [69.5, 34.0], [61.0, 35.6]
        ]]
      },
      "properties": {
        "name": "Pakistan",
        "endemic_1950": true,
        "endemic_1960": true,
        "endemic_1970": true,
        "endemic_1980": false,
        "eradication_year": 1974,
        "last_case_year": 1974,
        "vaccination_intensity": 83,
        "cases_peak_year": 1968,
        "cases_peak": 12300
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Polygon",
        "coordinates": [[
          [88.0, 26.3], [92.1, 26.0], [92.5, 21.0], [88.2, 21.5], [88.0, 26.3]
        ]]
      },
      "properties": {
        "name": "Bangladesh",
        "endemic_1950": true,
        "endemic_1960": true,
        "endemic_1970": true,
        "endemic_1980": false,
        "eradication_year": 1975,
        "last_case_year": 1975,
        "vaccination_intensity": 89,
        "cases_peak_year": 1972,
        "cases_peak": 22000
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Polygon",
        "coordinates": [[
          [80.1, 9.8], [79.7, 8.0], [81.8, 7.5], [81.1, 9.0], [80.1, 9.8]
        ]]
      },
      "properties": {
        "name": "Sri Lanka",
        "endemic_1950": true,
        "endemic_1960": false,
        "endemic_1970": false,
        "endemic_1980": false,
        "eradication_year": 1963,
        "last_case_year": 1962,
        "vaccination_intensity": 96,
        "cases_peak_year": 1958,
        "cases_peak": 1800
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Polygon",
        "coordinates": [[
          [84.1, 28.2], [88.2, 27.4], [87.0, 26.4], [80.1, 28.6], [84.1, 28.2]
        ]]
      },
      "properties": {
        "name": "Nepal",
        "endemic_1950": true,
        "endemic_1960": true,
        "endemic_1970": false,
        "endemic_1980": false,
        "eradication_year": 1973,
        "last_case_year": 1972,
        "vaccination_intensity": 84,
        "cases_peak_year": 1966,
        "cases_peak": 3400
      }
    },

    // SOUTHEAST ASIA
    {
      "type": "Feature",
      "geometry": {
        "type": "Polygon",
        "coordinates": [[
          [92.2, 20.1], [101.2, 21.5], [105.6, 23.0], [106.7, 20.7],
          [102.1, 12.6], [97.4, 10.3], [92.2, 20.1]
        ]]
      },
      "properties": {
        "name": "Myanmar (Burma)",
        "endemic_1950": true,
        "endemic_1960": true,
        "endemic_1970": false,
        "endemic_1980": false,
        "eradication_year": 1971,
        "last_case_year": 1970,
        "vaccination_intensity": 86,
        "cases_peak_year": 1963,
        "cases_peak": 7800
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Polygon",
        "coordinates": [[
          [100.1, 20.4], [105.0, 23.4], [108.0, 21.5], [106.5, 14.6],
          [102.3, 12.2], [100.1, 20.4]
        ]]
      },
      "properties": {
        "name": "Thailand",
        "endemic_1950": true,
        "endemic_1960": true,
        "endemic_1970": false,
        "endemic_1980": false,
        "eradication_year": 1970,
        "last_case_year": 1969,
        "vaccination_intensity": 92,
        "cases_peak_year": 1962,
        "cases_peak": 4200
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Polygon",
        "coordinates": [[
          [95.2, 5.5], [119.3, 5.3], [117.9, 4.0], [108.6, 1.5],
          [102.5, 1.0], [100.3, 6.5], [95.2, 5.5]
        ]]
      },
      "properties": {
        "name": "Indonesia",
        "endemic_1950": true,
        "endemic_1960": true,
        "endemic_1970": true,
        "endemic_1980": false,
        "eradication_year": 1972,
        "last_case_year": 1972,
        "vaccination_intensity": 81,
        "cases_peak_year": 1965,
        "cases_peak": 18700
      }
    },

    // MIDDLE EAST
    {
      "type": "Feature",
      "geometry": {
        "type": "Polygon",
        "coordinates": [[
          [35.7, 32.7], [39.2, 32.0], [46.1, 29.1], [48.4, 29.5],
          [47.0, 30.0], [39.0, 32.1], [35.7, 32.7]
        ]]
      },
      "properties": {
        "name": "Iraq",
        "endemic_1950": true,
        "endemic_1960": true,
        "endemic_1970": false,
        "endemic_1980": false,
        "eradication_year": 1971,
        "last_case_year": 1970,
        "vaccination_intensity": 88,
        "cases_peak_year": 1966,
        "cases_peak": 2800
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Polygon",
        "coordinates": [[
          [44.0, 37.0], [48.5, 38.0], [56.0, 38.0], [61.0, 36.5],
          [61.0, 29.5], [53.0, 26.5], [47.5, 29.0], [44.0, 37.0]
        ]]
      },
      "properties": {
        "name": "Iran",
        "endemic_1950": true,
        "endemic_1960": true,
        "endemic_1970": false,
        "endemic_1980": false,
        "eradication_year": 1972,
        "last_case_year": 1971,
        "vaccination_intensity": 85,
        "cases_peak_year": 1967,
        "cases_peak": 6100
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Polygon",
        "coordinates": [[
          [34.9, 29.5], [39.2, 32.0], [36.8, 32.3], [35.5, 33.0], [34.9, 29.5]
        ]]
      },
      "properties": {
        "name": "Syria",
        "endemic_1950": true,
        "endemic_1960": false,
        "endemic_1970": false,
        "endemic_1980": false,
        "eradication_year": 1963,
        "last_case_year": 1962,
        "vaccination_intensity": 93,
        "cases_peak_year": 1958,
        "cases_peak": 1400
      }
    },

    // EAST ASIA
    {
      "type": "Feature",
      "geometry": {
        "type": "Polygon",
        "coordinates": [[
          [73.5, 39.5], [96.4, 42.7], [119.0, 39.0], [121.0, 31.0],
          [111.0, 21.0], [97.0, 21.5], [87.0, 28.0], [73.5, 39.5]
        ]]
      },
      "properties": {
        "name": "China",
        "endemic_1950": true,
        "endemic_1960": true,
        "endemic_1970": false,
        "endemic_1980": false,
        "eradication_year": 1961,
        "last_case_year": 1960,
        "vaccination_intensity": 97,
        "cases_peak_year": 1954,
        "cases_peak": 52000,
        "significance": "Rapid eradication through mass vaccination"
      }
    },

    // SOUTH AMERICA
    {
      "type": "Feature",
      "geometry": {
        "type": "Polygon",
        "coordinates": [[
          [-73.2, -9.2], [-69.5, -1.0], [-66.9, 1.0], [-61.0, 6.0],
          [-52.0, 2.0], [-57.0, -15.0], [-65.0, -22.0], [-73.2, -9.2]
        ]]
      },
      "properties": {
        "name": "Brazil",
        "endemic_1950": true,
        "endemic_1960": true,
        "endemic_1970": false,
        "endemic_1980": false,
        "eradication_year": 1971,
        "last_case_year": 1971,
        "vaccination_intensity": 90,
        "cases_peak_year": 1963,
        "cases_peak": 9200
      }
    },

    // Last Case Markers - Critical Historical Locations
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [45.31667, 2.03333] // Merca, Somalia
      },
      "properties": {
        "type": "last_case",
        "location": "Merca, Somalia",
        "date": "1977-10-26",
        "patient_name": "Ali Maow Maalin",
        "age": 23,
        "occupation": "Hospital cook",
        "significance": "LAST NATURALLY OCCURRING CASE OF SMALLPOX IN HUMAN HISTORY",
        "outcome": "Recovered",
        "year": 1977
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [86.9833, 23.7] // Bihar, India
      },
      "properties": {
        "type": "last_case",
        "location": "Karimganj, Bihar, India",
        "date": "1975-05-24",
        "patient_name": "Saiban Bibi",
        "age": 3,
        "significance": "Last case in Asia (largest endemic region)",
        "outcome": "Recovered",
        "year": 1975
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [88.3639, 22.5726] // Kolkata, India
      },
      "properties": {
        "type": "last_case",
        "location": "Kolkata (Calcutta), India",
        "date": "1975-05-17",
        "significance": "Last major outbreak before final eradication in India",
        "cases": 78,
        "year": 1975
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [38.7667, 8.9833] // Ethiopia
      },
      "properties": {
        "type": "last_case",
        "location": "Dalocha, Ethiopia",
        "date": "1976-08-09",
        "significance": "Last case in Africa before Somalia",
        "year": 1976
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [90.4, 23.8] // Dhaka, Bangladesh
      },
      "properties": {
        "type": "last_case",
        "location": "Dhaka, Bangladesh",
        "date": "1975-11-16",
        "patient_name": "Rahima Banu",
        "age": 2,
        "significance": "Last case of Variola major (severe form)",
        "outcome": "Recovered",
        "year": 1975
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [-47.9, -15.8] // Brasília, Brazil
      },
      "properties": {
        "type": "last_case",
        "location": "São Paulo State, Brazil",
        "date": "1971-04-19",
        "significance": "Last case in South America",
        "year": 1971
      }
    },

    // Historical Milestones - Important Events
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [6.1432, 46.2044] // Geneva, Switzerland
      },
      "properties": {
        "type": "milestone",
        "location": "Geneva, Switzerland",
        "event": "WHO Declares Smallpox Eradicated",
        "date": "1980-05-08",
        "significance": "Official certification of global eradication - first disease ever eradicated",
        "year": 1980,
        "icon": "victory"
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [6.1432, 46.2044] // Geneva, Switzerland
      },
      "properties": {
        "type": "milestone",
        "location": "Geneva, Switzerland",
        "event": "Intensified Eradication Program Launched",
        "date": "1967-01-01",
        "significance": "WHO launches coordinated global campaign with ring vaccination strategy",
        "year": 1967,
        "icon": "start"
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [6.1432, 46.2044] // Geneva, Switzerland
      },
      "properties": {
        "type": "milestone",
        "location": "Geneva, Switzerland",
        "event": "Global Eradication Program Initiated",
        "date": "1959-05-01",
        "significance": "WHO Assembly commits to global smallpox eradication",
        "year": 1959,
        "icon": "start"
      }
    }
  ],

  // Timeline metadata for animation
  timeline: {
    startYear: 1950,
    endYear: 1980,
    keyYears: [1959, 1967, 1971, 1975, 1977, 1980],
    keyEvents: {
      1950: "Smallpox endemic in 59 countries, killing 2 million annually",
      1959: "WHO commits to global eradication program",
      1967: "Intensified eradication campaign begins",
      1971: "South America declared smallpox-free",
      1975: "Asia (except Horn of Africa) declared smallpox-free",
      1977: "Last naturally occurring case (Somalia)",
      1980: "WHO declares smallpox eradicated from Earth"
    }
  },

  // Country statistics summary
  statistics: {
    totalEndemicCountries: 59,
    totalCasesEstimate1950: 50000000, // 50 million cases in 1950s
    totalDeaths1950s: 2000000, // 2 million deaths annually
    vaccinations: 465000000, // 465 million vaccinations administered
    duration: 30, // years from start to complete eradication
    strategy: "Ring vaccination - vaccinating contacts of infected individuals"
  }
};

// Export for use in visualization
if (typeof module !== 'undefined' && module.exports) {
  module.exports = smallpoxData;
}
