Skip to content

Commit

Permalink
refactor: attempt1
Browse files Browse the repository at this point in the history
  • Loading branch information
leehanchung authored and hurshd0 committed Apr 17, 2020
1 parent bafb7be commit 798763a
Show file tree
Hide file tree
Showing 54 changed files with 329 additions and 280 deletions.
88 changes: 0 additions & 88 deletions app.py

This file was deleted.

5 changes: 5 additions & 0 deletions ncov19_dash/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from .dash_app import app
from .flask_server import server
# from ncov19_dash.app import create_app

# app = create_app()
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import requests
import pandas as pd
import plotly.graph_objects as go
from app import cache
from utils import REVERSE_STATES_MAP
from utils import config
from ncov19_dash.flask_server import cache
from ncov19_dash.utils import REVERSE_STATES_MAP
from ncov19_dash.utils import config


def human_format(num):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import requests
import dash_bootstrap_components as dbc
import dash_html_components as html
from utils import REVERSE_STATES_MAP
from utils import config
from app import cache
from ncov19_dash.utils import REVERSE_STATES_MAP
from ncov19_dash.utils import config
import pandas as pd


Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import requests
import dash_bootstrap_components as dbc
import dash_html_components as html
from utils import config
from app import cache
from ncov19_dash.utils import config
from ncov19_dash.flask_server import cache
import pandas as pd


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import pandas as pd
import plotly.express as px
import plotly.graph_objects as go
from app import cache
from utils import config
from ncov19_dash.flask_server import cache
from ncov19_dash.utils import config


@cache.memoize(timeout=3600)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
from typing import List, Dict
import dash_bootstrap_components as dbc
import dash_html_components as html
from app import cache
from utils import STATES_COORD
from utils import config
from ncov19_dash.flask_server import cache
from ncov19_dash.utils import STATES_COORD
from ncov19_dash.utils import config


def safe_div(x, y):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
from typing import List, Dict
import dash_bootstrap_components as dbc
import dash_html_components as html
from app import cache
from utils import config
from utils import STATES_COORD
from ncov19_dash.flask_server import cache
from ncov19_dash.utils import config
from ncov19_dash.utils import STATES_COORD


def safe_div(x, y):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import requests
import pandas as pd
import plotly.graph_objects as go
from app import cache
from utils import REVERSE_STATES_MAP
from utils import config
from ncov19_dash.flask_server import cache
from ncov19_dash.utils import REVERSE_STATES_MAP
from ncov19_dash.utils import config


def human_format(num):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import pandas as pd
import plotly.express as px
import plotly.graph_objects as go
from app import cache
from utils import REVERSE_STATES_MAP
from utils import config
from ncov19_dash.flask_server import cache
from ncov19_dash.utils import REVERSE_STATES_MAP
from ncov19_dash.utils import config



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import pandas as pd
import dash_bootstrap_components as dbc
import dash_html_components as html
from app import cache
from utils import STATES_COORD
from utils import config
from ncov19_dash.flask_server import cache
from ncov19_dash.utils import STATES_COORD
from ncov19_dash.utils import config
import json


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
import plotly.express as px
import plotly.graph_objects as go

from app import cache
from utils import STATES_COORD
from utils import config
from ncov19_dash.flask_server import cache
from ncov19_dash.utils import STATES_COORD
from ncov19_dash.utils import config
import requests


Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
import dash_bootstrap_components as dbc
import dash_html_components as html
import dash_table
from utils import REVERSE_STATES_MAP
from utils import config
from ncov19_dash.utils import REVERSE_STATES_MAP
from ncov19_dash.utils import config

from app import cache
from ncov19_dash.flask_server import cache


def stats_table(state="US"):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import requests
import dash_bootstrap_components as dbc
import dash_html_components as html
from app import cache
from utils import config
from utils import STATES_COORD
from ncov19_dash.flask_server import cache
from ncov19_dash.utils import config
from ncov19_dash.utils import STATES_COORD


@cache.memoize(timeout=900)
Expand Down
Loading

0 comments on commit 798763a

Please sign in to comment.