julianbruegger / corona-display Goto Github PK
View Code? Open in Web Editor NEWKeep Track of the Corona-Numbers
License: GNU General Public License v3.0
Keep Track of the Corona-Numbers
License: GNU General Public License v3.0
It's not an issue but I wanted to ask you if theres a way to use a 128x32 oled Display. I saw the wiring on Github of the oled but it's an 128x64 Oled I think. Do you have a code to run only the Infections from a Country on a i2c 128x32 oled Display? If not could help me to get your code working on a 128x32 Oled? Pls help
Looks like corona.help just reformatted their html
I wanted to run your code but I faced an error. How can i solve?
country = soup_w.select('h1')[0].text.strip()
IndexError: list index out of range
What would be more interesting is showing the values as percentage of the population infected...
Current Datasource is changing the Location-ID's on a Daily base.
Getting Data from: https://corona.help/
Using Beautiful-Soup
Rpi zero with 16x2 display i2c.
After sudo./install.sh I run python3 display_16x2.py :
Traceback (most recent call last):
File "display_16x2.py", line 4, in
from module.i2c import *
File "/home/pi/corona-display/module/i2c.py", line 30, in
bus = smbus.SMBus(1) # Rev 2 Pi uses 1
FileNotFoundError: [Errno 2] No such file or directory
pi@CoronaPi:~ $ git clone https://github.com/julianbruegger/corona-display.git
Cloning into 'corona-display'...
remote: Enumerating objects: 218, done.
remote: Counting objects: 100% (218/218), done.
remote: Compressing objects: 100% (147/147), done.
remote: Total 218 (delta 83), reused 185 (delta 59), pack-reused 0
Receiving objects: 100% (218/218), 2.17 MiB | 1.18 MiB/s, done.
Resolving deltas: 100% (83/83), done.
pi@CoronaPi:~ $ cd corona-display/
pi@CoronaPi:/corona-display $ sudo chmod +x install.sh/corona-display $ sudo ./install.sh
pi@CoronaPi:
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: requests in /usr/lib/python2.7/dist-packages (2.21.0)
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version (12.6).
git is already the newest version (1:2.20.1-2+deb10u1).
python-dev is already the newest version (2.7.16-1).
python-smbus is already the newest version (4.1-1).
python-pip is already the newest version (18.1-5+rpt1).
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: RPi.GPIO in /usr/lib/python2.7/dist-packages (0.7.0)
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: beautifulsoup4 in /usr/lib/python3/dist-packages (4.7.1)
fatal: destination path 'Adafruit_Python_CharLCD' already exists and is not an empty directory.
running install
running bdist_egg
running egg_info
writing Adafruit_CharLCD.egg-info/PKG-INFO
writing dependency_links to Adafruit_CharLCD.egg-info/dependency_links.txt
writing requirements to Adafruit_CharLCD.egg-info/requires.txt
writing top-level names to Adafruit_CharLCD.egg-info/top_level.txt
reading manifest file 'Adafruit_CharLCD.egg-info/SOURCES.txt'
writing manifest file 'Adafruit_CharLCD.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-armv7l/egg
running install_lib
running build_py
creating build/bdist.linux-armv7l/egg
creating build/bdist.linux-armv7l/egg/Adafruit_CharLCD
copying build/lib/Adafruit_CharLCD/Adafruit_CharLCD.py -> build/bdist.linux-armv7l/egg/Adafruit_CharLCD
copying build/lib/Adafruit_CharLCD/init.py -> build/bdist.linux-armv7l/egg/Adafruit_CharLCD
byte-compiling build/bdist.linux-armv7l/egg/Adafruit_CharLCD/Adafruit_CharLCD.py to Adafruit_CharLCD.cpython-37.pyc
byte-compiling build/bdist.linux-armv7l/egg/Adafruit_CharLCD/init.py to init.cpython-37.pyc
creating build/bdist.linux-armv7l/egg/EGG-INFO
copying Adafruit_CharLCD.egg-info/PKG-INFO -> build/bdist.linux-armv7l/egg/EGG-INFO
copying Adafruit_CharLCD.egg-info/SOURCES.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
copying Adafruit_CharLCD.egg-info/dependency_links.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
copying Adafruit_CharLCD.egg-info/requires.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
copying Adafruit_CharLCD.egg-info/top_level.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/Adafruit_CharLCD-1.1.1-py3.7.egg' and adding 'build/bdist.linux-armv7l/egg' to it
removing 'build/bdist.linux-armv7l/egg' (and everything under it)
Processing Adafruit_CharLCD-1.1.1-py3.7.egg
Removing /usr/local/lib/python3.7/dist-packages/Adafruit_CharLCD-1.1.1-py3.7.egg
Copying Adafruit_CharLCD-1.1.1-py3.7.egg to /usr/local/lib/python3.7/dist-packages
Adafruit-CharLCD 1.1.1 is already the active version in easy-install.pth
Installed /usr/local/lib/python3.7/dist-packages/Adafruit_CharLCD-1.1.1-py3.7.egg
Processing dependencies for Adafruit-CharLCD==1.1.1
Searching for Adafruit-GPIO==1.0.4
Best match: Adafruit-GPIO 1.0.4
Processing Adafruit_GPIO-1.0.4-py3.7.egg
Adafruit-GPIO 1.0.4 is already the active version in easy-install.pth
Using /usr/local/lib/python3.7/dist-packages/Adafruit_GPIO-1.0.4-py3.7.egg
Searching for spidev==3.4
Best match: spidev 3.4
Adding spidev 3.4 to easy-install.pth file
Using /usr/lib/python3/dist-packages
Searching for Adafruit-PureIO==1.0.4
Best match: Adafruit-PureIO 1.0.4
Processing Adafruit_PureIO-1.0.4-py3.7.egg
Adafruit-PureIO 1.0.4 is already the active version in easy-install.pth
Using /usr/local/lib/python3.7/dist-packages/Adafruit_PureIO-1.0.4-py3.7.egg
Finished processing dependencies for Adafruit-CharLCD==1.1.1
pi@CoronaPi:/corona-display $ sudo python3 display.py/corona-display $
File "display.py", line 1
<<<<<<< HEAD
^
SyntaxError: invalid syntax
pi@CoronaPi:
If line 8 is changed to : url_c = "https://corona.help/country/us"
The following error occurs because the returned tuple is 'United' 'States' 'stats', 3 values.
File "fetch.py", line 27, in
first, last = country.split()
ValueError: too many values to unpack (expected 2)
A simple fix is to change:
first, last = country.split()
TO: which removes the last word, 'stats' from the name.
first = country.rsplit(' ',1)[0]
I see you have no LICENSE file for this project. The default is copyright.
I would suggest released the code under the GPLv3 or AGPLv3 license so that others are encouraged to contribute changes back to your project.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.