Open map of india12/25/2023 ![]() Step6: Finally, plot the chloropeth map ot(column='Total Crimes against Women', cmap='YlOrRd', linewidth=0.8, ax=ax, edgecolor='0. Step4: Create figure and axes for Matplotlib and set the title fig, ax = plt.subplots(1, figsize=(10, 6)) ax.axis('off') ax.set_title('State Wise Crime against women in India in 2015', fontdict=) Step3: Join both dataframes by state names: merged = map_df.set_index('st_nm').join(data_for_map.set_index('state_name')) merged.head() Step 2: Read the Indian map shapefile with district boundaries in a Geodataframe: fp = "Igismap/Indian_States.shp" map_df = gpd.read_file(fp) Step 1: Read the excel file into a pandas dataframe: df = pd.read_excel('state_wise_crimes.xlsx') We follow the following steps to create the chloropeth map Suppose we have an excel file named state_wise_crimes.xlsx containing all the India State names along with the Total Crime against women as shown below: +-+-+ | state_name | Total Crimes against Women | +-+-+ | Andhra Pradesh | 15931.0 | | Arunachal Pradesh | 384.0 | | Assam | 23258.0 | | Bihar | 13891.0 | | Chhattisgarh | 5720.0 | |. We explain the entire implementation in Python in 5 simple steps The library descartes is a dependency for geopandas which has to be installed explicitly, so don’t forget to install it too. You can installl the Geopandas library using pip as shown below: pip install geopandas pip install descartes The shape files used in this article to plot the India map with state boundaries can be downloaded from this link while that with the district boundaries can be downloaded from this link. Geographic features in a shapefile can be represented by points, lines, or polygons (areas). More about Geopandas Shape Files:Ī shapefile is a simple, nontopological format for storing the geometric location and attribute information of geographic features. Geodataframes are a lot like Pandas dataframes, so the two usually play along nicely. Geopandas is a library that can be used to create choropleth maps with not too many lines of code! It can read files as dataframes which are usually called Geodataframes. Hello everyone, this article demonstrates how to plot the data for crimes against women on a choropleth map of India with respect to each state.Īccording to Google Dictionary: “A choropleth map is a map which uses differences in shading, colouring, or the placing of symbols within predefined areas to indicate the average values of a particular quantity in those areas.” Geopandas: Retrieved Feb 18, 2020, from Introduction: Spatial Data of Municipalities (Maps) is licensed under the Creative Commons Attribution 4.0 International (CC BY 4.Image Courtesy: Reyna Zamora. If you have any issues with the maps, please report them on the github repository: Its made available under the Creative Commons Attribution 4.0 International (CC BY 4.0). Create six-character codes from over 2 billion combinations. Move Gadgets Indias Best GPS IoT Enabled Gadgets NaviMaps Fast and accurate offline and online navigation experiences eLoc : Finding Decoded Join the future of location sharing. Refer contributing for ways to contribute. India’s original internet mapping portal. You can contribute by sending the pull requests. Data is not perfect there as many errors both in data and boundaries. The below table gives you the city of the data as we clean and upload. Here we have digitized them, cleaned them, added appropriate attributes so it can be used by all the researchers, students etcĪll the municipality boundaries are available in geojson (WGS84, EPSG4326) format. Spatial Data of Municipalities (Maps) sourced from different government websites which are freely available to all the Indians.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |