From Industrial Ecology
Jump to: navigation, search


Possible extensions

To enable different markers for the same semantic map depending on property. (like green marker for status operational, red for planned)
    • I just installed this... Let me know if you have any problems. ChrisDavis 10:26, 25 May 2010 (CEST)
  • Semantic Treeview extension or Semantic Graphs for making tree diagrams for categories and properties. (would be nice to play with at some point)
    • I think I would wait on this until things get more complicated. As I understand, the categories and properties up on the wiki still represent a sort of flat hierarchy; i.e. basically the main categories are for EIPs and References, and you don't yet have a complicated graph of relationships between diverse objects.
    • Also, I'm not that big a fan of Ontoprise (who makes the SMW+/Halo extensions). To be fair, the stuff they do is pretty cool, but we've run into issues with it breaking things (compatibility issues with newer versions of the mediawiki software, breaking the Semantic Maps extension).
  • I wonder if there is an extension that allows free input AND choose from list for multiple values properties. Something like a combobox but that support multiple choices to be stored in the same properties.
    • You could probably set this up with the forms and templates. The form would specify two fields (combobox + free text), and the template would then concatenate these values into a single semantic property. There might be a cleaner way to do this though.
      • it would be ideal to have something that not only stores as a property value but in the Allows value: of the property itself. But it's ok it's not needed needed.... --Pgalgani 17:45, 3 June 2010 (CEST)
        • This would get a bit complicated... If I understand you correctly, you mean that whenever someone enters in a new property value (not in the allowed list), then that value would automatically be added to the list of allowed values. The least complicated way might be to have the allowed values set based on properties contained on a different page (which is then queried by the actual property page), so that whenever people find something not in the list, they can then update that page with the permissible values... or you could just provide instructions for people on how to update the form page. ChrisDavis 21:20, 3 June 2010 (CEST)
  • Terminology extension - We have a list of criteria now, but we need to define them precisely. This look quite perfect: if we make a page with all the criteria and their definition, it will automatically pop up on mouseover every time we use that word. Is that correct? The description is quite technical, I don't really get it, but from the example here it looks like it. --Pgalgani 17:46, 3 June 2010 (CEST)
    • I just installed it and made an initial Terminology page based on their example. ChrisDavis 21:08, 3 June 2010 (CEST)
      • wicked!
      • I noticed that you do need to refresh pages when a new term is defined. This is probably because pages are typically cached and you need to tell the wiki to rebuild the page based on the latest stuff. ChrisDavis 07:55, 4 June 2010 (CEST)
      • For some reason it is not working properly. "Shared infrastructures" and "Information sharing initiatives" don't come up properly on some pages (i.e. Terminology itself and Test eip). Hmm it seems to work on here.--Pgalgani 23:00, 6 June 2010 (CEST)
      • Make sure to click on the "refresh" tab on the pages. I can see them on the pages now. ChrisDavis 23:02, 6 June 2010 (CEST)
      • I don't...and why does the "shared infrastructures" also come up as a page while it is a boolean?? other properties which are exactly the same do not.
      • It seems that the terminology is case sensitive, so you need an exact match, see the Test eip page now. Not sure yet about the boolean issue.
      • Try it now. See Property:Shared_infrastructures, you needed to use [[Has type::Boolean]] instead of [[Has type::boolean]]. Also, I found & fixed some small issues in the template where I don't think the properties were being assigned correctly. The main difference I noticed after my fix is that the comments for the shared infrastructure show up now. ChrisDavis 23:23, 6 June 2010 (CEST) thanks! --Pgalgani 23:32, 6 June 2010 (CEST)

