Giter Site home page Giter Site logo

omykronn / tipe_fractal_cities Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 19.68 MB

TIPE about the Modelisation of Cities with Fractals

License: GNU General Public License v3.0

Python 100.00%
box-counting fractals urbanization visualization fractal-dimension python tipe-exam student-project city-modeling

tipe_fractal_cities's Introduction

Fractal Modelisaton of Cities

This TIPE was done during my years in Scientific Preparatory Classes at the Lycée Champollion (Grenoble, France) from 2022 to 2023.

The theme of the year was : the City.

A TIPE ("Travaux d'Initiatives Personnells encadrées", literally Supervised Personal Initiative Work) is a project lead during the cursus in Preparatory Class for the competitive exams to access to engineering schools.

This TIPE is about the study of cities and their evolution with mathematical models. Here, I modelised the city of Grenoble with fractals, in order to answer the following problematic :

In what extend do fractals help us to understand the evolution of our cities ?

Table of Contents

  1. Objective
  2. Usages
    1. Start a Fractal Analysis
    2. Display Former Results
  3. Data Source
  4. Result
  5. Hardware
  6. Bibliography

Objective

In this document I will apply the mathematical model of fractal to cities and their outskirts. It will help me to extract pieces of infomations such as the associated Box-Counting dimension (a fractal dimension) thanks to the Box-Counting Method. We will see that the Fractal Dimensions are an upgraded density of buildings.

For this, I will use the programming language Python.

Usages

Start a Fractal Analysis

First, you need a black and white image depicting the location of each builidings of the city you consider (cf Data Source for France).

Then the only file main_script.py to use it with the function :

main_script(city, year, resolution, dilatation, src_dir, data_dir, result_dir, used_old_data, show_fig)
  • city : name of the studied city
  • year : year of the study
  • resolution : factor of division of the image's side
  • dilatation : factor of dilatation of the source-image
  • src_dir : Directory of the source-image
  • data_dir : Directory where the temporary data will be created
  • result_dir : Directory where results will be created
  • used_old_data (default : False) : Boolean if old data are already created and can be re-used
  • show_fig (default : True) : Condition if plot is displayed at the end of the analysis

One example :

main_script("Grenoble", 2023, 1, 1, "src/grenoble_2023.png", "data", "results")

Display Former Results

visualization.py displays old results that are written in a CSV file with the function :

display(resolution, src, title, nb_raws, cmap_name)
  • resolution : List of the resolution of each result-files
  • src : List of the directory of each result-files
  • title : List of titles to display
  • nb_raws (default : 1) : Number of raws to display
  • cmap_name (default : inferno) : Name of the theme of the MatPlotLib ColorMap

For instance :

display([130], ["results/agglomeration_grenobloise/Grenoble_2023_130x130.csv"], ["Grenoble 2023"])

Data source

  • BD TOPO® : Map of all buildings in Metropolitan France. Created by the IGN ("Institut Géographique National", literally National Geographic Institute).

Result

Fractal Analysis of the City of Grenoble and its outskirt in 2023. The surface of each cell is about 6.25ha.

City of Grenoble in 2023

Hardware

  • Processor : Intel Core i5 vPro (2,30GHz)
  • RAM : 8GB
  • Memory : 512GB SSD
  • Programming Language : Python 3.9.2

Bibliography

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.