소스 검색

Add pilots metadata to the reports. Add category column.

fzadrazil 5 년 전
부모
커밋
2e885770c1
5개의 변경된 파일170개의 추가작업 그리고 39개의 파일을 삭제
  1. 17 4
      helpers.js
  2. 4 1
      index.js
  3. 6 23
      static/map.css
  4. 110 0
      static/pilots.json
  5. 33 11
      views/nuts.pug

+ 17 - 4
helpers.js

@@ -21,10 +21,14 @@ module.exports.loadJSON = function (filename) {
 
 module.exports.getCentroid = function (geometry) {
   let firstPoint = geometry.coordinates[0][0]
-  let xmin = firstPoint[0]
-  let xmax = firstPoint[0]
-  let ymin = firstPoint[1]
-  let ymax = firstPoint[1]
+
+  if (firstPoint.length > 2)
+    firstPoint = firstPoint[0];
+
+  let xmin = firstPoint[0];
+  let xmax = firstPoint[0];
+  let ymin = firstPoint[1];
+  let ymax = firstPoint[1];
 
   geometry.coordinates[0].forEach(pt => {
     if (pt[0] < xmin) xmin = pt[0];
@@ -34,4 +38,13 @@ module.exports.getCentroid = function (geometry) {
   });
 
   return [(ymin + ymax) / 2.0, (xmin + xmax) / 2.0];
+}
+
+module.exports.getPilotRegion = function (nuts, pilots) {
+  for (let i = 0; i < pilots.length; i++) {
+    if (nuts.startsWith(pilots[i].nuts))
+      return pilots[i];
+  }
+
+  return null;
 }

+ 4 - 1
index.js

@@ -229,10 +229,13 @@ function renderPugReport(nuts, req, res) {
 
       let nutsGeoJson = helpers.loadJSON('static/NUTS3_4326.json');
       let filterednutsGeoJson = where(nutsGeoJson.features, { "properties": { "NUTS_ID": nuts } });
+      let pilots = helpers.loadJSON('static/pilots.json');
+
       region.metadata = {
         name: filterednutsGeoJson[0].properties.NUTS_NAME,
         code: nuts,
-        centroid: helpers.getCentroid(filterednutsGeoJson[0].geometry)
+        centroid: helpers.getCentroid(filterednutsGeoJson[0].geometry),
+        pilot: helpers.getPilotRegion(nuts, pilots)
       };
 
       res.render('nuts', { region: region, datasets: _datasets });

+ 6 - 23
static/map.css

@@ -1,27 +1,10 @@
-table {
-    border-collapse: collapse;
+html {
+    padding: 3rem;
 }
-
-th {
-    border: 1px solid;
-    padding: 5px;
-}
-
-td {
-    border: 1px solid;
-    padding: 5px;
-}
-
-tr:nth-child(even) {
-    background-color: #dddddd;
-}
-
-#metadata {
-    text-align: center;
-}
-
 #map {
     height: 200px;
-    width: 400px;
-    margin: 3rem auto;
+    width: 100%;
 }
+p {
+    text-align: justify;
+}

+ 110 - 0
static/pilots.json

@@ -0,0 +1,110 @@
+[
+  {
+    "nuts": "BE251",
+    "name": "Flanders",
+    "desc": "Flanders is the northern region of Belgium. It covers an area of 13 521 km² and counts approximately 6.35 million inhabitants. The region has a very high population density (475 inhabitants per km²) which is more than four times the average density of the European Union. Only 7% of the area is rural and 2.5% of the population lives in the rural area. The average age of farmers is more than 50 years (only 5% of farmers are younger than 35 years). Few farmers have a successor. Young farmers suffer from a lack of funds when starting up and therefore need some support.",
+    "vision": "The overall ambition is to create sustainable climate resilient productive landscapes, balancing agricultural intensification with environmental concerns and climate resilience.",
+    "impact": "The major question to be answered is how farmers and villagers can be supported to develop their businesses, remain compliant with environmental concerns, improve climate resilience and manage the highly valued rural landscape of Flanders. Remote Sensing and geomatics technology can deliver the first geo-located insights to help develop and subsequently monitor new policy options and business strategies. In addition, global and regional trend analysis can pave the way to promote new business models that can support rural communities with their activities.",
+    "leadname": "VITO",
+    "leadlink": "https://vito.be/en"
+  },
+  {
+    "nuts": "CZ02",
+    "name": "Central Bohemia",
+    "desc": "The Central Bohemian Region is the biggest region of the Czech Republic (according to the dimension - 10 929 km²/ 14 % of the Czech Republic - and population - 1 377 000 inhabitants/12,86 % of the Czech Republic). The Central Bohemian Region has no natural center (as other regions), but for this region the natural center is the capital city. The region is separated into two parts - the metropolitan and peripheral area (mostly rural). It is typical for the region to have a very specific settlement structure - even in the European context - with many small villages (1031 municipalities with less than 2000 inhabitants) related to many infrastructural challenges and issues.",
+    "vision": "The overall ambition of the pilot is to support the sustainability and resilience of rural areas via using new modern technologies/methods, boost the attractivity of rural areas for current rural population and newcomers and make policy-making processes in these fields more effective with the ability to respond flexibly to current and new challenges and issues.",
+    "impact": "Supporting the sustainability and resilience of rural areas using new modern technologies/ methods and boosting of the attractiveness of rural areas for current rural population and newcomers will be implemented as key topics in local, regional and/or national policies/ strategies and funding programs. New information and data, together with collaboration of all rural stakeholders, will lead to well-being of rural population and newcomers.",
+    "leadname": "NUVIT",
+    "leadlink": "http://nuvit.cz"
+  },
+  {
+    "nuts": "IE041",
+    "name": "Monaghan",
+    "desc": "County Monaghan is a mainly rural county in Ireland (shown in dark green in the diagram). It is part of the Border Region and is in the province of Ulster. Monaghan County Council is the local authority for the county. According to the 2016 census, the county had a population of 61,386 people. It is the fifth smallest of the Irish Republic’s 26 counties in area (1295km2) and fourth smallest by population, with only 37% of the County’s population living within an urban area.\n\nIn recent years the county has become more diverse and is now home to a significant population of newly-arrived immigrants. Some have fled from wars and persecution, but most arrived to pursue a better life in Ireland and to work, live and study in the county. In 2016, new communities of non-Irish nationals now comprise 11% (6,122) of the population of the county.",
+    "vision": "Based on the highly innovative PoliRural approach, project sharing and learning best-practice from other regions, the overall ambition is to explore the potential of non-traditional entrants to enter farming in County Monaghan. The project research will explore the motivation and potential for such new entrants into the farming sector and what supports they need to effectively become a farmer or to work in the farming sector.",
+    "impact": "There is currently no such support service in Ireland or even policies to do so, so a direct impact will be new non-traditional entrants into the farming sector in County Monaghan, and a best-practice service that can be adopted and affect policies in other regions and EU Member States.",
+    "leadname": "MIDL",
+    "leadlink": "https://midl.ie"
+  },
+  {
+    "nuts": "EL64",
+    "name": "Central Greece",
+    "desc": "The Region of Central Greece has identified and highlighted the need for an integrated intervention strategy for correlating environment protection, natural and technological disaster risks mitigation, business infrastructure development, investment attraction, job creation and rural and urban social cohesion activities. For these reasons, Region must adopt practices and development activities for protecting its natural resources, while driving urban and rural entrepreneurship.",
+    "vision": "The pilot plans to introduce new interventions that improve training opportunities and digital skills, facilitate the adoption of new farm management practices (e.g. smart farming), develop social capital between newcomers and local populations, and facilitate access of the many of the region's resources (e.g. infrastructure, funding and financing).",
+    "impact": "These measures are expected to reduce unemployment, improve generational renewal, and increase the attractiveness of rural profession through digital technologies.",
+    "leadname": "The Region of Sterea Ellada",
+    "leadlink": "http://www.pste.gov.gr"
+  },
+  {
+    "nuts": "ES423",
+    "name": "Cuenca",
+    "desc": "Segóbriga is located in the municipality of Saelices, which is located in the province of Cuenca, Castile-La Mancha, Spain. The main economic activity is agricultural production connected to a large share of the industrial sector in the area. This territory is characterized by presenting a poorly diversified economy based on agriculture with low added value. 94.69% of the UAA (utilised agricultural area), is oriented to the production of extensive crops (cereals and oil seeds) and permanent crops, olive oil (2.11%) and wine (3.11%). ",
+    "vision": "The overall ambition is to explore the influence of a better performance of the Archaeological Park of Segóbriga, as a catalyst for a greater economic revitalization of the territory, by promoting diversification activities such as tourism, by increasing added-value of local products and small business, and by analyzing the enhance of the quality of life of the inhabitants, as well as the influence in the arrival of new comers.",
+    "impact": "All indicators are referred to a period of 3 years after the completion of the project\nIncrease the number of visitors to the Segóbriga Archaeological Park by 10%\nDegree of satisfaction of visitors to the tourist experience in the territory\nIncrease in 5% the visitors in other patrimonial, natural, gastronomic tourist resources (e.g. Monastery of Uclés)\nIncrease of 5% in the number of travellers and overnight stays in the accommodation of the territory\nIncrease of 5% in the economic results in establishments (bars, restaurants, etc.) and other companies and industries of the territory (small agribusiness, small commerce, auxiliary services, etc.)\nIncrease of 5% in the farm income of holdings related with the agrifood industry in the area\nNumber of newcomers installed in the area\nNumber of queries received interested in how to settle in the territory\nCreation and maintenance of employment in the territory, in companies of related sectors (tourism, agribusiness, auxiliary services, small businesses, etc.) and divided by gender and age, type of contract (men, women, temporary, permanent)\nDegree of sense of belonging to the territory of rural inhabitants\nDegree of satisfaction of living in a rural area by the population of the territory",
+    "leadname": "TRAGSA",
+    "leadlink": "https://www.tragsa.es"
+  },
+  {
+    "nuts": "ITF4",
+    "name": "Apulia",
+    "desc": "The region of Apulia is located in the Southern Italy bordering with Molise from northwest, with Campania and Basilicata from west, and with the Adriatic and Ionian seas from the east and southeast respectively. Apulia region covers 19 541 square kilometers³, that is 6.47% of the country. By the area, it is the 7th largest region of Italy after Sicily (25 833), Piedmont (25 387), Sardinia (24 099), Lombardy (23 863), Tuscany (22 987), and Emilia-Romagna (22 445). The climate is typically Mediterranean. The region is characterized by hot, dry and sunny summers and mild, rainy winters; snowfall is rare. Apulia is among the hottest and driest regions of Italy in summer with temperatures reaching up to and above 40 °C in Lecce and Foggia.",
+    "vision": "The pilot will use the results of the project to increase the attractiveness of the region by identifying policies and actions favorable to the development of existing farms and by encouraging the creation of new farms in rural areas. The action on the production system will concern the promotion of the introduction of new products and services related to the circular and digital economy that encourage new employment especially for the younger population groups.",
+    "impact": "Expected impacts on the Apulia pilot region are as follows:\nThe stakeholders at the region widen and deepen their understanding and knowledge of rural attractiveness and its factors in Apulia region\nThe policy makers of the Apulia region get new tools to adopt data-driven decision making process\nThe cross-border cooperation, clustering and regional stakeholder cooperation\nGenerate ideas for new business opportunities and ideas in Apulia region\nStrengthen the positive brand of Apulia region\nPoliRural improves Apulia region inhabitants’ well-being\nPoliRural increases the attractiveness of Apulia region\nNew business models based on the circular and digital economy",
+    "leadname": "InnovAgriTech",
+    "leadlink": "https://www.economia.unifg.it/it/ricerca/centri-di-ricerca/innovagritech"
+  },
+  {
+    "nuts": "LV008",
+    "name": "Vidzeme",
+    "desc": "Vidzeme Planning Region (VPR) lies in the North East of Latvia and borders on Latgale planning region in the South East, Zemgale Planning Region in the South and Riga Planning Region in the West. Vidzeme Planning Region is the biggest of the planning regions according to its territory. It covers 15 257 km2 or 24% of the territory of Latvia.",
+    "vision": "Overall ambition is to embed pilot results into the region’s long-term and mid-term policy. With the help of local stakeholders, a dynamic toolbox will be prepared that is considering the newest and latest socioeconomic trends, agricultural and related industry foresight & analysis insights as well as findings.",
+    "impact": "Rural places and professions are becoming more attractive for established rural populations and recent or potential newcomers, and they’ve been integrated into the regional development process. Interest of regional inhabitants in traditional fields such as agriculture and forestry has raised because of the cross-industry collaboration. Rural attractiveness serves as a factor for existing and / or potential entrepreneurs to develop their businesses in the region.",
+    "leadname": "Vidzeme Planning Region",
+    "leadlink": "http://www.vidzeme.lv"
+  },
+  {
+    "nuts": "PL913",
+    "name": "Mazowieckie",
+    "desc": "Mazovian  Province is the largest and most populous of the 16 Polish provinces created in 1999. It occupies 35,579 square kilometres of east-central Poland, and has 5,411,446 inhabitants.",
+    "vision": "The ambition is to go beyond the existing approaches and develop new, effective techniques to promote rural areas as a place of living and working for newcomers, in the context of strong impact produced by the agglomeration of rural areas, as well as changing patterns in food consumption (demand), health awareness and lifestyles.",
+    "impact": "The pilot will analyse the existing policy instruments, targeting rural/local communities and how they affect the broader rural ecosystem. It will then introduce indicatores aimed at broadening the inclusion of consumers, rural organisations and farmers into existing food chains; chains that are local (e.g. purchasing initiatives) and based on new forms of market organisation (e.g. online platforms).",
+    "leadname": "European Rural Development Network",
+    "leadlink": "http://erdn.eu"
+  },
+  {
+    "nuts": "SK",
+    "name": "Nitra",
+    "desc": "Slovakia has 5,4 million inhabitants and covers the territory of 49 036 km2. Highlands and mountains cover 60% of its territory and lowlands 40%. At the European level, it has a character of mountain and sub montane landscape. According to the territorial-legal division, Slovakia is divided into 4 areas (NUTS 2), 8 regions (NUTS 3), 79 districts (LAU1), 2890 municipalities (LAU2) of which 138 have the status of a city.",
+    "vision": "To increase the attractiveness of the region, well-being of the existing rural population and attract newcomers, while not affecting the symbiosis between city and rural areas, by introducing policies reflecting the needs of local entrepreneurs and demand of local population, safeguarding the environment and biodiversity at the same time. Introducing a new way of deciding upon and implementing public policies in cooperation and consultation with all relevant stakeholders during all stages. ",
+    "impact": "Expected impacts are as follows:\nEstablishment of cooperation among relevant stakeholders in the region with a special focus on women, youth and potential/or newcomers\nSafeguard continuation of cooperation among stakeholders after the end of project\nEmpowerment of the stakeholders in the region on rural attractiveness issues\nElaboration of the Regional Rural Development Strategy\nStrengthen the agricultural importance of the region in the regional and national economy\nIncrease attractiveness of rural areas and rural professions\nEstablishment of Innovation Center/Hub for the region\nUsing advanced tool of text mining for policy making\nDecision making at the regional level done on the basis of evidence and not political interests\nIncreased effectiveness of new or enhanced regional policies",
+    "leadname": "Slovak University of Agriculture in Nitra",
+    "leadlink": "https://www.uniag.sk/en/main-page/"
+  },
+  {
+    "nuts": "FI1C2",
+    "name": "Hame",
+    "desc": "Häme Pilot Region has a great potential due to its location in Southern Finland between Finland’s biggest cities, Helsinki, Tampere and Turku. Häme Pilot Region consists of two regions: Kanta-Häme (western part) and Päijät-Häme (eastern part).",
+    "vision": "The pilot will use PoliRural results to boost the region’s attractiveness by introducing business-friendly policies that can encourage new entrepreneurs to create products and services on circular-economy and well-being, which in the future may become a significant source of employment.",
+    "impact": "Expected impacts are as follows\nThe stakeholders at the region widen and deepen their understanding and knowledge of rural attractiveness and its factors in Häme region\nThe policy makers of the Häme region get new tools to adopt data-driven decision making process\nThe cross-border cooperation, clustering and regional stakeholder cooperation generate ideas for new business opportunities and ideas in Häme region\nStrengthen the positive brand of Häme region\nPoliRural improves Häme region inhabitants’ well-being\nPoliRural increases the attractiveness of Häme region",
+    "leadname": "Hame University of Applied Sciences",
+    "leadlink": "https://www.hamk.fi"
+  },
+  {
+    "nuts": "FI1C3",
+    "name": "Hame",
+    "desc": "Häme Pilot Region has a great potential due to its location in Southern Finland between Finland’s biggest cities, Helsinki, Tampere and Turku. Häme Pilot Region consists of two regions: Kanta-Häme (western part) and Päijät-Häme (eastern part).",
+    "vision": "The pilot will use PoliRural results to boost the region’s attractiveness by introducing business-friendly policies that can encourage new entrepreneurs to create products and services on circular-economy and well-being, which in the future may become a significant source of employment.",
+    "impact": "Expected impacts are as follows\nThe stakeholders at the region widen and deepen their understanding and knowledge of rural attractiveness and its factors in Häme region\nThe policy makers of the Häme region get new tools to adopt data-driven decision making process\nThe cross-border cooperation, clustering and regional stakeholder cooperation generate ideas for new business opportunities and ideas in Häme region\nStrengthen the positive brand of Häme region\nPoliRural improves Häme region inhabitants’ well-being\nPoliRural increases the attractiveness of Häme region",
+    "leadname": "Hame University of Applied Sciences",
+    "leadlink": "https://www.hamk.fi"
+  },
+  {
+    "nuts": "MK",
+    "name": "North Macedonia",
+    "desc": "The Gevgelija-Strumica Region in the Republic of North Macedonia faces challenges of maintaining and achieving higher development of rural regions that requires a multi stakeholder approach in policy development and policy execution. Areas of required intervention for achieving higher attractiveness of the rural areas can be divided in several categories: economy, social inclusion, climate, young farmers, environment, awareness, technology, agricultural education, tax policy and market issues. Solving these challenges requires identifying horizontal streams that have an effect on all the above categories of challenges.",
+    "vision": "Developing policy measures that will ensure sustainable agricultural extension that will deliver high quality service in an efficient and effective way, for solving all of the above categories of challenges. The pilot ambition will put a special attention on the needs and the role of young farmers in all relevant categories of challenges.",
+    "impact": "Expected impact is as follows:\nGrowth in the rural economy\nReduction of “push” migration and enabling of “pull” migration\nDecreasing of the average age of the rural population\nEnhancing the position of the farmers in the food value chain",
+    "leadname": "AgFutura",
+    "leadlink": "https://agfutura.com"
+  }
+]

+ 33 - 11
views/nuts.pug

@@ -1,27 +1,49 @@
 html
   head
     title= region.nuts
+    link(rel='stylesheet' href='//cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.css')
     link(rel='stylesheet' href='https://unpkg.com/leaflet@1.7.1/dist/leaflet.css' integrity='sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A==' crossorigin='')
     link(rel='stylesheet' href='../map.css')
     script(src='https://unpkg.com/leaflet@1.7.1/dist/leaflet.js' integrity='sha512-XQoYMqMTK8LvdxXYG3nZ448hOEQiglfqkJs1NOQV44cWnUrBc8PkAOcXy20w0vlaXaVUearIOBhiXZ5V3ynxwA==' crossorigin='')
     script(src='../map.js')
 
-    style.
   body
-    div#metadata
-      h1= region.metadata.name + ' (' + region.metadata.code + ')'
 
-      div#map
+    h1= region.metadata.name + ' (' + region.metadata.code + ')'
 
-    table
-      tr
-        th Description
-        th Region score
+    if region.metadata.pilot
+        div.ui.stackable.grid
+          div.four.wide.column
+            h3= 'Pilot region ' + region.metadata.pilot.name
+            p
+              div= 'Pilot lead: ' + region.metadata.pilot.leadname + ' '
+              a(href= region.metadata.pilot.leadlink) !{region.metadata.pilot.leadlink}
+            div#map
+          div.four.wide.column
+            h3= 'Description'
+            p= region.metadata.pilot.desc
+          div.four.wide.column
+            h3= 'Vision statement'
+            p= region.metadata.pilot.vision
+          div.four.wide.column
+            h3= 'Expected impact'
+            p= region.metadata.pilot.impact
+    else
+      div#metadata
+        div#map
 
-      each ds in datasets
+    table.ui.striped.table
+      thead
         tr
-          td= ds.Description
-          td= region[ds.Factor][ds.Name]
+          th Description
+          th Category
+          th Region score
+      tbody
+        each ds in datasets
+          tr
+            td= ds.Description
+            td= ds.Factor
+            td= region[ds.Factor][ds.Name]
     
     script.
       let c = !{JSON.stringify(region.metadata.centroid)};