![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Python package for generating heatmap animation with given data and geojson.
English | 简体中文
If you want to generate a heatmap animation with given data and geojson file or url, you can use this package. You can also type the region name or code replacing the geojson file.
Use 高德地图地理/逆地理编码 get the region code.
Use 阿里云数据可视化平台 get the geojson file.
Note: Currently, the region name must be in Chinese.
pip install heatmapanimation
import heatmapanimation as hma
heatmap = hma.Heatmap() # create a heatmap object
# set the configuration
heatmap.region = '北京'
heatmap.datafile = './data/data.csv'
heatmap.run_x() # run the animation
You must set a region and datafile before run the animation.
region
The region name you want to generate the heatmap animation. Must be type Chinese region in Chinese.
region_code
The region code you want to generate the heatmap animation. Must be type Chinese region code.
region_url
The url of the geojson file.Or the geojson file path.
datafile
The data file path.
data
The data you want to generate the heatmap animation.
Options: dict or list or json or pandas.DataFrame.
output_format
The output format of the animation.
Options: 'gif' or 'mp4'.
fig_name
The name of the output file.
Note: If you don't set the fig_name, the output file will be named as the region name.
color_map
The colormap of the heatmap.
Options: 'Blues', 'BuGn', 'BuPu', 'GnBu', 'Greens', 'Greys', 'Oranges', 'OrRd', 'PuBu'.
All the colormaps are in matplotlib.
Default: 'Reds'
isLegend
Whether to show the legend.
Options: True or False.
Default: False.
legend_label
The label of the legend.
Options: str.
Default: 'Temperature'.
legend_location
The location of the legend.
Options: 'right' or 'right'.
Default: 'right'.
legend_min
The min value of the legend.
Options: int or float.
Default: the minimum of the data.
legend_max
The max value of the legend.
Options: int or float.
Default: the maximum of the data.
run_x()
Run the animation and generate frame image and synthetic GIF. Currently, the output format is only 'gif'.
run()
Run the animation with another method which can not show the legend. But the output format is gif, mp4, jshtml and html5.
FAQs
Generate heatmap animation with given data and geojson
We found that heatmapanimation demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.