Open FlorianJacta opened 1 year ago
Hi, It's my first time on Github can you guide me more about the issue I want to work on it. Thanks
Sure! I will help you on that @MuhammadHasnain77. The goal of this issue is to add a section to the Taipy Documentation. The Taipy Documentation is, in fact, a Github repo. If you are unfamiliar with Github, you can use Github Desktop.
You must clone this repository: Taipy Doc. This will put all the files on your local machine somewhere.
Then, create a local branch (see ressource), change this file (taipy-doc\docs\manuals\gui\viselements\charts\map.md) that is the one containing the documentation for maps. Look at how this is done in this Markdown file and try to add a section at the end on Choropleth maps, what it is with images and code like the other section of this Markdown file.
When it is done, go back to GitHub Desktop, commit your changes, push it, and create a Pull Request between your branch and the develop branch. Then, we will review the changes and propose suggestions if needed. Ultimately, we will approve the changes and merge your modification to our documentation!
Just so you know, you might have to fork the repo, GitHub Desktop will tell you.
Don't hesitate to come back to me! Contributors are very dear to us!
Sure! I will help you on that @MuhammadHasnain77. The goal of this issue is to add a section to the Taipy Documentation. The Taipy Documentation is, in fact, a Github repo. If you are unfamiliar with Github, you can use Github Desktop.
You must clone this repository: Taipy Doc. This will put all the files on your local machine somewhere.
Then, create a local branch (see ressource), change this file (taipy-doc\docs\manuals\gui\viselements\charts\map.md) that is the one containing the documentation for maps. Look at how this is done in this Markdown file and try to add a section at the end on Choropleth maps, what it is with images and code like the other section of this Markdown file.
When it is done, go back to GitHub Desktop, commit your changes, push it, and create a Pull Request between your branch and the develop branch. Then, we will review the changes and propose suggestions if needed. Ultimately, we will approve the changes and merge your modification to our documentation!
Just so you know, you might have to fork the repo, GitHub Desktop will tell you.
Don't hesitate to come back to me! Contributors are very dear to us!
Thank you so much I will try it
You have a section on the doc about Notebooks here. The port is always running after the first execution so you can either use this documentation, restart the kernel, or change the port.
@MuhammadHasnain77 Did you make any progress? How can we help you?
The new release of Taipy is out with 3.1.
It is now possible to have choropleth with this code:
from taipy.gui import Gui
import taipy.gui.builder as tgb
import json
import pandas as pd
import plotly.express as px
# Reload the CSV file to examine its structure
csv_file_path = 'data.csv'
data_csv = pd.read_csv(csv_file_path)
# Reload the GeoJSON file to match it with the CSV data
geojson_path = 'final.geojson'
with open(geojson_path) as f:
geojson_data = json.load(f)
# Attempting to find a common key by examining the first feature's properties
first_feature_properties = geojson_data['features'][0]['properties']
# Display the properties to find a common key with the CSV data
first_feature_properties
# Aggregate total population data by district in the CSV
district_population = data_csv.groupby('District')['Total population'].sum().reset_index()
# Set up the map
fig = px.choropleth_mapbox(district_population,
geojson=geojson_data,
locations='District',
featureidkey="properties.District",
color='Total population',
color_continuous_scale="Viridis",
mapbox_style="open-street-map",
zoom=5, center = {"lat": 28.3949, "lon": 84.1240}, # Center on Nepal
opacity=0.5,
labels={'Total population':'Total Population'}
)
fig.update_layout(margin={"r":0,"t":0,"l":0,"b":0})
fig.show()
with tgb.Page() as page:
tgb.chart(figure="{fig}", height="800px")
Gui(page).run(title="Frontend Demo", host="0.0.0.0", port=5002)
Hello @MuhammadHasnain77
Any news on the issue? Please let us know if you are still on it. Otherwise we will unassign you to make it available for another contributor.
Thank you for your understanding.
This issue has been labelled as "🥶Waiting for contributor" because it has been inactive for more than 14 days. If you would like to continue working on this issue, please add another comment or create a PR that links to this issue. If a PR has already been created which refers to this issue, then you should explicitly mention this issue in the relevant PR. Otherwise, you will be unassigned in 14 days. For more information please refer to the contributing guidelines.
Improve documentation
Add a page for the choropleth map or a section on the current page for maps.
Here is how we contribute to Taipy Doc.