-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from ksh24865/dev
Dev
- Loading branch information
Showing
12 changed files
with
210 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
*.pyc | ||
*.o | ||
*.so | ||
*.swp | ||
*.png | ||
*.jpg | ||
*.bmp | ||
*.out* | ||
*.dat* | ||
*.log | ||
*.pot | ||
*.report | ||
__pycache__ | ||
build | ||
static | ||
|
||
# virtualenv | ||
.python-version | ||
|
||
# Distribution / packaging | ||
MANIFEST | ||
*.idea | ||
|
||
# python Virtualenv | ||
venv/ | ||
|
||
# MAC | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2019 Yoonje Choi | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,76 @@ | ||
# COVID-19 Project | ||
Store and Analyze data for COVID-19. | ||
Visualize and Analyze data for COVID-19. | ||
|
||
Table of contents | ||
================= | ||
<!--ts--> | ||
* [Result](#Result) | ||
* [Requirement](#Requirement) | ||
* [Installation](#Build--Installation) | ||
* [Open Data](#open-data) | ||
* [Installation](#Installation) | ||
* [Run](#run) | ||
* [Open Data](#open-data) | ||
<!--te--> | ||
|
||
Result | ||
======= | ||
* 코로나 실시간 현황판 | ||
* 3월1일 ~ 오늘까지의 데이터 | ||
|
||
![date_change_](https://user-images.githubusercontent.com/55729930/92361595-90972880-f129-11ea-918c-7aa35ae12ab0.gif) | ||
|
||
|
||
* 당일 지역별 확진자, 사망자, 격리해제 인원 | ||
* 날짜별 검사결과 그래프 | ||
* 날짜별 확진자 증가 추이 그래프 | ||
* 당일 지역별 확진자, 사망자, 격리해제 인원 | ||
* 날짜별 검사결과 그래프 | ||
* 날짜별 확진자 증가 추이 그래프 | ||
![preview_](https://user-images.githubusercontent.com/55729930/92361544-7b21fe80-f129-11ea-87b4-f4b82b83468d.gif) | ||
|
||
* 연령대별 성별 감염자 그래프 (예정) | ||
* 성별 연령별 확진자 비율 그래프 | ||
![covid_board - Kibana](https://user-images.githubusercontent.com/55729930/92398418-7bd78680-f163-11ea-9cb8-6a72bf165737.png) | ||
|
||
Requirement | ||
======= | ||
``` | ||
Python >= 3.0 | ||
``` | ||
|
||
Installation | ||
======= | ||
$ git clone https://github.com/COVID19-SSU/covid19-project.git | ||
Open Data | ||
======= | ||
* 공공 데이터 포털 (https://data.go.kr/) | ||
* 보건복지부_코로나19 감염_현황 | ||
* 보건복지부_코로나19 시·도발생_현황 | ||
* 보건복지부_코로나19 연령별·성별감염_현황 | ||
```sh | ||
$ git clone https://github.com/COVID19-SSU/covid19-project.git | ||
``` | ||
```sh | ||
$ sudo docker-compose up | ||
``` | ||
```sh | ||
$ pip3 install -r requirements.txt | ||
``` | ||
|
||
Run | ||
======= | ||
* crawling | ||
* 보건복지부 코로나19 데이터(3월1일~오늘)를 크롤링하여 elasticsearch에 추가 | ||
|
||
|
||
$ python3 covid19-project/covid19_infection_city/crawling_covid19_infection_city.py | ||
$ python3 covid19-project/covid19_infection_status/crawling_covid19_infection_status.py | ||
```shell script | ||
$ python3 covid19-project/covid19_infection_city/crawling_covid19_infection_city.py | ||
$ python3 covid19-project/covid19_infection_status/crawling_covid19_infection_status.py | ||
``` | ||
|
||
* update | ||
* 기존 데이터에 보건복지부 코로나19 데이터(오늘)를 elasticsearch에 업데이트 | ||
|
||
$ python3 covid19-project/covid19_infection_city/update_covid19_infection_city.py | ||
$ python3 covid19-project/covid19_infection_status/update_covid19_infection_status.py | ||
|
||
```shell script | ||
$ python3 covid19-project/covid19_infection_city/update_covid19_infection_city.py | ||
$ python3 covid19-project/covid19_infection_status/update_covid19_infection_status.py | ||
``` | ||
|
||
* add Task scheduler(cron) | ||
* 매일 12:00(PM)에 오늘 데이터 업데이트가 실행되도록 해당 작업 crontab에 등록 (작업 환경에 맞추어 절대 경로 수정 해줘야 함) | ||
|
||
$ echo -e "0 12 * * * python3 ~/covid19-project/covid19_infection_status/update_covid19_infection_status.py\n0 12 * * * python3 ~/covid19-project/covid19_infection_city/update_covid19_infection_city.py" | crontab | ||
* 매일 12:00(PM)에 오늘 데이터 업데이트가 실행되도록 해당 작업 crontab에 등록 (작업 환경에 맞추어 절대 경로 수정 해줘야 함) | ||
```shell script | ||
$ echo -e "0 12 * * * python3 ~/covid19-project/covid19_infection_status/update_covid19_infection_status.py\n0 12 * * * python3 ~/covid19-project/covid19_infection_city/update_covid19_infection_city.py" | crontab | ||
``` | ||
|
||
* Dashboard | ||
* Open http://localhost:5601 | ||
* Click `Management` tab | ||
* Import [Kibana dashboard](https://github.com/COVID19-SSU/covid19-project/dashboard/export.ndjson) | ||
* Create Index pattern | ||
* Go to `Dashboard` tab | ||
|
||
Open Data | ||
======= | ||
* 공공 데이터 포털 (https://data.go.kr/) | ||
* 보건복지부_코로나19 감염_현황 | ||
* 보건복지부_코로나19 시·도발생_현황 | ||
* 보건복지부_코로나19 연령별·성별감염_현황 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.