This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Etape préparatoire: charger les données | |
Pour les fichiers shapefile, on utilise shp2pgsql | |
shp2pgsql -s 2950 geobase_mtl.shp geobase | psql -U user -d db_name | |
shp2pgsql -s 3857 demo2016_ad_mtl_island.shp stats_socio | psql -U user -d db_name | |
Pour la valeur d'évaluation foncière venant de CSV, il faut créer la table et les importer fichier par fichier: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ckanapi-exporter --url 'http://donnees.ville.montreal.qc.ca' \ | |
--column "id" --pattern '^name$' \ | |
--column "nom" --pattern '^title$' \ | |
--column "date_creation" --pattern '^metadata_created$' \ | |
--column "derniere_modification" --pattern '^metadata_modified$' \ | |
--column "unite_administrative" --pattern '^author_unite_admin$' \ | |
--column "frequence" --pattern '^update_frequency$' \ | |
--column "nb_fichiers" --pattern '^num_resources$' \ | |
--column "format_fichiers" --pattern '^resources$' '^format$' --deduplicate \ | |
--column "tags" --pattern '^tags$' '^display_name$' --deduplicate \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
import pandas as pd | |
pd.options.display.mpl_style = 'default' | |
metadata_gov = pd.Series([3.1, 3.6, 3.8, 3.9, 4.1, 4.4, 4.5, 4.5, 4.5, 4.6, 4.8, 4.9, 5], index=["File size", "Spatial\ncoverage", "Keywords", "License", "Contact\ninformation", "Update\nfrequency", "URL", "Temporal\ncoverage", "Publisher", "Description", "Title", "Last update", "Data format"]) | |
metadata_gov.plot(kind="barh") | |
consumer_metadata = pd.Series([3.22, 3.44, 3.56, 3.67, 3.89, 3.89, 4, 4.22, 4.56, 4.56, 4.56, 4.67, 4.78], index=["File size", "Contact\ninformation", "Temporal\ncoverage", "Update\nfrequency", "Keywords", "Spatial\ncoverage", "Publisher", "License", "Title", "Data format", "Description", "Last update", "URL"]) | |
consumer_metadata.plot(kind="barh") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#In the tomcat/catalina base directory (/usr/share/tomcat6/bin/ under Ubuntu), create a file setenv.sh (tomcat will automatically read it) and set the following: | |
export JAVA_OPTS='-Xmx6144M' | |
#or | |
export CATALINA_OPTS='-Xmx6144M' | |
#where 6144M is the size needed... in my case, 6GB. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id='map-ui'> | |
<select onchange="switchMap()" id="maplist";> | |
</select> | |
</div> | |
<div id='map'></div> | |
<!--div id='map2'></div--> | |
<script type='text/javascript'> | |
//Default center and zoom | |
var myCenter = [45.50, -73.60]; |