Skip to content

Add entity geocoding tool#8003

Merged
bgruening merged 17 commits into
galaxyproject:mainfrom
ksuderman:geocode-entities
Jul 9, 2026
Merged

Add entity geocoding tool#8003
bgruening merged 17 commits into
galaxyproject:mainfrom
ksuderman:geocode-entities

Conversation

@ksuderman

Copy link
Copy Markdown
Contributor

Summary

  • Adds entity geocoding tool to convert NER output to GeoJSON format
  • Uses Nominatim geocoding service for location resolution
  • Outputs interactive GeoJSON datasets for map visualization in Galaxy
  • Works with JSON output from spaCy, Stanza, and CoreNLP NER tools
  • Includes entity aggregation and coordinate mapping capabilities

Test plan

  • Tool passes planemo lint validation
  • Test data included with spaCy NER JSON input
  • README documentation provided
  • .shed.yml configured for IUC submission
  • GeoJSON output format properly configured

🤖 Generated with Claude Code

ksuderman and others added 2 commits May 19, 2026 19:16
- Extracts location entities from NLP-annotated JSON (spaCy/Stanza)
- Geocodes GPE, LOC, FAC, and ORG entities using Nominatim
- Dual output: GeoJSON for interactive maps + tabular summary
- Galaxy OpenLayers integration for map visualization
- Configurable Nominatim server (public or self-hosted)
- Entity type selection and deduplication
- Pure Python with urllib.request (no geopy dependency)
- Rate-limited public API or unlimited self-hosted options
- Comprehensive tests and documentation
- Enables spatial analysis of text corpora

Tool: geocode_entities (v1.0.0+galaxy1)
Categories: Text Manipulation, Natural Language Processing
Citation: OpenStreetMap contributors
- Geocodes named entities from NER JSON to GeoJSON format
- Uses Nominatim geocoding service for location resolution
- Outputs interactive GeoJSON for map visualization in Galaxy
- Works with JSON output from spaCy, Stanza, and CoreNLP NER
- Includes entity aggregation and coordinate mapping

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>

@RZ9082 RZ9082 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is adding two different directories with identical content! So please let's start by removing one of them.

ksuderman added 2 commits May 20, 2026 12:30
Keep only tools/geocode/ to resolve duplicate tools issue
- Update profile from 21.05 to 24.1
- Remove macros.xml and inline version
- Fix homepage_url and remote_repository_url to point to IUC repository
- Add Galaxy copyright notice to Python script
- Add ftype attributes and has_n_rows to test assertions
@ksuderman

Copy link
Copy Markdown
Contributor Author

Addressed review issues - removed duplicate tools/geocode_entities/ directory and applied standard IUC fixes

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
Comment thread tools/geocode/geocode_entities.xml Outdated
Comment thread tools/geocode/geocode_entities.xml
Comment thread tools/geocode/geocode_entities.xml Outdated
Comment thread tools/geocode/README.md Outdated
Comment thread tools/geocode/.shed.yml Outdated
Comment thread tools/geocode/.shed.yml Outdated
Comment thread tools/geocode/geocode_entities.xml Outdated
ksuderman and others added 8 commits May 21, 2026 15:30
Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
- Changed version suffix from 1 to 0 (bgruening)
- Added requests requirement for Pulsar compatibility (bgruening)
- Updated to use JSON asserts for GeoJSON output (bgruening)
- Removed version history section from README (bgruening)
- Updated homepage_url to point to specific tool directory (RZ9082)
- Updated remote_repository_url to point to specific tool directory (RZ9082)

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
- Changed required_files type from 'file' to 'literal'
- Added version to requests requirement

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
Replaced complex JSON path with simple text assertions for GeoJSON output

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
…etic operators

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
Add comment to ensure file is properly recognized by CI linter.

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
- Add required 2 blank lines before function definition
- Update comment to trigger clean GitHub Actions environment
- Addresses both flake8 and planemo lint CI environment issues

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
Comment thread tools/geocode/geocode_entities.xml Outdated
@ksuderman ksuderman requested a review from bgruening May 23, 2026 20:58
@bgruening

Copy link
Copy Markdown
Member

I filled an issue here: galaxyproject/planemo#1646

@ksuderman

Copy link
Copy Markdown
Contributor Author

I filled an issue here: galaxyproject/planemo#1646

And I also opened galaxyproject/planemo#1645

Comment thread tools/geocode/geocode_entities.xml Outdated
Comment thread tools/geocode/geocode_entities.xml

@bgruening bgruening left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ksuderman just two tiny things

@Sch-Da

Sch-Da commented Jul 6, 2026

Copy link
Copy Markdown

Since the two referenced Issues are now closed, is this tool good to go?

@ksuderman

Copy link
Copy Markdown
Contributor Author

Thanks @ksuderman just two tiny things

Done.

@ksuderman ksuderman requested a review from bgruening July 6, 2026 18:11
ksuderman and others added 2 commits July 8, 2026 22:03
…param help, correct input example and ORG mentions, fold README into tool help

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@bgruening bgruening merged commit 553496c into galaxyproject:main Jul 9, 2026
10 checks passed
@mvdbeek

mvdbeek commented Jul 9, 2026

Copy link
Copy Markdown
Member

@bgruening

Copy link
Copy Markdown
Member

Thanks @ksuderman

@mvdbeek

mvdbeek commented Jul 9, 2026

Copy link
Copy Markdown
Member

@Sch-Da

Sch-Da commented Jul 9, 2026

Copy link
Copy Markdown

Thanks so much @ksuderman!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants