Пример #1
0
try:
    from mpltools import style, layout
    style.use('ggplot')
    layout.use('ggplot')
except:
    pass


#################################
# TEST DATA EXAMPLE #
#################################

example_df = epipy.generate_example_data(cluster_size=6, outbreak_len=180, clusters=8,
                                         gen_time=5, attribute='health')
fig, ax = epipy.case_tree_plot(example_df, cluster_id='Cluster', case_id='ID', date_col='Date', color='health', gen_mean=5, gen_sd=1 )
ax.set_title('Example outbreak data')
ax.set_ylabel('Generations')
fig.show()


# Checkerboard plot
fig, ax = epipy.checkerboard_plot(example_df, 'ID', 'Cluster', 'Date')
ax.set_title("Example outbreak data")
fig.show()

############################
## MERS-CoV DATA EXAMPLE ###
############################

mers_df = epipy.get_data('mers_line_list')
Пример #2
0
    style.use('ggplot')
    layout.use('ggplot')
except:
    pass


#################################
# TEST DATA EXAMPLE #
#################################

# Generate example data
example_df = epipy.generate_example_data(cluster_size=7, outbreak_len=180, clusters=7, gen_time=4, attribute='health')

# Case tree plot                                        
fig, ax = epipy.case_tree_plot(example_df, cluster_id = 'Cluster', \
                    case_id ='ID', date_col='Date', color='health', \
                    gen_mean=4, gen_sd = 1)
ax.set_title('Example outbreak data')

# Checkerboard plot
fig, ax = epipy.checkerboard_plot(example_df, 'ID', 'Cluster', 'Date')
ax.set_title("Example outbreak data")


############################
## MERS-CoV DATA EXAMPLE ###
############################

mers_df = epipy.get_data('mers_line_list')
#you can also get synthetic data using epipy.get_data('example_data')
Пример #3
0
except:
    pass

#################################
# TEST DATA EXAMPLE #
#################################

example_df = epipy.generate_example_data(cluster_size=6,
                                         outbreak_len=180,
                                         clusters=8,
                                         gen_time=5,
                                         attribute='health')
fig, ax = epipy.case_tree_plot(example_df,
                               cluster_id='Cluster',
                               case_id='ID',
                               date_col='Date',
                               color='health',
                               gen_mean=5,
                               gen_sd=1)
ax.set_title('Example outbreak data')
ax.set_ylabel('Generations')
fig.show()

# Checkerboard plot
fig, ax = epipy.checkerboard_plot(example_df, 'ID', 'Cluster', 'Date')
ax.set_title("Example outbreak data")
fig.show()

############################
## MERS-CoV DATA EXAMPLE ###
############################
Пример #4
0
    pass

#################################
# TEST DATA EXAMPLE #
#################################

# Generate example data
example_df = epipy.generate_example_data(cluster_size=7,
                                         outbreak_len=180,
                                         clusters=7,
                                         gen_time=4,
                                         attribute='health')

# Case tree plot
fig, ax = epipy.case_tree_plot(example_df, cluster_id = 'Cluster', \
                    case_id ='ID', date_col='Date', color='health', \
                    gen_mean=4, gen_sd = 1)
ax.set_title('Example outbreak data')

# Checkerboard plot
fig, ax = epipy.checkerboard_plot(example_df, 'ID', 'Cluster', 'Date')
ax.set_title("Example outbreak data")

############################
## MERS-CoV DATA EXAMPLE ###
############################

mers_df = epipy.get_data('mers_line_list')
#you can also get synthetic data using epipy.get_data('example_data')

# Data cleaning
Пример #5
0
try:
    from mpltools import style, layout

    style.use("ggplot")
    layout.use("ggplot")
except:
    pass


#################################
# TEST DATA EXAMPLE #
#################################

example_df = epipy.generate_example_data(cluster_size=6, outbreak_len=180, clusters=8, gen_time=5, attribute="health")
fig, ax = epipy.case_tree_plot(
    example_df, cluster_id="Cluster", case_id="ID", date_col="Date", color="health", gen_mean=5, gen_sd=1
)
ax.set_title("Example outbreak data")
ax.set_ylabel("Generations")
fig.show()


# Checkerboard plot
fig, ax = epipy.checkerboard_plot(example_df, "ID", "Cluster", "Date")
ax.set_title("Example outbreak data")
fig.show()

############################
## MERS-CoV DATA EXAMPLE ###
############################