Retrieve the dates of the restrictions in countries imposed by governments around the world during the covid-19 pandemic.
Project description
lockdowndates
Retrieve the dates of the restrictions in countries imposed by governments around the world during the covid-19 pandemic.
Install
pip install lockdowndates
How to use
Single Country
ld = LockdownDates("Aruba", "2022-01-01", "2022-01-08")
lockdown_dates = ld.dates()
lockdown_dates
Fetching lockdown dates...
Fetched lockdown dates for: Aruba
aruba_country_code | aruba_stay_at_home | |
---|---|---|
timestamp | ||
2022-01-01 | ABW | 2.0 |
2022-01-02 | ABW | 2.0 |
2022-01-03 | ABW | 2.0 |
2022-01-04 | ABW | 2.0 |
2022-01-05 | ABW | 2.0 |
2022-01-06 | ABW | 2.0 |
2022-01-07 | ABW | 2.0 |
2022-01-08 | ABW | 2.0 |
Multiple Countries
ld2 = LockdownDates(["Canada", "Denmark"], "2022-01-01", "2022-01-08")
lockdown_dates = ld2.dates()
lockdown_dates
Fetching lockdown dates...
Fetched lockdown dates for: Canada, Denmark
canada_country_code | denmark_country_code | canada_stay_at_home | denmark_stay_at_home | |
---|---|---|---|---|
timestamp | ||||
2022-01-01 | CAN | DNK | 1.0 | 0.0 |
2022-01-02 | CAN | DNK | 1.0 | 0.0 |
2022-01-03 | CAN | DNK | 1.0 | 0.0 |
2022-01-04 | CAN | DNK | 1.0 | 0.0 |
2022-01-05 | CAN | DNK | 1.0 | 0.0 |
2022-01-06 | CAN | DNK | 1.0 | 0.0 |
2022-01-07 | CAN | DNK | 1.0 | 0.0 |
2022-01-08 | CAN | DNK | 1.0 | 0.0 |
stay_at_home values:
- NaN - No data available for that date.
- 1.0 - recommend not leaving house.
- 2.0 - require not leaving house with exceptions for daily exercise, grocery shopping, and 'essential' trips.
- 3.0 - require not leaving house with minimal exceptions (eg allowed to leave once a week, or only one person can leave at a time, etc.
Available Countries
Country |
---|
Afghanistan |
Albania |
Algeria |
Andorra |
Angola |
Argentina |
Aruba |
Australia |
Austria |
Azerbaijan |
Bahamas |
Bahrain |
Bangladesh |
Barbados |
Belarus |
Belgium |
Belize |
Benin |
Bermuda |
Bhutan |
Bolivia |
Bosnia and Herzegovina |
Botswana |
Brazil |
Brunei |
Bulgaria |
Burkina Faso |
Burundi |
Cambodia |
Cameroon |
Canada |
Cape Verde |
Central African Republic |
Chad |
Chile |
China |
Colombia |
Comoros |
Congo |
Costa Rica |
Cote d'Ivoire |
Croatia |
Cuba |
Cyprus |
Czech Republic |
Democratic Republic of Congo |
Denmark |
Djibouti |
Dominica |
Dominican Republic |
Ecuador |
Egypt |
El Salvador |
Eritrea |
Estonia |
Eswatini |
Ethiopia |
Faeroe Islands |
Fiji |
Finland |
France |
Gabon |
Gambia |
Georgia |
Germany |
Ghana |
Greece |
Greenland |
Guam |
Guatemala |
Guinea |
Guyana |
Haiti |
Honduras |
Hong Kong |
Hungary |
Iceland |
India |
Indonesia |
Iran |
Iraq |
Ireland |
Israel |
Italy |
Jamaica |
Japan |
Jordan |
Kazakhstan |
Kenya |
Kiribati |
Kosovo |
Kuwait |
Kyrgyz Republic |
Laos |
Latvia |
Lebanon |
Lesotho |
Liberia |
Libya |
Liechtenstein |
Lithuania |
Luxembourg |
Macao |
Madagascar |
Malawi |
Malaysia |
Mali |
Malta |
Mauritania |
Mauritius |
Mexico |
Moldova |
Monaco |
Mongolia |
Morocco |
Mozambique |
Myanmar |
Namibia |
Nepal |
Netherlands |
New Zealand |
Nicaragua |
Niger |
Nigeria |
Norway |
Oman |
Pakistan |
Palestine |
Panama |
Papua New Guinea |
Paraguay |
Peru |
Philippines |
Poland |
Portugal |
Puerto Rico |
Qatar |
Romania |
Russia |
Rwanda |
San Marino |
Saudi Arabia |
Senegal |
Serbia |
Seychelles |
Sierra Leone |
Singapore |
Slovak Republic |
Slovenia |
Solomon Islands |
Somalia |
South Africa |
South Korea |
South Sudan |
Spain |
Sri Lanka |
Sudan |
Suriname |
Sweden |
Switzerland |
Syria |
Taiwan |
Tajikistan |
Tanzania |
Thailand |
Timor-Leste |
Togo |
Tonga |
Trinidad and Tobago |
Tunisia |
Turkey |
Turkmenistan |
Uganda |
Ukraine |
United Arab Emirates |
United Kingdom |
United States |
United States Virgin Islands |
Uruguay |
Uzbekistan |
Vanuatu |
Venezuela |
Vietnam |
Yemen |
Zambia |
Zimbabwe |
Roadmap
- Improve speed of fetching restriction dates.
- Introduction of ISO country code to search with.
- More restrictions imposed - school closure, workplace closure, international travel etc.
- Restrictions for vaccinated and non-vaccinated.
- More data formats.
Contributions
Issues and pull requests are always welcome.
Acknowledgements
A huge massive thanks to Oxford University for open sourcing their data that they've been collecting since the pandemic began. Without them this package wouldn't be possible so please go check them out!
Repo - https://github.com/OxCGRT/covid-policy-tracker
COVID-19 Government Response Tracker - www.bsg.ox.ac.uk/covidtracker
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
Built Distribution
Hashes for lockdowndates-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96944e89a2134787a9a43a4cea9911ee8e31c6079cdfb1db992437184e3fbb3d |
|
MD5 | c1641670e4edf2472a2cd6ee623e402e |
|
BLAKE2b-256 | 5a427ee8ecea92ab34a3ebcc75edab1929a29e065940dbe9e64be04a568b9874 |