-
Notifications
You must be signed in to change notification settings - Fork 3
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 #223 from Matico-Platform/develop
Develop
- Loading branch information
Showing
444 changed files
with
317,247 additions
and
7,390 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,8 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
insert_final_newline = true |
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 |
---|---|---|
|
@@ -2,6 +2,7 @@ target | |
node_modules | ||
dist/ | ||
.cache | ||
.DS_Store | ||
|
||
.yarn/* | ||
!.yarn/cache | ||
|
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,5 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
yarn prettier-write | ||
yarn rust-format |
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,8 @@ | ||
# Ignore artifacts: | ||
build | ||
coverage | ||
|
||
# Ignore these file directories | ||
node_modules/* | ||
.yarn/ | ||
editor/ |
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 @@ | ||
{} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,51 @@ | ||
import pyarrow.parquet as pq | ||
import s3fs | ||
import pandas as pd | ||
from zipfile import ZipFile | ||
import numpy as np | ||
import json | ||
s3 = s3fs.S3FileSystem() | ||
|
||
with open('state_lookup.json','r') as f: | ||
states = json.load(f) | ||
|
||
states_inv = {v: k for k, v in states.items()} | ||
|
||
with ZipFile("./us_covid_atlas_data_2022-10-11.zip") as zf: | ||
cases = pd.read_csv(zf.open("data/covid_confirmed_nyt-2022-10-11.csv"),dtype={"fips":'str'}) | ||
cases.fips = cases.fips.astype('str').str.pad(width=5, side='left', fillchar='0') | ||
cases = cases.melt(id_vars="fips", var_name="date", value_name='cases').fillna(0) | ||
cases.cases= cases.cases.astype(np.int32) | ||
|
||
deaths = pd.read_csv(zf.open("data/covid_deaths_nyt-2022-10-11.csv")) | ||
deaths.fips = deaths.fips.astype("str").str.pad(width=5, side='left', fillchar='0') | ||
deaths = deaths.melt(id_vars="fips", var_name="date", value_name='deaths').fillna(0) | ||
deaths.deaths = deaths.deaths.astype(np.int32) | ||
|
||
combined = pd.merge(cases,deaths, on=['fips','date']) | ||
|
||
vaccinations = pd.read_csv(zf.open('data/vaccination_fully_vaccinated_cdc-2022-10-11.csv')) | ||
vaccinations.fips = vaccinations.fips.astype('str').str.pad(width=5, side='left', fillchar='0') | ||
vaccinations = vaccinations.melt(id_vars="fips", var_name="date", value_name='vaccinations').fillna(0) | ||
vaccinations.vaccinations = vaccinations.vaccinations.astype(np.int32) | ||
|
||
combined = pd.merge(combined,vaccinations, on=['fips','date']) | ||
combined = combined.assign(state = combined.fips.str[0:2].apply(lambda x: states_inv[x]) ) | ||
combined.fips = combined.fips.astype(np.int32) | ||
combined.date = pd.to_datetime(combined.date) | ||
|
||
for (state,df) in combined.groupby('state'): | ||
result = df.reset_index().drop(columns=['index']) | ||
result = result.sort_values('date') | ||
result.cases = result.cases - result.groupby('fips').cases.shift(1) | ||
result.deaths = result.deaths- result.groupby('fips').deaths.shift(1) | ||
result.vaccinations= result.vaccinations- result.groupby('fips').vaccinations.shift(1) | ||
result = result.fillna(0) | ||
result.reset_index().to_feather(f"covid/{state}.feather", compression='uncompressed') | ||
|
||
|
||
combined.cases = combined.cases - combined.groupby('fips').cases.shift(1) | ||
combined.deaths = combined.deaths- combined.groupby('fips').deaths.shift(1) | ||
combined.vaccinations= combined.vaccinations- combined.groupby('fips').vaccinations.shift(1) | ||
combined= combined.fillna(0) | ||
combined.reset_index().to_feather(f"covid/all.feather", compression='uncompressed') |
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,57 @@ | ||
{ | ||
"AK": "02", | ||
"AL": "01", | ||
"AR": "05", | ||
"AS": "60", | ||
"AZ": "04", | ||
"CA": "06", | ||
"CO": "08", | ||
"CT": "09", | ||
"DC": "11", | ||
"DE": "10", | ||
"FL": "12", | ||
"GA": "13", | ||
"GU": "66", | ||
"HI": "15", | ||
"IA": "19", | ||
"ID": "16", | ||
"IL": "17", | ||
"IN": "18", | ||
"KS": "20", | ||
"KY": "21", | ||
"LA": "22", | ||
"MA": "25", | ||
"MD": "24", | ||
"ME": "23", | ||
"MI": "26", | ||
"MN": "27", | ||
"MO": "29", | ||
"MS": "28", | ||
"MT": "30", | ||
"NC": "37", | ||
"ND": "38", | ||
"NE": "31", | ||
"NH": "33", | ||
"NJ": "34", | ||
"NM": "35", | ||
"NV": "32", | ||
"NY": "36", | ||
"OH": "39", | ||
"OK": "40", | ||
"OR": "41", | ||
"PA": "42", | ||
"PR": "72", | ||
"RI": "44", | ||
"SC": "45", | ||
"SD": "46", | ||
"TN": "47", | ||
"TX": "48", | ||
"UT": "49", | ||
"VA": "51", | ||
"VI": "78", | ||
"VT": "50", | ||
"WA": "53", | ||
"WI": "55", | ||
"WV": "54", | ||
"WY": "56" | ||
} |
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,4 +1,4 @@ | ||
import * as DeckTypings from '@danmarshall/deckgl-typings'; | ||
declare module 'deck.gl' { | ||
export namespace DeckTypings {} | ||
import * as DeckTypings from "@danmarshall/deckgl-typings"; | ||
declare module "deck.gl" { | ||
export namespace DeckTypings {} | ||
} |
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.