Skip to content

Commit 0d0fef0

Browse files
Update app.py
1 parent f44f386 commit 0d0fef0

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

apps/dash-oil-and-gas/app.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77
import math
88
import datetime as dt
99
import pandas as pd
10-
from dash.dependencies import Input, Output, State, ClientsideFunction
11-
import dash_core_components as dcc
12-
import dash_html_components as html
10+
from dash import html, dcc, Input, Output, State, ClientsideFunction
1311

1412
# Multi-dropdown options
1513
from controls import COUNTIES, WELL_STATUSES, WELL_TYPES, WELL_COLORS
@@ -63,7 +61,6 @@
6361

6462

6563
# Create global chart template
66-
mapbox_access_token = "pk.eyJ1IjoicGxvdGx5bWFwYm94IiwiYSI6ImNrOWJqb2F4djBnMjEzbG50amg0dnJieG4ifQ.Zme1-Uzoi75IaFbieBDl3A"
6764

6865
layout = dict(
6966
autosize=True,
@@ -75,8 +72,7 @@
7572
legend=dict(font=dict(size=10), orientation="h"),
7673
title="Satellite Overview",
7774
mapbox=dict(
78-
accesstoken=mapbox_access_token,
79-
style="light",
75+
style="open-street-map",
8076
center=dict(lon=-78.05, lat=42.54),
8177
zoom=7,
8278
),
@@ -147,7 +143,9 @@
147143
dcc.RangeSlider(
148144
id="year_slider",
149145
min=1960,
150-
max=2017,
146+
max=2020,
147+
marks={i: "{}".format(i) for i in range(1960, 2021, 10)},
148+
step=1,
151149
value=[1990, 2010],
152150
className="dcc_control",
153151
),
@@ -404,7 +402,7 @@ def update_year_slider(count_graph_selected):
404402

405403
if count_graph_selected is None:
406404
return [1990, 2010]
407-
405+
408406
nums = [int(point["pointNumber"]) for point in count_graph_selected["points"]]
409407
return [min(nums) + 1960, max(nums) + 1961]
410408

0 commit comments

Comments
 (0)