# 🍂 Autumn Community App Challenge

**URL:** <https://community.plotly.com/t/autumn-community-app-challenge/66996>\
**Category:** Dash Python\
**Tags:** app-challenge\
**Created:** [August 17, 2022, 8:56pm UTC](https://community.plotly.com/t/autumn-community-app-challenge/66996 "2022-08-17T20:56:03Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![adamschroeder](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/adamschroeder/32/17280_2.png) [@adamschroeder](https://community.plotly.com/u/adamschroeder)\
**Post date:** [August 17, 2022, 8:56pm UTC](https://community.plotly.com/t/autumn-community-app-challenge/66996/1 "2022-08-17T20:56:03Z")

</div>

> The data set used has been modified on August 29. Please read the note below.

Hi Community Members,  
We are officially launching Plotly’s Fall App-Building challenge, where we invite the community to build the most impressive multi-page app with the new [Dash Pages](https://dash.plotly.com/urls#dash-pages) feature. The new data contains the spirits purchase information of Iowa Class “E” liquor licensees by product and date of purchase.

Given the issues with original supermarket sales [data set](https://raw.githubusercontent.com/plotly/datasets/master/supermarket_Sales.csv) brough up by the commuity, we are replacing it with this new [Liquor sales data](https://raw.githubusercontent.com/plotly/datasets/master/liquor_iowa_2021.csv). For those that have already started working on a Dash app with the supermaket data set, that data will still be accepted for the challenge, so feel free to submit your apps with that data.

## The Data Set:

If you prefer to build an app with a smaller version of the data, please download this [liquor Iowa - 2021 - 50 thousand rows](https://raw.githubusercontent.com/plotly/datasets/master/liquor_iowa_2021.csv).

Usage of the full data sets are welcome as well.

- [liquor Iowa - 2021 - 2.6 million rows](https://www.kaggle.com/datasets/tantable/iowa-liquor-sales-2021-v-interesting-26m-rows?sort=published)
- [liquor Iowa - 2012 to 2017 - 12 million rows](https://www.kaggle.com/datasets/residentmario/iowa-liquor-sales?sort=published)

To enter the Community Challenge, please download the data you would like to work with, create an app, and share it by replying to this Forum topic or by [sending me a direct message](https://community.plotly.com/u/adamschroeder) before midnight Sunday, October 2. Please share the code used. Also, please share a link to the deployed app, if possible.

The winning apps will be judged according to the following categories:

- App creativity
- App design
- Data exploration
- Data science or data analysis routines (eg numerical methods, machine learning, prediction, classification, optimization)

First place prize: $125 US dollars

Second place prize: $75 US dollars

Third place prize: $50 US dollars

The winners will be announced in the next Dash Club Dispatch (October).

* * *

## App Example:

🙏 Thank you @Milan for submitting the first app to this challenge and for allowing me to showcase it.

[![autumn-app-image](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/a/f/af568145a3263a204e2add118fd7feab06ec3b45.png)](https://autumn-app-plotly.onrender.com/)

GitHub repo for code:  
[https://github.com/milanzmitrovic/dash\_autumn\_challange\_pages](https://github.com/milanzmitrovic/dash_autumn_challange_pages)

[More example multipage Dash Apps](https://github.com/AnnMarieW/dash-multi-page-app-demos).

---

<div class="post-metadata">

**Author:** ![Matan](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/matan/32/20091_2.png) [@Matan](https://community.plotly.com/u/Matan)\
**Post date:** [August 28, 2022, 5:46pm UTC](https://community.plotly.com/t/autumn-community-app-challenge/66996/2 "2022-08-28T17:46:46Z")

</div>

Hi! I know the competition started and all but I don’t think this dataset is very good, it seems to be fabricated and the insights we can get from the dataset are pretty limited.  
kaggle discussion about why the dataset is problematic:

> **[Supermarket sales](https://www.kaggle.com/datasets/aungpyaeap/supermarket-sales/discussion/247189?resource=download)**
>
> Historical record of sales data in 3 different supermarkets

what do you guys think?

---

<div class="post-metadata">

**Author:** ![AIMPED](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/aimped/32/21758_2.png) [@AIMPED](https://community.plotly.com/u/AIMPED)\
**Post date:** [August 29, 2022, 6:24am UTC](https://community.plotly.com/t/autumn-community-app-challenge/66996/3 "2022-08-29T06:24:42Z")

</div>

Hi,

Yeah, you are right, I took a look into the data before seeing the comments on kaggle and came to the same conclusions. You can just delete a bunch of columns and it is not going to make any difference.

From a data science perspective there might be not much interesting about it.

---

<div class="post-metadata">

**Author:** ![adamschroeder](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/adamschroeder/32/17280_2.png) [@adamschroeder](https://community.plotly.com/u/adamschroeder)\
**Post date:** [August 29, 2022, 2:31pm UTC](https://community.plotly.com/t/autumn-community-app-challenge/66996/4 "2022-08-29T14:31:46Z")

</div>

Thank you @AIMPED Thank you @Matan  
I’m looking into the data set again right now. I will return with more details later today.

---

<div class="post-metadata">

**Author:** ![Milan](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/milan/32/18754_2.png) [@Milan](https://community.plotly.com/u/Milan)\
**Post date:** [September 13, 2022, 7:22pm UTC](https://community.plotly.com/t/autumn-community-app-challenge/66996/5 "2022-09-13T19:22:08Z")

</div>

Thanks Adam!  
While I was building this app, I had a lot of fun. New Dash multi page functionality is so cool feature.

---

<div class="post-metadata">

**Author:** ![Supernyv](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/supernyv/32/20321_2.png) [@Supernyv](https://community.plotly.com/u/Supernyv)\
**Post date:** [September 17, 2022, 4:21pm UTC](https://community.plotly.com/t/autumn-community-app-challenge/66996/6 "2022-09-17T16:21:17Z")

</div>

Having fun building an app for this challenge. This is going to be awsome!

---

<div class="post-metadata">

**Author:** ![hoatran](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/hoatran/32/21447_2.png) [@hoatran](https://community.plotly.com/u/hoatran)\
**Post date:** [September 23, 2022, 3:31am UTC](https://community.plotly.com/t/autumn-community-app-challenge/66996/7 "2022-09-23T03:31:29Z")

</div>

Hi @adamschroeder, first of all thank you for creating this challenge. I would like to send my multiple page app that I deployed.  
[Here](https://multiple-page-app.herokuapp.com/) is the link to the app, and below is screenshot of my app:

 ![Screenshot 2022-09-23 102937](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/8/3/839b870d5e7482a33f4e34df27153c160aa8e611.png)  
 ![Screenshot 2022-09-23 103515](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/7/4/7459a8697c965d3ea5d567a23098dfd288e32817.jpeg)

And here is my github [repo](https://github.com/hoatranobita/multiple_page_app) for this app.

Thank you so much.

---

<div class="post-metadata">

**Author:** ![adamschroeder](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/adamschroeder/32/17280_2.png) [@adamschroeder](https://community.plotly.com/u/adamschroeder)\
**Post date:** [September 23, 2022, 1:35pm UTC](https://community.plotly.com/t/autumn-community-app-challenge/66996/8 "2022-09-23T13:35:15Z")

</div>

Thank you for the submission, Tran (@hoatran),  
Very nice use of Pages with Dash, and I really liked how you used Dash-leaflet to find stores on a map 👍

---

<div class="post-metadata">

**Author:** ![hoatran](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/hoatran/32/21447_2.png) [@hoatran](https://community.plotly.com/u/hoatran)\
**Post date:** [September 23, 2022, 1:40pm UTC](https://community.plotly.com/t/autumn-community-app-challenge/66996/9 "2022-09-23T13:40:08Z")

</div>

@adamschroeder : Thank you. Btw I have a question that have you ever tried to add dcc.Download and deploy to heroku? It worked in local but did not worked in heroku so I had to use Export instead of Download.

---

<div class="post-metadata">

**Author:** ![adamschroeder](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/adamschroeder/32/17280_2.png) [@adamschroeder](https://community.plotly.com/u/adamschroeder)\
**Post date:** [September 23, 2022, 1:55pm UTC](https://community.plotly.com/t/autumn-community-app-challenge/66996/10 "2022-09-23T13:55:06Z")

</div>

HI @hoatran,  
No, I’ve actually never tried adding `dcc.Download` and deploying to heroku.  
What kind of error did the heroku logs give you?

---

<div class="post-metadata">

**Author:** ![hoatran](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/hoatran/32/21447_2.png) [@hoatran](https://community.plotly.com/u/hoatran)\
**Post date:** [September 23, 2022, 2:10pm UTC](https://community.plotly.com/t/autumn-community-app-challenge/66996/11 "2022-09-23T14:10:01Z")

</div>

@adamschroeder: I forgot to check logs. It’s just updating and nothing happened. I will try to deploy again with Download and send you logs.

---

<div class="post-metadata">

**Author:** ![Milan](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/milan/32/18754_2.png) [@Milan](https://community.plotly.com/u/Milan)\
**Post date:** [September 23, 2022, 2:49pm UTC](https://community.plotly.com/t/autumn-community-app-challenge/66996/12 "2022-09-23T14:49:56Z")

</div>

Hey @hoatran , app looks great. I like map that you created, looks amazing!

---

<div class="post-metadata">

**Author:** ![hoatran](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/hoatran/32/21447_2.png) [@hoatran](https://community.plotly.com/u/hoatran)\
**Post date:** [September 23, 2022, 3:03pm UTC](https://community.plotly.com/t/autumn-community-app-challenge/66996/13 "2022-09-23T15:03:45Z")

</div>

@Milan: Thank you so much, your app with filters on modals are great too. I will refer it for my future projects.

---

<div class="post-metadata">

**Author:** ![jhupiterz](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/jhupiterz/32/19435_2.png) [@jhupiterz](https://community.plotly.com/u/jhupiterz)\
**Post date:** [September 24, 2022, 4:07pm UTC](https://community.plotly.com/t/autumn-community-app-challenge/66996/14 "2022-09-24T16:07:29Z")

</div>

Hi @hoatran, thanks for sharing your app!  
I have used dcc.Download before and deployed it to Heroku and was working so maybe I could help you solve whatever issue you’re having 🙂

---

<div class="post-metadata">

**Author:** ![hoatran](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/hoatran/32/21447_2.png) [@hoatran](https://community.plotly.com/u/hoatran)\
**Post date:** [September 24, 2022, 4:23pm UTC](https://community.plotly.com/t/autumn-community-app-challenge/66996/15 "2022-09-24T16:23:37Z")

</div>

@jhupiterz: Thank for your response.  
Below is my code to update table and Download:

```auto
@app.callback([Output('table','data'),
               Output('store_date','data')],
              [Input('btn_6','n_clicks')],
              [State('my-date-picker-range_6','start_date'),
               State('my-date-picker-range_6','end_date'),
               State('stores_2','value'),
               State('category_2','value'),
               State('items_2','value')])
def update_table(n_clicks,start_date_6,end_date_6,store,category,items):
    global df_table_2
    df_table_2 = df_table[(df_table['date'] >= start_date_6) & (df_table['date'] <= end_date_6)]
    if store != []:
        df_table_2 = df_table_2[df_table_2['store_name'].isin(store)]
    if category != []:
        df_table_2 = df_table_2[df_table_2['category_name'].isin(category)]
    if items != []:
        df_table_2 = df_table_2[df_table_2['item_description'].isin(items)]
    return df_table_2.to_dict(orient='records'),df_table_2.to_dict(orient='records')

# Download not work on Heroku
@app.callback(Output('download_1','data'),
              [Input('btn_7','n_clicks')],
              [State('store_date','data')],
              prevent_initial_call=True)
def generate_excel(n_clicks,n):
    df_table_3 = df_table_2.copy()
    if n_clicks > 0:
        return dcc.send_data_frame(df_table_3.to_excel,filename='Data_table' + ".xlsx",index=False)

```

So my idea is use dropdown and Submit Button to update table then send it to Store. After that I will use Download button to download data that sent to Store. It worked in local but in Heroku, it was just Updating and nothing happened. Can you share link to your app or repo for this. Thank you.

---

<div class="post-metadata">

**Author:** ![hoatran](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/hoatran/32/21447_2.png) [@hoatran](https://community.plotly.com/u/hoatran)\
**Post date:** [September 24, 2022, 4:35pm UTC](https://community.plotly.com/t/autumn-community-app-challenge/66996/16 "2022-09-24T16:35:08Z")

</div>

@adamschroeder and @jhupiterz Below is the logs when I click Download:

 ![Screenshot 2022-09-24 233409](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/7/a/7ad296bf886f06d274bec079d5fa42e0878fc0e7.png)

I think that maybe global is not an ideal for this case.

---

<div class="post-metadata">

**Author:** ![Milan](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/milan/32/18754_2.png) [@Milan](https://community.plotly.com/u/Milan)\
**Post date:** [September 27, 2022, 10:38pm UTC](https://community.plotly.com/t/autumn-community-app-challenge/66996/17 "2022-09-27T22:38:12Z")

</div>

@hoatran Thanks! I like putting filters in modal, it does not occupy too much space on default view (only one button) and looks fancy when button is clicked 🙂

---

<div class="post-metadata">

**Author:** ![AIMPED](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/aimped/32/21758_2.png) [@AIMPED](https://community.plotly.com/u/AIMPED)\
**Post date:** [September 28, 2022, 10:11pm UTC](https://community.plotly.com/t/autumn-community-app-challenge/66996/18 "2022-09-28T22:11:55Z")

</div>

Hi all,

here is the link to my github. I might try to deploy my app, but I’m not sure if I get it working until the deadline 🙈 🤣

> **[GitHub - AIMPED/plotly\_dash\_autumn\_2022](https://github.com/AIMPED/plotly_dash_autumn_2022)**
>
> Contribute to AIMPED/plotly\_dash\_autumn\_2022 development by creating an account on GitHub.

I actually challenged myself trying new stuff and getting a bit deeper into some details. Constructive feedback is always very welcomed.

---

<div class="post-metadata">

**Author:** ![adamschroeder](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/adamschroeder/32/17280_2.png) [@adamschroeder](https://community.plotly.com/u/adamschroeder)\
**Post date:** [September 29, 2022, 1:40pm UTC](https://community.plotly.com/t/autumn-community-app-challenge/66996/19 "2022-09-29T13:40:00Z")

</div>

hi @AIMPED  
Very nice usage of Dash\_Leaflet. I really like the feature that allows you to zoom in and see more markers on the map. When all the map coordinates are displayed at once, it makes it overwhelming.

I’ve added a screenshot of your app:

 ![image](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/0/6/062d2a3a0ac9a53d6bf71bf4ae0f0e8eac4cd011.jpeg)

---

<div class="post-metadata">

**Author:** ![AIMPED](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/aimped/32/21758_2.png) [@AIMPED](https://community.plotly.com/u/AIMPED)\
**Post date:** [September 29, 2022, 2:13pm UTC](https://community.plotly.com/t/autumn-community-app-challenge/66996/20 "2022-09-29T14:13:37Z")

</div>

Thanks for the screenshot, could have thought of this myself 🙂

Credit must be given to @Emil for the marker clustering, it is indeed a nice feature!

[Next page](https://community.plotly.com/t/autumn-community-app-challenge/66996.md?page=2)
