Compare commits

...

6 Commits

7 changed files with 103 additions and 8 deletions

80
README.md Normal file
View File

@@ -0,0 +1,80 @@
graphPaname
===========
graphPaname is a system that collects real-time data, relevant to the
COVID-19 pandemic de-escalation, from the city of Paris.
It works with 4 datasets about the de-escalation:
- Retailers with home delivery
- Additional parking places in relay parkings (parkings connected to
public transportation)
- Temporary cycling paths
- Temporary pedestrian streets
For each dataset, we offer a table with the data, and a map of Paris
with markers. Additionally, there\'s a section with photos related to
the COVID-19 pandemic.
Technologies
------------
- Flask
- Pandas
- Folium
Data sources
------------
- [Open Data](https://opendata.paris.fr/pages/home/)
- [OpenStreetMap](https://www.openstreetmap.org/)
- [Flickr](https://flickr.com)
Requirements
------------
- Nix
Installation
------------
1. Install Nix (compatible with MacOS and Linux):
``` {.shell}
curl -L https://nixos.org/nix/install | sh
```
There are alternative installation methods, if you don\'t want to pipe
curl to sh
2. Clone the repository:
``` {.shell}
git clone https://coolneng.duckdns.org/gitea/coolneng/graphPaname
```
3. Change the working directory to the project:
``` {.shell}
cd graphPaname
```
4. Enter the nix-shell:
``` {.shell}
nix-shell
```
5. Run the tests:
``` {.shell}
pytest
```
6. Execute the Flask application:
``` {.shell}
flask run
```
The website can be accessed via **localhost:5000**

View File

@@ -1,4 +0,0 @@
* graphPaname
This project aims to gather information about the smart city of Paris and
organize it in different plots and tables.

View File

@@ -5,6 +5,7 @@ from flask_bootstrap import Bootstrap
app = Flask(__name__) app = Flask(__name__)
app.secret_key = SECRET_KEY app.secret_key = SECRET_KEY
app.config['TEMPLATES_AUTO_RELOAD'] = True
bootstrap = Bootstrap(app) bootstrap = Bootstrap(app)
from app import errors, routes from app import errors, routes

View File

@@ -19,7 +19,7 @@ def reverse_coordinates(row):
""" """
Reverses each tuples coordinates to ensure folium can parse them correctly Reverses each tuples coordinates to ensure folium can parse them correctly
""" """
coord = [tuple(reversed(t)) for t in row["fields.geo_shape.coordinates"]] coord = [tuple(reversed(t)) for t in row]
return coord return coord

View File

@@ -28,7 +28,7 @@ def visualization():
@app.route("/map") @app.route("/map")
def map(): def map():
return render_template("map.html", title="Map") return render_template("map.html")
@app.route("/photos") @app.route("/photos")

View File

@@ -3,6 +3,24 @@
{% block content %} {% block content %}
<div class="jumbotron"> <div class="jumbotron">
<h1 id="graphPaname">graphPaname</h1> <h1 id="graphPaname">graphPaname</h1>
<p>graphPaname is an information system that aims to show real-time data, related to the COVID-19 outbreak, in the city of Paris</p> <p>
graphPaname is a system that collects real-time data, relevant to the COVID-19 pandemic de-escalation, from the city of Paris.
</p>
<p>
It works with 4 datasets about the de-escalation:
</p>
<ul class="org-ul">
<li>Retailers with home delivery</li>
<li>Additional parking places in relay parkings (parkings connected to public transportation)</li>
<li>Temporary cycling paths</li>
<li>Temporary pedestrian streets</li>
</ul>
<p>
For each dataset, we offer a table with the data, and a map of Paris with markers. Additionally, there&rsquo;s a section with photos related to the COVID-19 pandemic.
</p>
</div> </div>
{% endblock %} {% endblock %}

View File

@@ -8,7 +8,7 @@
{{ table|safe }} {{ table|safe }}
</div> </div>
<div class="col-md-1"> <div class="col-md-1">
<iframe class="map", src="/map" width="350" height="350"></iframe> <iframe id="map", src="/map" width="350" height="350"></iframe>
</div> </div>
</div> </div>
<p><a href="{{ url_for('data') }}">Back</a></p> <p><a href="{{ url_for('data') }}">Back</a></p>