Technical Questions

  • Is it possible to have tickboxes as input on the Add Park form? E.g. for industrial sectors present in the park the form has a list of broad categories and you tick the boxes of the ones that are there.--Pgalgani 12:00, 25 May 2010 (CEST)
    • I think you need something like "input type=checkbox". ChrisDavis 13:50, 25 May 2010 (CEST)
  • We wanted to have a picture and maybe even a diagram flow of the parks, but the problem is that it has necessarily to be referenced. It's possible to put an upload file field on a form and a mandatory form (i.e. the source of the image).
    • Do you think there is a way of making the "source" field only mandatory if a file is in fact uploaded?
  • Is it possible to have properties being calculated automatically?? I couldn't find a way...e.g. a property that counts the number of KO passed/industrial sectors present, etc. (see this).
    • It's possible if you use parser functions. See Test_eip for an example that I put in the main text of the page that counts the number of criteria that have a yes. It queries the criteria properties, and will return a 1 if its value is "yes", and will return a 0 for any other value. These numbers are then added up. ChrisDavis 22:20, 30 May 2010 (CEST)
      • And could you store the results? Or theres no need?
        • You may not need to yet unless you want to query this information from another page. In that case you would have to set up another semantic property in the template which would then be filled in based on these values. If you do this, you would probably have to make sure to refresh the page whenever you change the property values, since the values sort of have to cascade from one to the other.
  • Also, in general it is interesting to have things counted, but described too. e.g. a criterion is "number of byproduct exchanges", but it would be interesting to have the single ones listed somewhere. For symbiotic exchanges it would be perfect to have the total count for type (heat cascade,water cascade,shared infrastructure,byproduct exchange) but also the total total somewhere, and also the single ones described.How best to store this kind of information???--Pgalgani 22:44, 30 May 2010 (CEST)
    • one property per exchange, with 2 values: type & description e.g. exchange1=byproduct,fly ash; exchange2=etc...up to 10 or something
    • one property per type, with multiple values:count & a string for each exchange (or a free text) e.g. byproduct_exchanges=3,fly ash,chicken poo,sulfuric acid. so that if someone doesnt feel like specifying at least we have the total, which is what is used for the evaluation <--- I went for two properties (count&list) for each type
      • If you can, I think it's best to have the count dynamically filled in, since this saves people time and reduces errors. The code below might help you achieve that if you then perform an inline query to count the number of things filled out. On the left side specify the variable passed from the template. On the right side the semantic property is specified. If you keep the rest of the syntax it should be ok. See here for more details.
        • Yes we thought of having the count filled in like that but we were thinking that to keep the filling in light it might be better to leave the listing facultative. We'll discuss it in class...--Pgalgani 00:58, 31 May 2010 (CEST)
      • Otherwise, this is probably suitable for now. If you guys started having to document a lot of detail for each of the exchanges, then I would recommend to represent each of them as a separate page, and provide a link to them from the main EIP page. This will allow you to easily add new types of properties without them getting tangled up on the main EIP page. There's also alternative implementations like Semantic Internal Objects, but you would probably need to do some fancy work with the forms and templates so that people could easily fill these out. ChrisDavis 00:37, 31 May 2010 (CEST)
    • single properties: byproduct_exchange1,byproduct_exchange1_comment,heat_cascade1, etc...etc....
  • Can you have dynamic forms then? Like I fill in "3" as the count of byproduct exchanges and 3 little forms pop up, to suggest that I need to specify. Or a button "add one", stuff like that. I couldn't figure out how to have input from more fields go into one property as a list of values. Is that possible? --Pgalgani 01:03, 31 May 2010 (CEST)
    • show on select=value=>div ID - Can be used for inputs of type 'checkbox', 'checkboxes', 'radiobutton', 'dropdown' and 'listbox' to specify that a <div> tag with a certain ID should only be displayed to the user if a certain value (or values) is selected within that input. [1]
    • I don't think that having 3 forms pop up is possible, but the "add one" button is. We've done some work on this by including the code below in a template. I don't know if this is suitable for you as it creates subpages based on input from the form. In other words, you could go to the Kalundborg page, click on the link, and then get a form that automatically makes a page with the name Kalundborg/exchange1
{{#formlink:form=NewOperationalInput|link text=add new|link type=|query string=super_page={{PAGENAME}}&form=NewOperationalInput}}
    • From there you start getting into crazy code like that below on the form page. This auto-creates the page title based on variables passed from the form, and also assigns it a unique number.
{{{info|page name=input of <ComponentTuple[goodName]><unique number>}}}
    • I don't know if this has all the necessary code for a working example, but I do have this working on a different wiki. ChrisDavis 01:15, 31 May 2010 (CEST)
  • quote from you You could probably set this up with the forms and templates. The form would specify two fields (combobox + free text), and the template would then concatenate these values into a single semantic property. How do you do this? For the property "reporting of (environmental) benefits" we need two strings: qualitative/quantitative and periodic/one-off. I guess it can be stored in the same property with this system. just checkboxes or just dropdown wouldnt do it. Or is it less fiddly to just have separate properties?
    • See MultPropTest for one way to do this. I think having separate properties might be a more robust solution depending on what type of information you're trying to express. The main thing is that you don't want to make your life more complicated when you query the information on pages. ChrisDavis 23:50, 6 June 2010 (CEST)

Page name change enquiries

[[ Name of page you want to change ]] to The new name for the page

I think page names can be changed by anyone by clicking on "move" on top of the page (next to history and delete). --Pgalgani 11:58, 25 May 2010 (CEST)

Fixing/adding coordinates for parks

I initially set up the coordinates for all the parks using this. Basically, you throw in a list of streets/cities/countries/whatever and it will give you the coordinates for the nearest location that it can figure out. I know for some of the original parks without much detail, the coordinates currently point to the center of the country, and not to a specific region. ChrisDavis 23:24, 24 May 2010 (CEST)


Things that don't seem to work fine

  • With References, when im in edit mode and after pressing show preview something cool comes up at the bottom with the heading Facts about (page name). Is this supposed to show when viewing the reference?
    • It's probably ok. I think this is just a check so that you can see if the semantic properties are set to the correct values. If go to a page and put __SHOWFACTBOX__ at the bottom you should see the same stuff. This box will tell you all the properties on that page that you can query. ChrisDavis 23:55, 24 May 2010 (CEST)
  • I was just putting a reference for the infamous Alberta's Industrial Heartland called AIH- Company Reports. And in the title I wanted to link in another reference, and you can see it does something funny even though i put the brackets only around the title of the other reference. Is there some specific reason for this, is it not supposed to be done like this? NF 12:27, 1 June 2010 (CEST)
    • The problem is that the title (and other reference fields) are semantic properties, and as a result they expect their values to be only one type of thing (like a the name of a page, a number, string, boolean, etc). When you create the link in the title, you're specifying both a string and a page name which confuses it. There's more info here on properties and types. One reason to have these fields set up as semantic properties is that it allows different citation styles for printing out the references, i.e. title first then authors, or authors then titles, etc.


Q: Do the points (geographic coordinates) for the locations need to be added manually when adding a park or are they automatically generated?

A: They need to be added manually. See discussion above for fixing/adding points. There's some nice tools out there that will generate a list of coordinates given a list of place names. ChrisDavis 23:56, 24 May 2010 (CEST)

Q: Is it possible to search for empty fields? For instance, search all parks for those where "status" isn't filled out. LarsLuscuere 13:03, 26 May 2010 (CEST)

A: I'm not sure if it's directly possible, but one way to find these is to just do a normal query, and then sort by status, which will also show the group of those with no status specified. ChrisDavis 13:10, 26 May 2010 (CEST)

{{#ask:[[Category:EcoIndustrialPark]] |?status=|format=table|limit=500}}

Q: Is there any in-built or installed extensions that can make graphs or charts of in-line quires. If no maybe we need something like this. (For now I was gona plot the number of different results of the KO. see which ones fail/pass most) NF 00:31, 1 June 2010 (CEST)

A: This is already installed (see Special:Version), and I've set up the code as shown below to accept a few formats. I've only used the timeline so far on another wiki, and haven't tested the others yet, so let me know if there are any problems. ChrisDavis 00:37, 1 June 2010 (CEST)

$srfgFormats[] = array('graph', 'googlebar', 'googlepie', 'timeline');
  • An industrial strength option would be the SparqlExtension that we developed here at TBM. I'm not sure if you have time to learn this, but we made this to get around the limitations we ran into with the "ask" queries.


Dear Chris, sorry for prob not writing this in the right place, but couldnt imagine where else. You think it would be possible that on the park page, on the bottom, the wiki generates a box with the references/links that were used for that park? Would be cool because right now just visiting the wiki, one cannot really see the interesting refs :) Thanks in advance, Jan