Code Monkey home page Code Monkey logo

geohd's Introduction

GeoHD

python GitHub release pypi license

Getting Started | Issues | Contribute | Citation | Authors

What is GeoHD?

GeoHD is a Python toolkit for geospatial hotspot detection, visualization, and analysis using urban data. Density-based hotspot detection is an important theory and method in urban research, which realizes the extraction of local research hotspots by combining density analysis and raster algebra. It has been widely used in different fields such as transportation, culture, climate, ecology and so on:

The main functions of GeoHD are fast visualization and hotspot detection based on geospatial point data, and it realizes fixed-bandwidth hotspot detection with adjustable parameters and adaptive-bandwidth hotspot detection. In addition, GeoHD provides spatial point pattern distribution analysis such as Ripley G-function calculation and fast comparison image drawing.

Getting Started

Documentation

We recommend starting your GeoHD journey with the documentation.

Install with pip

The package is available in PyPi and requires Python 3.11 or higher. It can be installed using:

$ pip install GeoHD

Usage

A case-testing approach:

$ cd test
$ python -m test_automation

You can also run test.ipynb in jupyter notebook

Visualization of hotspots on real maps:

visualize_shapefile('data.shp', output_image_path='custom_image.png')

Analytic Plane Point Patterns: Ripley G, Ripley F, Ripley J, Ripley K, Ripley L, etc. through the plotting function.

plot_g_function('data.shp')

The study area was divided into a quadrilateral (hexagonal) grid and fast visualization was achieved based on the density of point data within the divided area.

create_cell_zones(area_file, crash_file)
create_hex_grid_zones(area_file, crash_file)
create_cell_heatmap(area_file, crash_file)
create_hexagonal_heatmap(area_file, crash_file)

Realization of kernel density analysis with fixed bandwidth:

density_raster = process_shapefile(input_file_path)
plot_density_raster(density_raster,output_data_path, *gpd.read_file(input_file_path).total_bounds)

Kernel density analysis for realizing adaptive bandwidth:

adaptiveKDE(shp_file,output_data_path)

Hotspot Identification:

hotspots = extract_hotspots(density_data_path)
visualize_hotspots(np.load(density_data_path), hotspots)

Issues

If you encounter any bugs or problems with GeoHD, please create a post using our package issue tracker. Please provide a clear and concise description of the problem, with images or code-snippets where appropriate. We will do our best to address these problems as fast and efficiently as possible.

Contribute

The authors of the GeoHD package welcome external contributions to the source code. This process will be easiest if users adhere to the contribution policy:

  • Open an issue on the package issue tracker clearly describing your intentions on code modifications or additions
  • Ensure your modifications or additions adhere to the existing standard of the GeoHD package, specifically detailed documentation for new methods (see existing methods for example documentation)
  • Test your modifications to ensure that the core functionality of the package has not been altered by running the unit tests
  • Once the issue has been discussed with a package author, you may open a pull request containing your modifications

Citation

Yan, Y., 2024. GeoHD: A Python Toolkit for Geospatial Hotspot Detection, Visualization, and Analysis. SSRN Electron. J. https://doi.org/10.2139/ssrn.4799686

Yan, Y., Quan, W., Wang, H., 2024. A data‐driven adaptive geospatial hotspot detection approach in smart cities. Trans. GIS tgis.13137. https://doi.org/10.1111/tgis.13137

Authors

  • Yuchen Yan

geohd's People

Contributors

yan-yuchen avatar escald avatar chenchen011 avatar

Stargazers

bolulu avatar CWen avatar Moncler 7 FRGMT avatar  avatar Yuan Ting Wu avatar Eric avatar Nikola Bentz avatar Jack Mu avatar Gaoheng Zhang avatar Dia avatar  avatar Lum avatar Tokisaki avatar BLOCKCHAIN DEV avatar  avatar Sarah Venus Hime avatar X-LEFT avatar guanglinmei avatar Nexta avatar Haylie Wu avatar  avatar Senior Algorithm Developer avatar Colton Sun avatar Mr. Pieixoto avatar 黑漏 avatar 龙佚 avatar  avatar iacker avatar Chen Kwan-yiu avatar WangYiChen avatar  avatar  avatar  avatar  avatar  avatar  avatar Junran Liang avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.