Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces several improvements and fixes across the codebase, focusing on enhanced geographic data handling, improved error messaging for optional dependencies, updated documentation and examples, and dependency management. The most important changes are grouped below by theme.
Geographic Data Handling Improvements
_normalize_column_namesfunction inpytidycensus/geography.pyto standardize column names from pygris outputs, ensuring consistent access to key fields likeSTATEFP,COUNTYFP,TRACTCE, andBLKGRPCEacross different file types and years. This normalization is now applied throughout theget_geographyfunction for all supported geography types. [1] [2] [3] [4] [5]get_geography.Error Handling and Optional Dependencies
pytidycensus/__init__.pyto catch all exceptions (not justImportError) when importing optional mapping dependencies, and added a warning message to guide users on how to install missing dependencies for mapping features.Documentation and Examples
docs/time_series_analysis.mddemonstrating how to handle changing variable codes over time with theget_time_seriesfunction.examples/test.pywith new usage examples for time series analysis, including handling changing variable codes and boundary alignment.docs/examples/01_basic_usage.ipynbto show clearer error output for invalid Census API keys, updated kernel and Python version metadata, and adjusted execution counts for reproducibility. [1] [2] [3] [4] [5]Dependency Management
tobler>=0.12.1as a required dependency inpyproject.tomlto support advanced geographic operations.1.2.2inpyproject.toml.Minor Code and Documentation Cleanups
pytidycensus/flows.pyandpytidycensus/mapping.py. [1] [2]These changes collectively improve the robustness, usability, and documentation of the package, especially for advanced geographic and time series analysis workflows.