semvec/pypi-packages huggingface dataset:
covid-19-dryampy 0.3.9
packages used to throw around covid-19 data.
Requires Python: >=3.6

# covid_19 Data Packages

An assortment of Data Scraping packages from publicly available git repos and website scrapings

## Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

### Installing

This package is hosted on Pypi

```
python3 -m pip install covid-19-dryampy
```


### Example Scripts

```
from covid_19.us_tests_cdc import us_tests_cdc

scraper = us_tests_cdc()
print(scraper.fetch())

```

or something a bit more complex;

```
from covid_19.csse_data import csse_retrieve
from covid_19.us_tests_cdc import us_tests_cdc
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt


[data, dim_loc, dim_metric] = csse_retrieve().fetch()
test_dat = us_tests_cdc().fetch()

US_ids = dim_loc[dim_loc['Country/Region'] == 'US'].index.tolist()
US_data = data[data['loc_id'].isin(US_ids)]
US_case_data = US_data[US_data['metric_id'] == 0]
US_conf_cases = US_case_data[['counts', 'date']].groupby(['date']).agg(['sum'])
US_conf_cases.columns = ['total_counts']
US_conf_cases['daily_counts'] = np.gradient(US_conf_cases['total_counts'])

US_tests = test_dat[test_dat['status'] == 'complete']
US_tests['test_add'] = US_tests['cdc'] + US_tests['other']
US_tests = US_tests[['date', 'test_add']].groupby(['date']).agg(['sum'])
US_tests.columns = ['daily_counts']
US_tests['total_counts'] = US_tests['daily_counts'].cumsum()

final = US_conf_cases.join(US_tests, lsuffix='_cases', rsuffix='_tests')

ax = plt.gca()
plt.title('US tests and confirmed cases over time')

final2 = final.reset_index()
#final2.plot(kind='line',x='date',y='total_counts_tests', ax=ax, logy=True)
#final2.plot(kind='line',x='date',y='total_counts_cases', color='red', ax=ax, logy=True)
final2.plot(kind='line',x='date',y='total_counts_tests', color='blue', ax=ax)
final2.plot(kind='line',x='date',y='total_counts_cases', color='red', ax=ax)

plt.show()
```

![Image description](https://github.com/DrYampy/covid_19/blob/master/Readme_example.png)

## Sources

US Test Data scraped from;
https://www.cdc.gov/coronavirus/2019-ncov/cases-updates/testing-in-us.html
World Confirmed/Recovered/Death data from
https://github.com/CSSEGISandData/COVID-19

## Authors

* **Steven Yampolsky**

## License

This project is licensed under the GNU GENERAL PUBLIC LICENSE - see the [LICENSE.md](LICENSE.md) file for details
webbscrapers-api 0.0.2
Python module to access Webbscrapers API - https://webbscrapers.live
Requires Python: >=3.6

# webbscrapers_api
Python module to access Webbscrapers API - https://webbscrapers.live

Created for easy access to Webbscrapers API - an API that allows for easy access to World Health Organisation reports - parsed and scanned by symptoms, location, diseases, etc.

Created for UNSW's SENG3011 course.

# Documentation

## Register

First, register a user to get the authorization token. You need the authorization token to access /reports, /statistics, and /covid-19 endpoints. You must supply an email and password.

```
import webbscrapers_api

webbscrapers_api.register("test@test.com", "this_is_my_password")

```

## Login
If you have lost the authorization token, you can login and get the token again.

```
import webbscrapers_api

webbscrapers_api.login("test@test.com", "this_is_my_password")
```

## Reports

To get reports from the World Health Organisation, use getReports()

```
import webbscrapers_api
from datetime import datetime

# webbscrapers_api.getReports(authorization_token, startDateTime, endDateTime, keyTerms, location, timezone)
webbscrapers_api.getReports("my_authorization_token", datetime(2019, 1, 1, 0, 0, 0), datetime(2020, 1, 1, 0, 0, 0), ['coronavirus', 'hiv'], 'Sydney', 'Australia/Sydney')
```

## Covid-19 Cases

To get the current covid-19 cases by country/state/territory, use getCovid19Cases()

```
import webbscrapers_api

webbscrapers_api.getCovid19Cases("my_authorization_token")
```

## Statistics

To get server statistics, use getStatistics()

```
import webbscrapers_api

webbscrapers_api.getStatistics("my_authorization_token")
```
pytimelib 1.0.2
pytimelib is a simple model for python to do time conversion.

![image](doc/pytimelib.png)

pytimelib
=========
* pytimelib is a simple model for python to do time conversion.
* python 3
* It is base on arrow library and pytz libraty, making it easy to use aware time and native time conversion.

Installation
=========
From PyPi:

    $ pip install pytimelib


Basic Usage
=========
* **cover datetime to timestamp:**

    ```python
    import time
    import datetime
    from pytimelib import TimeLib

    date_time = datetime.datetime.now()
    timestamp = TimeLib.datetime_to_timestamp(date_time)
    date_time = TimeLib.timestamp_to_datetime(timestamp)
    ```

* **datetime to timestamp conversion by timezone:**

   for example:

    ```python
    import time
    import datetime
    from pytimelib import TimeLib

    date_time = datetime.datetime.utcnow()
    print("datetime to timestamp by timezone(from UTC):")
    timestamp = TimeLib.datetime_to_timestamp_by_timezone(date_time,
                                                          from_tz="UTC")
    print(timestamp)
    print("timestamp to datetime by timezone(UTC to Los Angeles):")
    date_time = TimeLib.timestamp_to_datetime_by_timezone(
        timestamp, to_tz="America/Los_Angeles")
    print(date_time)
    ```

* **datetime and timeString conversion by timezone:**

   for example:

    ```python
    import time
    import datetime
    from pytimelib import TimeLib

    # datetime and timeString by timezone
    print("datetime to timeString by timezone(UTC to Los Angeles):")
    date_time = datetime.datetime.utcnow()
    time_str = TimeLib.datetime_to_datetime_str_by_timezone(date_time, to_tz="America/Los_Angeles")
    print(time_str)
    print("timeString to datetime by timezone(Los Angeles to UTC):")
    date_time = TimeLib.datetime_str_to_datetime_by_timezone(
        time_str, from_tz="America/Los_Angeles", to_tz="UTC")
    print(date_time)
    ```


Learning more
===============
Check the documentation for more examples or read test cases in unit test code.


Change Log
===============
[Change Log](https://github.com/Geoge-Henry/timelib-py/releases)


Discussing
===============
* submit issue
* email: henry_czh@foxmail.com