Overview
Historia Para Gandules is an interactive geospatial visualization platform that maps historical Instagram content from the Canary Islands. This quickstart guide will walk you through scraping data, generating an interactive map, and performing basic analysis.Make sure you’ve completed the Installation steps before proceeding.
Quick Start Workflow
Scrape Instagram Data
Use the scraper to download posts from the Historia Para Gandules Instagram account.
Step 1: Scraping Instagram Data
Thescraping5.py script uses Instaloader to download video posts and metadata from the Instagram profile.
Run the Scraper
What It Does
The scraper collects the following information for each video post:- Date of publication
- Post caption/text
- Number of likes
- Number of comments
- Video URL
- View count
- Video duration
- Post URL
Code Example
Output
The scraper creates a CSV file namedinformacion_reels_simple.csv with all the collected data.
Step 2: Generating the Interactive Map
Themapita5.py script creates an interactive Folium map with markers for each geolocated post.
Prepare Your Data
Before running the map generator, ensure you have an Excel file (excel_info_1.xlsx) with the following columns:
- Localización - Coordinates in “latitude,longitude” format (e.g., “28.0,-15.0”)
- Texto del reel - Post caption
- URL de imagen - Image URL for the thumbnail
- URL del Post - Instagram post URL
Run the Map Generator
Code Example
View Your Map
Open the generated HTML file in your browser:Map Features
- Interactive Markers - Click markers to view post thumbnails and details
- Thumbnails - Each marker displays a small image preview
- Direct Links - Click “Ver publicación” to open the post on Instagram
- Zoom Controls - Navigate the map centered on the Canary Islands
The map is centered at coordinates [28.0, -15.0] with a zoom level of 6, ideal for viewing the Canary Islands archipelago.
Step 3: Exploratory Data Analysis
TheEDA.ipynb Jupyter notebook provides comprehensive analysis of engagement metrics and content patterns.
Launch Jupyter Notebook
Analysis Capabilities
The notebook includes:- Descriptive Statistics - Summary statistics for likes, comments, views, and video duration
- Top Performing Content - Identification of posts with highest engagement
- Category Analysis - Breakdown by content categories:
- Toponimia de Lugares (Place Names)
- Curiosidades Históricas (Historical Curiosities)
- Biografías de Personajes Históricos (Historical Biographies)
- Arquitectura (Architecture)
- Acontecimientos Históricos (Historical Events)
- Visualizations:
- Scatter plots showing likes vs. comments correlation
- Category-based engagement analysis
- Interactive Plotly charts
Key Insights Example
Based on the analysis in the notebook:Sample Statistics
The analysis reveals:- 121 total video posts analyzed
- Average engagement: ~1,316 likes, ~39 comments, ~15,392 views
- Top performing video: 14,659 likes, 361 comments, 255,191 views
- Average video duration: ~50 seconds
Pro Tip
Use the category analysis to understand which historical topics resonate most with your audience and optimize content strategy accordingly.
Common Workflows
Complete Data Pipeline
Run the entire pipeline from scraping to visualization:Update Existing Map
To update your map with new posts:- Update the
excel_info_1.xlsxfile with new location data - Re-run the map generator:
Export Analysis Results
Export processed data for external use:Troubleshooting
Scraper returns no data
Scraper returns no data
Check if the Instagram profile name is correct and the profile is public. Instagram may also rate-limit requests.
Map doesn't display markers
Map doesn't display markers
Verify that coordinates in the Excel file are in the correct format: “latitude,longitude” (e.g., “28.5,-16.25”).
Images not loading on map
Images not loading on map
Ensure the
imagenes/ directory exists and images were downloaded successfully. Check console output for download errors.Jupyter notebook kernel crashes
Jupyter notebook kernel crashes
This may be due to large datasets. Try reducing the data size or increasing available memory.
Next Steps
Data Sources
Learn about data collection and management
API Reference
Explore detailed API documentation
Interactive Maps
Advanced mapping and visualization techniques
Analytics
Deep dive into engagement analytics