Practical Semantic Mediawiki: Difference between revisions

Line 1: Line 1:
''This hands-on session for non technical users emphasizes the "need to know" aspects of Web publishing, wikis, information design and Semantic Mediawiki for flexible, structured, practical re-usable content that fits into the Web of Data. It is not expected participants will become experts in all these topics, but will be able to create a site, and have an overview of what can be done as a basis of progressive learning.''
'''Type''': Resolution


= Forward =
'''Status''': Adopted on 10/22/07


Practice site: '''{{PSITE|Practice}}'''
'''Source File''': http://www.cityofeurekasprings.org/ORDS/res551.html


== Acronyms ==
'''Text''':


* MW: Mediawiki
'''RESOLUTION 551'''<br>
* SMW: Semantic Mediawiki
''ENDORSING THE U.S. MAYORS CLIMATE PROTECTION AGREEMENT''


= Web publishing =
'''WHEREAS''', the U.S. Conference of Mayors has previously adopted strong policy resolutions calling for cities, communities and the federal government to take actions to reduce global warming pollution; and


== Difference between Semantic Mediawiki and static web sites, CMS, Mediawiki ==
'''WHEREAS''', the Inter-Governmental Panel on Climate Change (IPCC), the international community’s most respected assemblage of scientists, has found that climate disruption is a reality and that human activities are largely responsible for increasing concentrations of global warming pollution; and


* Static web sites can be more difficult to manage, it's harder to re-use content.
'''WHEREAS''', recent, well-documented impacts of climate disruption include average global sea level increases of four to eight inches during the 20th century; a 40percent decline in Arctic sea-ice thickness; and nine of the ten hottest years on record occurring in the past decade; and
* Content management systems use forms to guide content editing, but they tend to require low level changes (database, programming), and end users have constrained access to the site
* Mediawiki is designed to organize large sets of pages, potentially with many involved people
* Semantic Mediawiki adds structured information and views
** '''We are going to learn markup encoding in order to have more control over content and appearance'''


'''WHEREAS''', climate disruption of the magnitude now predicted by the scientific community will cause extremely costly disruption of human and natural systems throughout the world including: increased risk of floods or droughts; sea-level rises that interact with coastal storms to erode beaches, inundate land, and damage structures; more frequent and extreme heat waves; more frequent and greater concentrations of smog; and


* Designing information well makes it easier to find, consistent and re-usable.
'''WHEREAS''', on February 16, 2005, the Kyoto Protocol, an international agreement to address climate disruption, went into effect in the 141 countries that have ratified it to date; 38 of those countries are now legally required to reduce greenhouse gas emissions on average 5.2 percent below 1990 levels by 2012; and


== Access models ==
'''WHEREAS''', the United States of America, with less than five percent of the world’s population, is responsible for producing approximately 25 percent of the world’s global warming pollutants; and
* Fully open, no login required
* Require login for editing
* Require created accounts to edit (closed editing)
* Require created accounts to access (fully private)
** Encryption to avoid snooping


Access models can be changed over time; avoid starting a wiki with jargon or unsympathetic content.
'''WHEREAS''', the Kyoto Protocol emissions reduction target for the U.S. would have been 7 percent below 1990 levels by 2012; and


== Site users ==
'''WHEREAS''', many leading US companies that have adopted greenhouse gas reduction programs to demonstrate corporate social responsibility have also publicly expressed preference for the US to adopt precise and mandatory emissions targets and timetables as a means by which to remain competitive in the international market place, to mitigate financial risk and to promote sound investment decisions; and


* Levels
'''WHEREAS''', state and local governments throughout the United States are adopting emission reduction targets and programs and that this leadership is bipartisan, coming from Republican and Democratic governors and mayors alike; and
** De-emphasize control, make it as flat as possible
** Bureaucrats still exist - edit site-wide content and styles, block pages and users
* OpenID signin allows people to use account information from other OpenID sites


{{Practice|Create an account and sign in}}
'''WHEREAS''', many cities throughout the nation, both large and small, are reducing global warming pollutants through programs that provide economic and quality of life benefits such as reduced energy bills, green space preservation, air quality improvements, reduced traffic congestion, improved transportation choices, and economic development and job creation through energy conservation and new energy technologies; and


== Accessibility ==
'''WHEREAS''', mayors from around the nation have signed the U.S. Mayors Climate Protection Agreement which, as amended at the 73rd Annual U.S. Conference of Mayors meeting, reads: The U.S. Mayors Climate Protection Agreement.


