Figure Friday 2025 - week 10

Imagine, Eszter. It’s my pleasure. I’m always learning from each other.

2 Likes

Is this better? I think I dont need the showscale.

1 Like

nice app, @feanor_92 . Do you have a preference between the line and area chart?

It looks like the y axis for both charts represent percentage, so I would use similar values (either a decimal point from 0.1 to 0.9 or an integer from 1 to 99)

cool graphs, @Mike_Purtell . How would you read the correlation scatter plot?

Is the example graph showing us that correlations between Python and Perl decreased over time? And would you expect other programming languages to have a high correlation?

I wish I could play around with your app live :wink: :heart:

“Hi Mike, I found your question interesting, actually, I’m planning to use it in the near future myself. To be honest, I’m not a big fan of tables in dashboards, but I did some research and I think this little code snippet might help you.”

Here is the small app

app = dash.Dash(__name__)

# Sample data (replace with your actual data)
data = {
    'Date': ['2023-01-01', '2023-01-02', '2023-01-03'],
    'Python': [10, 15, 20],
    'JavaScript': [5, 12, 18],
    'Java': [8, 11, 14],
    'C++': [3, 7, 9],
}

# All available programming languages
all_languages = ['Python', 'JavaScript', 'Java', 'C++']

app.layout = html.Div([
    dcc.Dropdown(
        id='language-dropdown',
        options=[{'label': lang, 'value': lang} for lang in all_languages],
        multi=True,
        value=[],
    ),
    dag.AgGrid(
        id='language-table',
        rowData=[{'Date': date, **{lang: data[lang][i] for lang in all_languages}} for i, date in enumerate(data['Date'])],
        columnDefs=[
            {'field': 'Date'},
            # Language columns will be added dynamically
        ],
        columnSize="sizeToFit",
    ),
])

@app.callback(
    Output('language-table', 'columnDefs'),
    Input('language-dropdown', 'value'),
)
def update_columns(selected_languages):
    base_columns = [{'field': 'Date'}]
    language_columns = [{'field': lang} for lang in selected_languages]
    return base_columns + language_columns

if __name__ == '__main__':
    app.run_server(debug=True)

The colum defs code in you code are static, while this one is dinamic.
Hopefully it can makes the trick, or what you need

Best Regrads

2 Likes

The topic of programming language popularity is interesting; I believe it also depends heavily on development trends and paradigms. I have added additional information to the dataset to have an overview based on trends and languages.



Additionally, at Octoverse: AI leads Python to top language as the number of global developers surges - The GitHub Blog there is an interesting resource that covers other factors, at least on GitHub.
Application code

1 Like

Hi @U-Danny
It’s really cool that you used a scatter_ternary plot. I’ve been wanting to use that in one of the Figure Friday example graphs. This could have been a good opportunities.

Where did you get the data from on paradigms and trends?
What does the categories stand for in the bottom right corner of the scatter_ternary?

Hello, I used ChatGPT to generate the additional information, and yes, I also found the ternary graph interesting for this case. The ‘categories’ represent the number of categories or areas in which they are used.

1 Like