Skip to main content

A module for displaying danish Voting poll in Bokeh maps.

Project description

What is kmdvalg?

  • It is a wrapper around BeautifulSoup to extract data from www.kmdvalg.dk.

  • Bokeh map patches are created with pyshp from shapefiles.

  • The shapefile dataset is: ‘Digdag (Kommunal)’ downloaded 2017/12/03 from https://download.kortforsyningen.dk.

  • The voting information is combined with map information before plotting.

See examples

Use nbviewer.jupyter.org to:

Launch interactive Jupyter Notebook mybinder.org to try examples:

https://mybinder.org/badge.svg https://raw.githubusercontent.com/tlinnet/kmdvalg/master/docs/images/image1.png

How to install?

If using conda, these steps will install an environment

# With pip from https://pypi.python.org/pypi/kmdvalg
pip install kmdvalg

Developer install for local conda environment:

# Create environment
conda env create -f environment.yml

# Activate environment
conda env list
source activate kmdvalg

# Enable ipywidgets
jupyter nbextension list
jupyter nbextension enable --py widgetsnbextension --sys-prefix

# Start jupyter
jupyter notebook

Or manual install in root environment:

# Manually install package
python setup.py install --force

#  Manually uninstall
python setup.py install --record files.txt
PACK=`dirname $(head -n 1 files.txt)`
rm -rf $PACK
#cat files.txt | xargs rm -rf

Developer

# Modify version in: kmdvalg/__init__.py

# Create tag
VERS=`python -c "from kmdvalg import __version__; print(__version__)"`
# Adds a tag so that we can put this on PyPI
git tag $VERS -m ""
git push --tags origin master

# Upload your package to PyPI Test
python setup.py sdist upload -r pypitest
open https://testpypi.python.org/pypi/kmdvalg

# Upload to PyPI Live
# Once you've successfully uploaded to PyPI Test, perform the same steps but point to the live PyPI server instead.
python setup.py sdist upload -r pypi
open https://pypi.python.org/pypi/kmdvalg

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kmdvalg-0.10.tar.gz (18.6 kB view details)

Uploaded Source

File details

Details for the file kmdvalg-0.10.tar.gz.

File metadata

  • Download URL: kmdvalg-0.10.tar.gz
  • Upload date:
  • Size: 18.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for kmdvalg-0.10.tar.gz
Algorithm Hash digest
SHA256 8db920cb7725e08ef69ef2dbf4eb9f3a1d9ab07d1c4932577086ad14030855bf
MD5 70f6ec2d60800afb6cef598e0fac1636
BLAKE2b-256 66312e84c3f4cc7aa7ae2a46d9e02afd757cf045c9415148b2d66973b1d2246c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page