''Here, accessibility refers to supporting people with vision, keyboard control or cognitive difficulties.''
A. We urge the federal government and state governments to enact policies and programs to meet or beat the target of reducing global warming pollution levels to 7 percent below 1990 levels by2012, including efforts to: reduce the United States’ dependence on fossil fuels and accelerate the development of clean, economical energy resources and fuel-efficient technologies such as conservation, methane recovery for energy generation, waste to energy, wind and solar energy, fuel cells, efficient motor vehicles, and biofuels;


* Making sites accessible generally increases usability
B. We urge the U.S. Congress to pass bipartisan greenhouse gas reduction legislation that includes1) clear timetables and emissions limits and 2) a flexible, market-based system of tradable allowances among emitting industries; and
** Works on more devices from text browser to handheld
** Typically more straightforward navigation
** Accessible hot keys can be used by any expert user
** [http://asyourworldchanges.wordpress.com/2008/10/06/using-the-curb-cuts-principle-to-reboot-computing/ The curb cuts principle]
* Mediawiki is accessible, SMW has issues (forms)
* Value content over appearance
* Good tags for images, image maps


== Terms of use ==
C. We will strive to meet or exceed Kyoto Protocol targets for reducing global warming pollution by taking actions in our own operations and communities such as:
[[File:Copright continuum.jpg|right|500px|Copyright continuum, from traditional copyright to public domain]]


* Creative Commons - share with options for attribution, non-commercial, changes
:1. Inventory global warming emissions in City operations and in the community, set reduction targets and create an action plan.
** [http://creativecommons.org/choose/?jurisdiction=ca Choose your license]
* Traditional copyright - by permission only


* Re-using content
:2. Adopt and enforce land-use policies that reduce sprawl, preserve open space, and create compact, walkable urban communities;
** [http://search.creativecommons.org/ Find CC media]


<br class="cleared" />
:3. Promote transportation options such as bicycle trails, commute trip reduction programs, incentives for car pooling and public transit;


= Using Mediawiki =
:4. Increase the use of clean, alternative energy by, for example, investing in “green tags”, advocating for the development of renewable energy resources, recovering landfill methane for energy production, and supporting the use of waste to energy technology;


[[File:MediaWiki_logo_without_tagline.png|right]]
:5. Make energy efficiency a priority through building code improvements, retrofitting city facilities with energy efficient lighting and urging employees to conserve energy and save money;


''Mediawiki is the underlying software of Wikipedia. It is robust, relatively easy to host, and supported by a large community and supports hundreds of useful extensions.''
:6. Purchase only Energy Star equipment and appliances for City use;


<br class="cleared" />
:7. Practice and promote sustainable building practices using the U.S. Green Building Council's LEED program or a similar system;


== Progressive uses ==
:8. Increase the average fuel efficiency of municipal fleet vehicles; reduce the number of vehicles; launch an employee education program including anti-idling messages; convert diesel vehicles to bio-diesel;


* Basic site with pages and categories
:9. Evaluate opportunities to increase pump efficiency in water and wastewater systems; recover wastewater treatment methane for energy production;
** You just need to know a few things for your wiki to be as useful as most Web sites
* Add widgets for more interactivity
* Wiki gardening to reorganize content
* Add semantic classes for reusable data
* Guide users of the site
** Viewer
** Casual editor
** Advanced editor, gardener
** Semantic coder


== Creating pages ==
:10. Increase recycling rates in City operations and in the community;


* How to name pages
:11. Maintain healthy urban forests; promote tree planting to increase shading and to absorb CO2; and
** One topic per page
* Short, avoid special symbols, use sentence type capitalization, avoid Title Case unless appropriate
* Code and matching brackets


=== Basic markup ===
:12. Help educate the public, schools, other jurisdictions, professional associations, business and industry about reducing global warming pollution.


[[File:Sky_Clouds_13.jpg|right|400px|A picture of clouds with the sun poking through in case people start to panic]]
'''NOW, THEREFORE, BE IT RESOLVED''' that The U.S. Conference of Mayors endorses the U.S. Mayors Climate Protection Agreement as amended by the 73rd annual U.S. Conference of Mayors meeting and urges mayors from around the nation to join this effort.


''Rather than using a rich text editor, Mediawiki uses a progressively learned set of markup, that's designed to be human-readable, consistent and enforces meaning over appearance. It's not dependant on special programs, and could be carved into a park bench and retain its meaning.''
'''BE IT FURTHER RESOLVED''', The U.S. Conference of Mayors will work in conjunction with ICLEI Local Governments for Sustainability and other appropriate organizations to track progress and implementation of the U.S. Mayors Climate Protection Agreement as amended by the73rd annual U.S. Conference of Mayors meeting.


* <nowiki>''Italic'', '''Bold'''</nowiki>
''ADOPTED BY THE CITY COUNCIL OF THE CITY OF EUREKA SPRINGS.''
* <nowiki>* List heading level one</nowiki> — use # for numbered list
** <nowiki>** List level two</nowiki> — ## for numbered list
*** ...
* <nowiki>=Heading one=</nowiki>
** <nowiki>==Heading two==</nowiki>
*** ...


* <nowiki>[[Mypage]]</nowiki> — A wiki link
[[Category:Climate Policy]]
** "Red links" are links to pages that don't exist
[[Category:City Governments]]
** <nowiki>[[File:Mypicture.png]]</nowiki> — Media (inline or link)
[[Category:Arkansas]]
*** A shortcut to creating images is to create the File: link first, then follow the red link to the upload form
** <nowiki>[[Mypage|This is my page]]</nowiki> Alternate link text (using pipe symbol)
* <nowiki>http://theirsite.com</nowiki> — A non-wiki link
** Use <nowiki>[]</nowiki> brackets and space after the link to use your own link text. <nowiki>[http://theirsite.com Their site]</nowiki>.
 
* <nowiki>{{My Template}}</nowiki> — A template (reusable content, function or site value)
** Don't Repeat Yourself
** Pipe symbol is used to pass parameters — <nowiki>{{Show Something|Something}}</nowiki>
* <nowiki>{{ #geocode: Montréal, Quebec}}</nowiki> — Template function, in this case geocode turns a place name into geographic coordinates
* <nowiki>{{{1}}}</nowiki> — SMW variable, in this case the first value passed to a template
 
* Finding pages
* Starting new pages
* Proactive linking
** Brainstorm using links
 
{{Practice|Create a new page that's a unique generally recognized placename, include a link to another page and another site.}}
 
* Categories
** Subcategories
 
{{Practice|Put your page in a category, put that category in a sub-category}}
 
* Uploading images and files
 
* Moving pages
** Moving preserves the original link, can be useful for "also known as"
 
{{Practice|Move your page to a more specific location (Placename, Region), observe [[Special:RecentChanges]]}}
{{Bonus practice|Add an image, place it on the right and include a caption.}}
 
* Deleting pages
 
* Templates - used for consistently reused content
 
=== Making pages look good ===
 
''CSS is the style system of Web pages and can also be used in Mediawiki. Like wiki markup, learning can be progressive.''
 
[http://www.placeography.org/index.php/Main_Page Placeography] | [http://genozymes-ge3ls.ca/wiki/Bioenergy Biofuel Visions]
 
* Re-using CSS styling <nowiki><div style="background: orange">Hello world</div></nowiki>
** Avoid losing meaning (don't use <nowiki><big></nowiki> for headers), keep it simple
* Re-using styles [[MediaWiki:Common.css]]
* Possible to hide MW's menus and change the 'skin'
 
{{Practice|Add <nowiki><div class="noticebox">...</div></nowiki> to some page content}}
 
{{Bonus practice|Move your div to a reusable template}}
 
= Semantic Mediawiki =
 
[[File:SMW_logo_180px.png|right]]
 
''SMW is an extension ecology of MW that allows marking up content for re-use, and creating easier to use forms and views.''
 
 
* Meaning through annotations and relationships
** You define the relationships for your application
** Triples — subject, predicate, object
*** Subject — what we're talking about
*** Predicate — the relationship type
*** Object - what the subject is being related to
** Combine them and you can flexibly describe anything
 
** Montréal ''is a'' place
** Montréal ''has population'' 1,906,811
** Montréal ''has geographic'' coordinates 45.5088889, -73.5541667
 
* What properties does your content need to be useful?
 
== Examples ==
 
* Form: [http://www.asiancanadianwiki.org/wiki/Amrita_Choudhury Asian Canadian Wiki]
* Form: [http://genozymes-ge3ls.ca/wiki/Special:FormEdit/Topic Biofuels vision]
* Databases: [http://genozymes-ge3ls.ca/wiki/Environmental_database Genozymes environmental databases]
 
== Inline property annotation ==
 
''Single instances of data can be marked-up using annotations. Annotations look like categories, but they use a double colon. The first part is the relationship type, the second either a value or object page.''
 
* <nowiki>[[Date::Jan 1, 2011]]</nowiki> — A date value
* <nowiki>[[asserted by::David Mason]]</nowiki> — A page link
 
<div class="noticebox" style="background: #FFB04C">
'''Page: Montreal'''
 
* <nowiki>[[A::Place]]</nowiki>
* <nowiki>[[Population::1906811]]</nowiki>
* <nowiki>[[Geographic coordinates::45.5088889, -73.5541667]]</nowiki>
</div>
 
{{Practice|Add a population annotation to your place.}}
 
* [http://semantic-mediawiki.org/wiki/Help:Properties_and_types#List_of_data_types Built-in types]
* Geographic coordinate
* [[Special:Properties|Viewing all properties]]
* Subtypes
 
== Queries ==
 
''"Ask" queries can be added to any page to add links or values from other pages according to parameters, for example, by category, pages that have particular values, etc.''
 
** <nowiki>{{ #ask: [[A::Place]] }}</nowiki>
** <nowiki>{{ #ask: [[Category:City]] }}</nowiki>
 
* [[Special:Ask|Interactive queries]]
 
== Classes ==
 
''Instead of using inline property assignments, semantic classes use templates with value assignments. This allows display formatting and further, consistent semantic interaction according to the template name (which is usually the category).''
 
{{Practice|Change your page so it's a an Entity.}}
 
<div class="noticebox" style="background: #FFB04C">
'''Page: [[Montréal]]'''
 
<nowiki>{{Entity</nowiki><br />
<nowiki>|A=Place</nowiki><br />
<nowiki>|Population=10000</nowiki><br />
<nowiki>}}</nowiki>
</div>
 
 
* {{PSITE|Special:CreateClass}} (template, properties, forms)
** One topic per page
** Formlink <nowiki>{{#formlink:Comment|Add a comment}}</formlink></nowiki>
 
* Class templates will often contain queries that show linked classes
 
{{Practice|Create your own semantic class with template, properties, form. Add pages to it {{PSITE|Special:Forms}} }}
 
== Views ==
 
<div style="float: right">
{{ #ask: [[Geographic coordinate::+]]|format=map}}
</div>
 
* Format= parameter to queries
** <nowiki>{{ #ask: [[Geographic coordinate::+]]|format=map}}</nowiki>
 
* [http://innovationcell.com/wiki/Impact Timeline], Calendar, Map, [http://www.asiancanadianwiki.org/wiki/Facet_browse_with_map Facet browser]
 
<br class="cleared" />
 
== Basic inference==
 
''Inference is used to derive information from basic information.''
 
<nowiki>{{#ifexpr: {{{Population|}}} > 50000
 
| [[Category:City]] }}
</nowiki>
 
''If the page's population is greater than 50000, then put it in the category of city.''
 
This is a simple form of artificial intelligence, that be very useful for large sets of pages for arbitrary classifications.
 
== Future directions==
 
* Relating ontologies (categories and properties) between sites
* Reusing content
* Creating a big picture across the web where anyone can ask questions and add their data
 
<br class="cleared" />
 
= Mediawiki Widgets=
 
''[http://www.mediawikiwidgets.org/Main_Page Mediawiki Widgets] allow embedding third-party site content for rich media (Youtube, photo sites, etc) and interactive discussions (DISQUS, Twitter, etc) without needing to set it up or host it on your site''.
 
* DISQUS discussion
** Register with DISQUS
** Get key
** Create [[Widget:DISQUS|widget]]
** Embed widget on pages
 
= Converting content or sites =
 
* [http://johnmacfarlane.net/pandoc/ Pandoc]
* Convertors for [http://wiki.services.openoffice.org/wiki/Convert2MediaWiki Open Office], [http://wikieducator.org/Microsoft_Launches_Open_Source_Filter_for_Mediawiki Microsoft Word]
 
= Hosting =
 
* Export a site, modularize by category
** Complete site export
* [[Special:Version]]
* Free light/startup hosting
* Inexpensive Mediawiki with SMW option
* Wikia
* Self-hosting
 
= Getting help =
 
* View source of pages
* Mediawiki help sites and community
* Semantic mediawiki help sites and community
* If it's for an open cause, ask me
** Let's form a user group
 
[[Category:SemWeb]]