### Install geodatasets from PyPI Source: https://geodatasets.readthedocs.io/ Install the geodatasets library using pip. This is the standard method for installing Python packages. ```bash pip install geodatasets ``` -------------------------------- ### Install geodatasets Development Version from GitHub Source: https://geodatasets.readthedocs.io/ Install the latest development version of geodatasets directly from its GitHub repository using pip. This is useful for testing the newest features or contributing to the project. ```bash pip install git+https://github.com/geopandas/geodatasets.git ``` -------------------------------- ### Install geodatasets using Conda Source: https://geodatasets.readthedocs.io/ Install the geodatasets library from the conda-forge channel using conda or mamba. This is recommended for users within the Anaconda ecosystem. ```bash conda install geodatasets -c conda-forge ``` -------------------------------- ### Get Dataset URL Source: https://geodatasets.readthedocs.io/ Use the `get_url` function to retrieve the direct download URL for a specific dataset. Provide the dataset name as a string. ```python In [3]: geodatasets.get_url("geoda airbnb") Out[3]: 'https://geodacenter.github.io/data-and-lab//data/airbnb.zip' ``` -------------------------------- ### Get Dataset Local Path Source: https://geodatasets.readthedocs.io/ Use the `get_path` function to obtain the local file path for a dataset. If the dataset is not cached, it will be downloaded automatically. ```python In [4]: geodatasets.get_path('geoda airbnb') Out[4]: '/Users/martin/Library/Caches/geodatasets/airbnb.zip' ``` -------------------------------- ### Import and List Datasets Source: https://geodatasets.readthedocs.io/ Import the geodatasets library and access the 'data' attribute to view available datasets. This provides a dictionary-like structure containing metadata for each dataset. ```python In [1]: import geodatasets In [2]: geodatasets.data Out[2]: {'geoda': {'airbnb': {'url': 'https://geodacenter.github.io/data-and-lab//data/airbnb.zip', 'license': 'NA', 'attribution': 'Center for Spatial Data Science, University of Chicago', 'name': 'geoda.airbnb', 'description': 'Airbnb rentals, socioeconomics, and crime in Chicago', 'geometry_type': 'Polygon', 'nrows': 77, 'ncols': 21, 'details': 'https://geodacenter.github.io/data-and-lab//airbnb/', 'hash': 'a2ab1e3f938226d287dd76cde18c00e2d3a260640dd826da7131827d9e76c824', 'filename': 'airbnb.zip'}, 'atlanta': {'url': 'https://geodacenter.github.io/data-and-lab//data/atlanta_hom.zip', 'license': 'NA', 'attribution': 'Center for Spatial Data Science, University of Chicago', 'name': 'geoda.atlanta', 'description': 'Atlanta, GA region homicide counts and rates', 'geometry_type': 'Polygon', 'nrows': 90, 'ncols': 24, 'details': 'https://geodacenter.github.io/data-and-lab//atlanta_old/', 'hash': 'a33a76e12168fe84361e60c88a9df4856730487305846c559715c89b1a2b5e09', 'filename': 'atlanta_hom.zip', 'members': ['atlanta_hom/atl_hom.geojson']}, ... ``` -------------------------------- ### List All Available Dataset Keys Source: https://geodatasets.readthedocs.io/ Flatten the dataset structure and retrieve a list of all available dataset keys using the `flatten().keys()` method. This provides a comprehensive overview of all datasets managed by the library. ```python In [7]: geodatasets.data.flatten().keys() Out[7]: dict_keys(['geoda.airbnb', 'geoda.atlanta', 'geoda.cars', 'geoda.charleston1', 'geoda.charleston2', 'geoda.chicago_health', 'geoda.chicago_commpop', 'geoda.chile_labor', 'geoda.cincinnati', 'geoda.cleveland', 'geoda.columbus', 'geoda.grid100', 'geoda.groceries', 'geoda.guerry', 'geoda.health', 'geoda.health_indicators', 'geoda.hickory1', 'geoda.hickory2', 'geoda.home_sales', 'geoda.houston', 'geoda.juvenile', 'geoda.lansing1', 'geoda.lansing2', 'geoda.lasrosas', 'geoda.liquor_stores', 'geoda.malaria', 'geoda.milwaukee1', 'geoda.milwaukee2', 'geoda.ncovr', 'geoda.natregimes', 'geoda.ndvi', 'geoda.nepal', 'geoda.nyc', 'geoda.nyc_earnings', 'geoda.nyc_education', 'geoda.nyc_neighborhoods', 'geoda.orlando1', 'geoda.orlando2', 'geoda.oz9799', 'geoda.phoenix_acs', 'geoda.police', 'geoda.sacramento1', 'geoda.sacramento2', 'geoda.savannah1', 'geoda.savannah2', 'geoda.seattle1', 'geoda.seattle2', 'geoda.sids', 'geoda.sids2', 'geoda.south', 'geoda.spirals', 'geoda.stlouis', 'geoda.tampa1', 'geoda.us_sdoh', 'ny.bb', 'eea.large_rivers', 'naturalearth.land']) ``` -------------------------------- ### Query Dataset by Name Source: https://geodatasets.readthedocs.io/ Use the `query_name` method to retrieve dataset details using its name. This is an alternative way to access dataset metadata. ```python In [6]: geodatasets.data.query_name('geoda airbnb') Out[6]: {'url': 'https://geodacenter.github.io/data-and-lab//data/airbnb.zip', 'license': 'NA', 'attribution': 'Center for Spatial Data Science, University of Chicago', 'name': 'geoda.airbnb', 'description': 'Airbnb rentals, socioeconomics, and crime in Chicago', 'geometry_type': 'Polygon', 'nrows': 77, 'ncols': 21, 'details': 'https://geodacenter.github.io/data-and-lab//airbnb/', 'hash': 'a2ab1e3f938226d287dd76cde18c00e2d3a260640dd826da7131827d9e76c824', 'filename': 'airbnb.zip'} ``` -------------------------------- ### Access Detailed Dataset Metadata Source: https://geodatasets.readthedocs.io/ Access detailed metadata for a specific dataset by directly referencing it through the `geodatasets.data` object. This returns a dictionary containing all available information about the dataset. ```python In [5]: geodatasets.data.geoda.airbnb Out[5]: {'url': 'https://geodacenter.github.io/data-and-lab//data/airbnb.zip', 'license': 'NA', 'attribution': 'Center for Spatial Data Science, University of Chicago', 'name': 'geoda.airbnb', 'description': 'Airbnb rentals, socioeconomics, and crime in Chicago', 'geometry_type': 'Polygon', 'nrows': 77, 'ncols': 21, 'details': 'https://geodacenter.github.io/data-and-lab//airbnb/', 'hash': 'a2ab1e3f938226d287dd76cde18c00e2d3a260640dd826da7131827d9e76c824', 'filename': 'airbnb.zip'} ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.