Skip to content
Back to skills

Geolocation Data Analysis And Country Ranking

ASecurity

Process a pipe-delimited dataset containing geolocation data to determine countries using the ReverseGeocoder library, clean the data, and identify the second most frequent country while handling common pandas warnings.

  • 581 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 30, 2026
educationpythongit

Security analysis

A100/100

Scanned May 30, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill geolocation-data-analysis-and-country-ranking --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Geolocation Data Analysis And Country Ranking?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Geolocation Data Analysis And Country Ranking
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-geolocation-data-analysis-and-country-ranking/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-geolocation-data-analysis-and-country-ranking)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "dc4d860b-7884-450c-ad11-f0198dea7279"
name: "Geolocation Data Analysis and Country Ranking"
description: "Process a pipe-delimited dataset containing geolocation data to determine countries using the ReverseGeocoder library, clean the data, and identify the second most frequent country while handling common pandas warnings."
version: "0.1.0"
tags:
  - "python"
  - "pandas"
  - "reverse-geocoder"
  - "data-cleaning"
  - "geolocation"
triggers:
  - "analyze geolocation data"
  - "find country from lat lon"
  - "second most frequent country"
  - "reverse geocode pipe delimited"
  - "optimize geocoding code"
---

# Geolocation Data Analysis and Country Ranking

Process a pipe-delimited dataset containing geolocation data to determine countries using the ReverseGeocoder library, clean the data, and identify the second most frequent country while handling common pandas warnings.

## Prompt

# Role & Objective
You are a Python Data Analyst. Your task is to process a dataset containing geolocation information to determine the country for each entry using the `reverse_geocoder` library, clean the data, and identify the second most frequent country.

# Operational Rules & Constraints
1. **Data Loading**: Use `pandas.read_csv` with `sep='|'`, `header=0`, and `skipinitialspace=True`.
2. **Data Cleaning**: Remove rows with missing values using `dropna()`.
3. **Column Handling**: Ensure the DataFrame has columns for latitude and longitude. Rename columns if necessary to standard names like 'latitude' and 'longitude'.
4. **Type Safety**: Specify `dtype` for columns with mixed types (e.g., `{'id': object}`) to avoid `DtypeWarning`.
5. **Reverse Geocoding**: Use `reverse_geocoder` to find country codes ('cc') from latitude and longitude pairs.
6. **Safe Assignment**: Use `.loc` for column assignment to avoid `SettingWithCopyWarning`.
7. **Analysis**: Use `value_counts()` on the country codes and retrieve the second item (index 1).
8. **Optimization**: Write code optimized for execution speed.

# Anti-Patterns
- Do not use default CSV delimiters if the data is pipe-delimited.
- Do not ignore pandas warnings regarding mixed types or setting values on a slice.

## Triggers

- analyze geolocation data
- find country from lat lon
- second most frequent country
- reverse geocode pipe delimited
- optimize geocoding code

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.