Skip to content

id_for_municipality and related functions - #5

Merged
CarwilB merged 14 commits into
mainfrom
4-add-id-for-municipality
Jul 26, 2025
Merged

id_for_municipality and related functions#5
CarwilB merged 14 commits into
mainfrom
4-add-id-for-municipality

Conversation

@CarwilB

@CarwilB CarwilB commented Jul 25, 2025

Copy link
Copy Markdown
Member

Add Municipality ID Lookup Functionality

This PR adds comprehensive municipality ID lookup functionality to the package, including:

  • New functions to get municipality IDs based on names: id_for_municipality() and id_for_municipality_2()
  • Functions to retrieve municipality, province, and department names from IDs
  • Support for handling alternative municipality spellings and name variations
  • Added .DS_Store to .gitignore

Data Resources

  • Added anexo_municipios dataset containing official municipality information
  • Created muni_id_lookup_table with alternative municipality names and mappings
  • Added muni_gb2014_conversion and muni_gb2014_lookup tables for GB2014 format compatibility

Helper Functions

  • rename_anexo_columns() for standardizing column names
  • str_equivalent_list() for checking string equivalence in lists
  • add_id_for_municipality() to add municipality IDs to datasets

Testing

  • Comprehensive test suite for all new municipality lookup functionality
  • Tests for edge cases like non-existent municipalities and duplicate names

@CarwilB CarwilB linked an issue Jul 25, 2025 that may be closed by this pull request

CarwilB commented Jul 25, 2025

Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@CarwilB
CarwilB marked this pull request as ready for review July 25, 2025 16:47
@CarwilB CarwilB changed the title ignore DSstore id_for_municipality and related functions Jul 26, 2025
@CarwilB
CarwilB merged commit 3da71d3 into main Jul 26, 2025
6 checks passed
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.

Add id-for-municipality.R to the package, following R package standards

1 participant