Skip to content

Latest commit

 

History

History
51 lines (40 loc) · 2.13 KB

README.md

File metadata and controls

51 lines (40 loc) · 2.13 KB

Hauntings 👻

This Python program processes haunted locations data from a CSV file and generates a heatmap to visualize the most haunted places in the United States of America. It also provides statistics related to these haunted locations.

Screenshot 2023-10-13 at 22 03 20

Prerequisites

Make sure you have the following libraries installed in your Python environment:

Installation

You can install the required libraries using pip:

pip install folium pandas

Usage

Clone the Repository:

git clone https://github.com/your-username/hauntings-map.git
cd hauntings-map

Prepare Haunted Locations Data:

  • Create a CSV file named hauntings.csv containing the haunted locations data. The CSV file should have columns named latitude and longitude for the location coordinates.

Run the Program:

python3 hauntings.py

View the Output:

  • The script will generate a heatmap named HauntingsDistribution.html showcasing the distribution of haunted locations in America.
  • The statistics related to haunting will be printed in the console and saved in a file named hauntingstats.txt.

Program Explanation

Import Libraries:

  • Folium is used for map visualization.
  • Pandas is used for data manipulation and analysis.

Read Haunted Locations Data:

Data Processing:

  • Missing latitude and longitude values are replaced with arbitrary values (0) for heatmap generation.

Heatmap Generation:

  • The script creates a heatmap using the processed data and saves it as an HTML file ('HauntingsDistribution.html').

Statistics:

The script calculates and prints statistics related to the haunted locations, and saves them in 'hauntingstats.txt'.

👻 Happy Haunting! 👻